From nobody Tue Nov 26 14:52:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1707323968; cv=none; d=zohomail.com; s=zohoarc; b=M37JdtAzqcwutL72dDNqpbfsr6acq+rFp9SfgCfYQrJVedfjEiqSijCpk5dIbnji7BAGAOSnHhkHAWA1oIxKmcRBWNOHOe5V/KiuT4IvozlZVoHCb9HvMNHmkJ0TT/NuMSw8Gwh+tq96NeLt7PO/gO4KN35xiEFM+mxYS0ujzOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707323968; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; b=U5HH4QcYo8n0lXdd6NiUQrHnAV3/w1iKDwhQHfYwXB/6gYzUB7rJp7ejq9lcr1HtPCbDYg17O6NdyfSBotGB/bOYxiWDlsTij/UtTSO3naITgU4qJOaw/SQVuF8g2rMeISTEg7sN5ZPnc5GaVfu8KgzP+In1+zfIT03zY7Utg6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707323968364213.88091380153037; Wed, 7 Feb 2024 08:39:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwN-0002uX-C7; Wed, 07 Feb 2024 11:38:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwL-0002tP-Ux for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwK-00068O-3u for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40fc52c2ae4so7330965e9.3 for ; Wed, 07 Feb 2024 08:38:23 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id dr9-20020a5d5f89000000b0033b14f22180sm1931991wrb.20.2024.02.07.08.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D06AA5F936; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323902; x=1707928702; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; b=Dv8Ut1t3diR6G97LfsvjCNnKcaKw/2qnmaaGSUtBpzlbQBrOYuISqhFjmmlW2JCer3 Hfyt8rdvVB9SvNtKES7wp8WLph9VNq+MDBfOL52xoWagGAVVFTsZRiNEuNAL05vgraAc vSbs16hXE0z8+x5bNeOJYV+EAqkMqTm+yO6ZByMWmd9AojdUHXHxjdCHw5EymUHlWaP6 tm+xnQqA/0Ur2OCLphxhwj3+NX97JPrLdoiklpdZHpUn27QEt+hJqJA7jDcO8I+cI6D1 z/vN51HKtnfYvvxL5CpIlgrboSNBRJVgjHBds/W0tm4rCkF1xZX+N7SFCbH8/APLz2Tb aEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323902; x=1707928702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; b=FKwc6ThjN1/0gJ2QkBryWvb+fymqWe9BsFzvJHHCQD6CzSze0fujt1JvRqPg92mr+Q 0bZAZBQ3F4GOHpZTMb1eYahMn8QXYlhv1/V3NVn/+R/fxDkUo3uNxwBOSJnVEmnq6AKx iYh0mMel98jxWUTVRxmV7L5nWedNm81ObSORcd/jjxRMgU9AkKhU/NiLsxUSPYlpFVMI kw34ZqxGzmgUtyjTfn8VPSnGtrbWNP05DXJKLEgueqXbvZJAHzJ5W27PNUXUwFyXtaU+ 0SOQIs7b6nsIWD+CAsKNZpjoqMdzBpnsHXaEci9fOH6XsjUSmBjmd3XUOYTqtYCEONrH EbIg== X-Gm-Message-State: AOJu0YyPu9Ors/T5srY6R5IB0xZu5CEuwrQKuQ2XT1dAHqyAkOhFgo4H Ve77B+jpMXlnG90e1TtPBoticzTtpQa9DXtwiy86XNcVuDhzCj51F3Cg+BRB4WU= X-Google-Smtp-Source: AGHT+IGRn8o+3PguwBMQKbgAfAf68TmGaanFkxmhOOIUWDE6pq12LGO9dPZ4sbxX968w/g0y+Ao1ug== X-Received: by 2002:a05:6000:1887:b0:33a:e9dd:5b6b with SMTP id a7-20020a056000188700b0033ae9dd5b6bmr5051977wri.9.1707323902065; Wed, 07 Feb 2024 08:38:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUYag4D21fnS+Nt3Iaa0dWG4qWZq8iz7hwR054Tieh1RJruin5WpYjIvfHJUsbaIMXvRT0a8w0Y7xumZ62eTYqyk7M5dHRcd073VKqaempqxzU3NI3jMnLLMX1ouaZmTgS0y4gs6vgHt0JUXgU1HhOWnRQqW6XWyDDVCHNRid5ugUdq3Ex3o8zdgCEjQmyF51CVoJvMlwQSgBWFm1BJYnCZWfqQgVYVEvtShNto7qBgyNpXMV3ekxzMuGiuD/qRXcOCmfFIp/j7QuXexWYapukhaXU0c72UkvOlVP9HNrm7f4xJnS0IkJAg7k7+EDxbnQLlFpljISxnfi57XteE8g3ZHhqtGQPWqKD/A6YU+NCPq8rm45SzXwj7F7TL+3YI4/Ce4bk8V+Eu+PZFqfQuEh01tf3UQO0oKp8rFWUMnLpuLFijLiTv7g3GAun9BJA3IZLiHlYmdUAF3odWSigqf84aWgLHBo0pFBTbh9qb5ZQIjh2BHHLdseZbzvCGf8Rl+lyMdNcz0gyidQEUkamYgzJTBLmY072NCWj4BNad/X1FEseVZ1NhdnUleZ2WCBDQQYh/HQeppZzdUFnpmER0xxOzIPlsf8m6BHUaAE4W/C8PxNNK+Fef37M207yUmyNHrEN6B2tsa0+4vmttFuAp6q8/HNzQT9hwpLAwy4/sbChqabDwQjRU1WfBdFQnPEE/CytfnqGzqtLXTfGBYi0MR1jqktR/vCFBnQwS2W/D3uXbawLY9zAqUVTmaPrMTPxip9PXtfUkV+5xeheXSM1lV73AEO07XIZBL5g7TyZLT5JI+X+XjdHBAnIZXpvSDzIjunEZZrbnoMxWl75nXctY3GGHgdn1TVv7ZqYf+a6R From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Max Filippov , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 08/14] meson: Link with libinotify on FreeBSD Date: Wed, 7 Feb 2024 16:38:06 +0000 Message-Id: <20240207163812.3231697-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1707323969579100003 From: Ilya Leoshkevich make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-in= otify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) = in archive libqemuutil.a On FreeBSD the inotify functions are defined in libinotify.so. Add it to the dependencies. Signed-off-by: Ilya Leoshkevich Reviewed-by: Thomas Huth Message-Id: <20240206002344.12372-5-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Warner Losh --- meson.build | 23 +++++++++++++++++++---- util/meson.build | 6 +++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index b5d6dc94a83..e5d6f2d057e 100644 --- a/meson.build +++ b/meson.build @@ -2384,6 +2384,22 @@ else endif config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber) =20 +have_inotify_init =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init') +have_inotify_init1 =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init= 1') +inotify =3D not_found +if (have_inotify_init or have_inotify_init1) and host_os =3D=3D 'freebsd' + # libinotify-kqueue + inotify =3D cc.find_library('inotify') + if have_inotify_init + have_inotify_init =3D inotify.found() + endif + if have_inotify_init1 + have_inotify_init1 =3D inotify.found() + endif +endif +config_host_data.set('CONFIG_INOTIFY', have_inotify_init) +config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1) + # has_header_symbol config_host_data.set('CONFIG_BLKZONED', cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE= ')) @@ -2400,10 +2416,6 @@ config_host_data.set('CONFIG_FIEMAP', config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) -config_host_data.set('CONFIG_INOTIFY', - cc.has_header_symbol('sys/inotify.h', 'inotify_init')) -config_host_data.set('CONFIG_INOTIFY1', - cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLAC= K')) config_host_data.set('CONFIG_RTNETLINK', @@ -4407,6 +4419,9 @@ summary_info +=3D {'libudev': libudev} summary_info +=3D {'FUSE lseek': fuse_lseek.found()} summary_info +=3D {'selinux': selinux} summary_info +=3D {'libdw': libdw} +if host_os =3D=3D 'freebsd' + summary_info +=3D {'libinotify-kqueue': inotify} +endif summary(summary_info, bool_yn: true, section: 'Dependencies') =20 if host_arch =3D=3D 'unknown' diff --git a/util/meson.build b/util/meson.build index af3bf5692d8..0ef9886be04 100644 --- a/util/meson.build +++ b/util/meson.build @@ -104,7 +104,11 @@ if have_block util_ss.add(files('throttle.c')) util_ss.add(files('timed-average.c')) if config_host_data.get('CONFIG_INOTIFY1') - util_ss.add(files('filemonitor-inotify.c')) + freebsd_dep =3D [] + if host_os =3D=3D 'freebsd' + freebsd_dep =3D inotify + endif + util_ss.add(files('filemonitor-inotify.c'), freebsd_dep) else util_ss.add(files('filemonitor-stub.c')) endif --=20 2.39.2