From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79420A0487 for ; Wed, 3 Jul 2019 18:40:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56365F04; Wed, 3 Jul 2019 18:40:31 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 8C6F03DC for ; Wed, 3 Jul 2019 18:40:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 09:40:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="158032537" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by orsmga008.jf.intel.com with ESMTP; 03 Jul 2019 09:40:10 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Wed, 3 Jul 2019 17:40:01 +0100 Message-Id: <20190703164001.24841-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190703164001.24841-1-bruce.richardson@intel.com> References: <20190703164001.24841-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] buildtools/test-meson-builds: workaround pkg-config issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" With Debian and Ubuntu, the default installation path for the 64-bit libraries is set to e.g. /usr/local/lib/x86_64-linux-gnu/, compared to /usr/local/lib64 on Fedora and Redhat distributions. This causes issues when using "pkg-config --define-prefix" since pkg-config assumes the prefix to be the grandparent of where the .pc file is. On Ubuntu we then get the cflags include path as being "/path/to/install-root/usr/local/lib/include" i.e. with an extra "lib" in the path. This issue only applies for test installs on Ubuntu and similar distros, and is not a problem for regular installs since the --define-prefix parameter would not be passed to pkg-config in those cases. The workaround for this in our test build script is to explicitly make "lib" the "libdir" setting for the install, overriding the distro-provided default. Fixes: 7f80a2102bbb ("devtools: test pkg-config file") Signed-off-by: Bruce Richardson --- devtools/test-meson-builds.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 57d1af47e..7efc590fe 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -76,12 +76,14 @@ for c in gcc clang ; do done # test compilation with minimal x86 instruction set +# set the install path for libraries to "lib" explicitly to prevent problems +# with pkg-config prefixes if installed in "lib/x86_64-linux-gnu" later. default_machine='nehalem' ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || echo false) if [ "$ok" = "false" ] ; then default_machine='corei7' fi -build build-x86-default -Dmachine=$default_machine $use_shared +build build-x86-default -Dlibdir=lib -Dmachine=$default_machine $use_shared # enable cross compilation if gcc cross-compiler is found c=aarch64-linux-gnu-gcc -- 2.21.0