From nobody Sat Feb 7 07:11:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619621304; cv=none; d=zohomail.com; s=zohoarc; b=IGI2RXbnrpYeyNELStxh53kU+j+0HLds7PKsWZiZD+CSXgxW/qP1OiE44x0LISAED/Qq+RJZdos4r9FqVVmGjTezOPYwWjpv6f4dQa8S1uokCdu8Ij/bQgV2/KWuGrvIQlar7o7vVssjc/O+ovzCcFPPsfiv/V789uYmXpDBmrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619621304; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=WeY203+P5NVvUR+HqtO0eHSRfFihkq9FUk8m472HInQ=; b=n7Y5Wxqb6EItv4n4xOkqiOl0xQVDPrO4o3wS4Jk2NI+4pN3YvKxX983QPELzsWvL6qeHq9fgdtERJRgzP6nwRYmyR+CT9HDCi+1uKxRa0wEBzycJclDKuo/oYM/trHN885MK8DujbIdjbwt5v5t4aafmsfrpsl+uFYgl37FJ960= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1619621304861755.6782551687425; Wed, 28 Apr 2021 07:48:24 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-55-1k1nEX6UOHCzN7xEaCiP8g-1; Wed, 28 Apr 2021 10:48:21 -0400 Received: by mail-wr1-f69.google.com with SMTP id 4-20020adf80040000b029010cab735fdeso3963150wrk.14 for ; Wed, 28 Apr 2021 07:48:21 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id j15sm262777wrt.17.2021.04.28.07.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 07:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619621303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WeY203+P5NVvUR+HqtO0eHSRfFihkq9FUk8m472HInQ=; b=XEbwJ15c+uamLxzx4WHu8YRobo9fFS1nzKtkcYmUfLWFSBlNvInFQULiGJbiUJ1dIYgr40 5lRx3BKYMOOubVUXPkosPxel3XQQvk56XShSItK6jM7RWbIlCdtP/WcK/skVaSTXeD62QX 6xFIYQxWzQoWl16qRBVbzLlPU+z3ngI= X-MC-Unique: 1k1nEX6UOHCzN7xEaCiP8g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WeY203+P5NVvUR+HqtO0eHSRfFihkq9FUk8m472HInQ=; b=fbf000t9VhoiofNCI1rpqD5lcRAcKdG6xrLdJ3bfN0rLIzbvGq5uYtC+XIewnAJXPv aW5xNwad4vu4ajAC3D+I1KS1YmyY1+y+L/dKUaSniyHM30vtmP/kxKYSM5uN+aV0C27w ryYH0L9dNTKMayxz1TqJrtzrJGosE8koi/cm40vlCni6j9Z4QYzFS4CPVOvDT1iErcsz URmC7xx++P9hkBBE/5PtJ1aEOBRGV5Bi0dOsW6lOw5ZetDnh1Gs8YVm6z46eZqVjf9gi hufVgG0ED4nCp5Qv46ZuJ0PXYK7Q12cxxvAp7f0/ZVfcB/S3Xy/Bq3g/YEunYbuQ1Spi oKTw== X-Gm-Message-State: AOAM530snoae47UeutUHOjdbudkDRXhlV7+1ds/CV4CeB67Fnqq81Clq fzBMBW1dPv8Et21k7t3eLoaijqS0fZ9zq81UdLjxsLaIXsO/nBXlCUTvXC5PE9VPphrg4NIrqk+ VGDR2+qvyWFyDSQ== X-Received: by 2002:a1c:c910:: with SMTP id f16mr5066506wmb.136.1619621300459; Wed, 28 Apr 2021 07:48:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNqXKjxYXdQcCY7V7uF9rGUWRL5xXh+xxzGf8gqlsKV2yGNov5KW3UJDSfdBBuZFh+E0Ztuw== X-Received: by 2002:a1c:c910:: with SMTP id f16mr5066481wmb.136.1619621300280; Wed, 28 Apr 2021 07:48:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Daniel P . Berrange" , Mahmoud Mandour , "Dr. David Alan Gilbert" , Thomas Huth , Connor Kuehl , virtio-fs@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] meson: Check for seccomp/cap-ng libraries if virtiofsd is enabled Date: Wed, 28 Apr 2021 16:48:12 +0200 Message-Id: <20210428144813.417170-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210428144813.417170-1-philmd@redhat.com> References: <20210428144813.417170-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) When not explicitly select a sysemu target and building virtiofsd, the seccomp/cap-ng libraries are not resolved, leading to this error: $ configure --target-list=3Di386-linux-user --disable-tools --enable-virt= iofsd tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires li= bcap-ng-devel and seccomp-devel Fix by checking the seccomp/cap-ng libraries if virtiofsd is built. Reported-by: Mahmoud Mandour Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c6f4b0cf5e8..b466b418fed 100644 --- a/meson.build +++ b/meson.build @@ -393,14 +393,14 @@ endif =20 seccomp =3D not_found -if not get_option('seccomp').auto() or have_system or have_tools +if not get_option('seccomp').auto() or have_system or have_tools or not ge= t_option('virtiofsd').auto() seccomp =3D dependency('libseccomp', version: '>=3D2.3.0', required: get_option('seccomp'), method: 'pkg-config', kwargs: static_kwargs) endif =20 libcap_ng =3D not_found -if not get_option('cap_ng').auto() or have_system or have_tools +if not get_option('cap_ng').auto() or have_system or have_tools or not get= _option('virtiofsd').auto() libcap_ng =3D cc.find_library('cap-ng', has_headers: ['cap-ng.h'], required: get_option('cap_ng'), kwargs: static_kwargs) --=20 2.26.3 From nobody Sat Feb 7 07:11:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619621308; cv=none; d=zohomail.com; s=zohoarc; b=Fx+59iY6hu+YjIrANzFE7y9PNa42U2151MAC4YtACRTu9w7xRPwF/R6DlIlxq8m1Yb4fuePThxaYls4LmrCsIKtD58v1+Bhn+Tt0sh57VVFkUXfJUJM3qG+0fAj3YaQhGsBFdOatxZ4eztiVIhelzxDta3C2odloHTLGDr8Dp8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619621308; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=83Zj+dsuhexjgd/SgHplHVTJG66SKX+lzdg4qh7kEEs=; b=ZJ0QqiE+Z5GakQMFtp2+COqOotheR62pAu/GmetuHE7X0grlU+Lil4zdSW2PpazRfoTw3BsGuFiqg6rEqggVp/TPjTn3G7SM/VusR1qI1GjkGWEfDnbmhQVcBAOLZJNihpe4Rx+WA/psh/gIBG2cR5HbWfz9c+oiYUHJwDW1IX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619621308948649.1611725481632; Wed, 28 Apr 2021 07:48:28 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-312-vXTUi1l-OWCeBK0KXs2dkg-1; Wed, 28 Apr 2021 10:48:26 -0400 Received: by mail-wr1-f72.google.com with SMTP id r12-20020adfc10c0000b029010d83323601so312788wre.22 for ; Wed, 28 Apr 2021 07:48:25 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id d22sm229722wrc.50.2021.04.28.07.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 07:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619621307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=83Zj+dsuhexjgd/SgHplHVTJG66SKX+lzdg4qh7kEEs=; b=JF2psArmhs/Xq9pQ6PJfb4C3ao3KKjO2BdW9D+c3X3Yw+S6RNkZyxc0BbMNNpIhKRNz9/a g2Ltuweh1PCIAg7nDAXPy4990E/G2IzrKup4ZD11jQU6siLuQ7umSsToQq9BFeeMdUSm0Q Aw/DzZqmPtMuNLHWZ2H2tVtm1dh2VuM= X-MC-Unique: vXTUi1l-OWCeBK0KXs2dkg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=83Zj+dsuhexjgd/SgHplHVTJG66SKX+lzdg4qh7kEEs=; b=SuMToSpod2SNKnuHmOo82Sqbe7hfqvFoP57RiOgLQlpQdHaWqIB2anKR3enQ5+mqgs /gBQUAbkIafi3rUmIJSFaOdmiZb1e1yNX9bw1BK26oTs+D+eJBzNWPJMajgeW1Rr0h7W NNj2s2ADkGNluyNVG7u4o2XZdxvhViDhJpplNUg3SCM0IIOZQqEJWUkTmktmkvZn1bUK V0CYDVeeTJ5CtJvv6K1dU/L67XWiLAk7zsuj6E59nEXdKVcrmY5i+bxH19pbZbU2Zdgt fieRDLnkyUSLbV3LbvRt/gi56ARRe3DT2Dy34mT7h4hcp/OcTDb9AZwoXCspWF4/gP4L NF1A== X-Gm-Message-State: AOAM530OCycHTQfZ8piN/817EFKDOUZ/qyix/7Y25X2ON1+81Cu/Su3z IS75vArlbrUInOBQ7EhHk87VSsme8u37eONqat3KDE4rfUg4bRWYxzlUE1zMLn2eRdv5s8eYeI9 VWLyvsDHxHLG4wg== X-Received: by 2002:a5d:4c8a:: with SMTP id z10mr9674131wrs.395.1619621304940; Wed, 28 Apr 2021 07:48:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEs5bd5RqVL5vd2VlgsEeNXl4a3N3MaBffMj5bJxs65Yuh6F5f9rhRrK7ShwYHY5QYDe/M4w== X-Received: by 2002:a5d:4c8a:: with SMTP id z10mr9674113wrs.395.1619621304790; Wed, 28 Apr 2021 07:48:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Daniel P . Berrange" , Mahmoud Mandour , "Dr. David Alan Gilbert" , Thomas Huth , Connor Kuehl , virtio-fs@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] util/meson: Build iov/hexdump/buffer_is_zero with virtiofsd Date: Wed, 28 Apr 2021 16:48:13 +0200 Message-Id: <20210428144813.417170-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210428144813.417170-1-philmd@redhat.com> References: <20210428144813.417170-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) When not explicitly select a sysemu target or the QEMU tools and building virtiofsd, libqemuutil.a has missing symbols: /usr/bin/ld: tools/virtiofsd/virtiofsd.p/fuse_virtio.c.o: in function `vi= rtio_send_msg': tools/virtiofsd/fuse_virtio.c:236: undefined reference to `iov_size' /usr/bin/ld: libqemuutil.a(util_iov.c.o): in function `iov_hexdump': util/iov.c:240: undefined reference to `qemu_hexdump' /usr/bin/ld: libqemuutil.a(util_iov.c.o): in function `qemu_iovec_is_zero= ': util/iov.c:494: undefined reference to `buffer_is_zero' Fix by linking bufferiszero/hexdump/iov objects when building virtiofsd (regardless of sysemu / tools). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- util/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util/meson.build b/util/meson.build index 510765cde46..c2eda2d1374 100644 --- a/util/meson.build +++ b/util/meson.build @@ -59,12 +59,10 @@ util_ss.add(files('aiocb.c', 'async.c', 'aio-wait.c')) util_ss.add(files('base64.c')) util_ss.add(files('buffer.c')) - util_ss.add(files('bufferiszero.c')) util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE= _BACKEND']))) util_ss.add(files('hbitmap.c')) - util_ss.add(files('hexdump.c')) util_ss.add(files('iova-tree.c')) - util_ss.add(files('iov.c', 'qemu-sockets.c', 'uri.c')) + util_ss.add(files('qemu-sockets.c', 'uri.c')) util_ss.add(files('lockcnt.c')) util_ss.add(files('main-loop.c')) util_ss.add(files('nvdimm-utils.c')) @@ -83,3 +81,9 @@ if_false: files('filemonitor-stub.= c')) util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c')) endif + +if have_block or config_host.has_key('CONFIG_VHOST_USER_FS') + util_ss.add(files('hexdump.c')) + util_ss.add(files('bufferiszero.c')) + util_ss.add(files('iov.c')) +endif --=20 2.26.3