From patchwork Mon Nov 2 17:10:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 320342 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp3907849ilc; Mon, 2 Nov 2020 09:29:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt2QYZkrvpbgY2A/gME19CUOv5TCAViMLRNU32ca3XpGO0lOtewBuWRjh91FLpGEGTgbt5 X-Received: by 2002:ae9:f404:: with SMTP id y4mr10960263qkl.372.1604338164742; Mon, 02 Nov 2020 09:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604338164; cv=none; d=google.com; s=arc-20160816; b=WBztYB+++4eg2k7J534AKiow/3jQVkw+x0CEfBMdunzFfvUvye+YPweQFJeR25MZby LxjR7g5O5eIw4AJOXHlzGicSNgekyz8EOSgPTZHEGp2vBx5M4iReW7TD4417ZKTdOyTe 6igq7YtE/+yJKJ7HUEfAKiVKk96oFWN3EdvacCVaKG4w7iarUZEEQk9qdf0SYDrA4ikx Cn+vLQ/2Ch6aFzfc9hmnwV7xrU6RsDC+ooH0GScn4AkM9c/nOuscM9RjVqpSfZGqr9PN ECLznxERYwn+Z6/aKIpFcFz4yUDilMiMu0LuexBVSMQ6ffhbn9oexgeQs9BrneRAUMId ojYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1UkAowOgugs4Mdi7jPockoQV3dWs7h5MywTlHoiRgXg=; b=B25pVXumVIH6L1i2cC1C8+3rI71DUM6t6a7CWKTpdj7NCnHHTiixgUvKIRPI88WkLm HYTF7tw03AVL1Zg2C/7vyLexvaVLZoJWgyRM9xB3CZbYXIanfYTMKzSn0Wb2cP8QGGGV Kh2uw4XBzmDJaA3xNpDOlRXPigocIZyTmwsxLz2KqAkwNcz64TbMpUQWY9cHbkxbTBhP raAOrjZC+7se6TyhesU6zyKlL5Od8+5aHIUHvZpsuHd/ngWRlmqGsPv5s3ascQjGYPiJ ksrHTuQ/k48xktPrGpCCX0hjduFWf097DGLpsnU6l9SQhmXfoa9Wu66UfSA/9QV4YEE5 EYqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xb9LnuaQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h3si270623qkg.379.2020.11.02.09.29.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Nov 2020 09:29:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xb9LnuaQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZde0-0007US-81 for patch@linaro.org; Mon, 02 Nov 2020 12:29:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZdM2-0001GM-3I for qemu-devel@nongnu.org; Mon, 02 Nov 2020 12:10:50 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:38587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZdLx-0006ct-6T for qemu-devel@nongnu.org; Mon, 02 Nov 2020 12:10:49 -0500 Received: by mail-wm1-x333.google.com with SMTP id h62so5403921wme.3 for ; Mon, 02 Nov 2020 09:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1UkAowOgugs4Mdi7jPockoQV3dWs7h5MywTlHoiRgXg=; b=Xb9LnuaQmW2ancLD3qM8/p0CHVO9XJLa+/V7oZq8zYIzIxWUwK/zHXLl2A3ZM88cMM dj8QLGPlvMJppaV7BnkpuAJhBZ2ogHxfMMUskvIXub/MHQ0E5nZEGobrg3RvVbRpXKIv bs0y9lEXa/XOFNZYFHpSCqQkO4mxlYvSfUb/L+TvxggSo5SRcqExqWRjp8f0Jd7e45s3 D7Ldz98C+4TFIuv3L2voCX3uQR5S0nONwynPw1p2vHR48tbyLYSBwP6fNFEYU8476RuQ qs7+05AzkPKPDOhmQWMf99Fzp5gdFioFmTXJbfU7ln0Mm+xVvUlqC/Aao9ycaaIivBPi j0/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1UkAowOgugs4Mdi7jPockoQV3dWs7h5MywTlHoiRgXg=; b=dZ7VbA/tDJXclfX3ZGwZoV4TakOR9KM7+rN+6iNPYVrCL5ZlqS6A9qy4wrkE1bMofX VvQ1kqSJhidGCCEjbB4SUek5ox7nBKuu3xiuOG7JhmZ41/zB3NKaquJ7lWeNCeCJNiGS 55jP6AaXUXTWnoi+bvztnMhaCd2W1Q/PLxmoUaeSwTigCchCSxS1dwv6qCHZo4BFndpi W2i7FilLMY60WLZZxXnImTRpvCErku8JQ2Ya8+uhSdDxnzlKdT9SHp9VWk2nLubYdpxn UPu8vfX8Dw+j0f3HDIa/wJg90WLVFNqpxkNVIX31M7JF5yRJOYmbmyy8pjbP9+qYhnZz YzvA== X-Gm-Message-State: AOAM5305QNRAvjt5W6NXHQbLkGECL9rnH9ci8tDTa2LvLQpYpVxAD2/J t77an1wij5R5tEspqnapi6NEj8cy76au+w== X-Received: by 2002:a7b:c7c3:: with SMTP id z3mr18417123wmk.43.1604337043584; Mon, 02 Nov 2020 09:10:43 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c18sm22396540wrt.10.2020.11.02.09.10.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 09:10:42 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/26] configure: Test that gio libs from pkg-config work Date: Mon, 2 Nov 2020 17:10:01 +0000 Message-Id: <20201102171005.30690-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201102171005.30690-1-peter.maydell@linaro.org> References: <20201102171005.30690-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" On some hosts (eg Ubuntu Bionic) pkg-config returns a set of libraries for gio-2.0 which don't actually work when compiling statically. (Specifically, the returned library string includes -lmount, but not -lblkid which -lmount depends upon, so linking fails due to missing symbols.) Check that the libraries work, and don't enable gio if they don't, in the same way we do for gnutls. Signed-off-by: Peter Maydell Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200928160402.7961-1-peter.maydell@linaro.org --- configure | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/configure b/configure index 6df4306c884..2c3c69f1188 100755 --- a/configure +++ b/configure @@ -3489,13 +3489,21 @@ if test "$static" = yes && test "$mingw32" = yes; then fi if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then - gio=yes gio_cflags=$($pkg_config --cflags gio-2.0) gio_libs=$($pkg_config --libs gio-2.0) gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0) if [ ! -x "$gdbus_codegen" ]; then gdbus_codegen= fi + # Check that the libraries actually work -- Ubuntu 18.04 ships + # with pkg-config --static --libs data for gio-2.0 that is missing + # -lblkid and will give a link error. + write_c_skeleton + if compile_prog "" "gio_libs" ; then + gio=yes + else + gio=no + fi else gio=no fi