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 35C45A0527; Mon, 9 Nov 2020 15:55:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 14E985B3A; Mon, 9 Nov 2020 15:55:13 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4C83D5B30 for ; Mon, 9 Nov 2020 15:55:10 +0100 (CET) IronPort-SDR: 090cxLj0RRwKJ+7M1PXKDl1Mmq+TWMednmm+gRT0ThxUBoGUtJ6Nk6o7dJ+w3Tz9AytepsGp9T MAHOBcBSSkxg== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="231444600" X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="231444600" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 06:55:09 -0800 IronPort-SDR: fqdPPmiYGmNh/UyHzOJ55iRqwSbAlJjjsMBSZJ5TH2q9JVWKtqxC3P8cb8bfkUwx+lNnJ3rQNG lyHeVEAkjZ9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="473004923" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga004.jf.intel.com with ESMTP; 09 Nov 2020 06:55:07 -0800 From: Ferruh Yigit To: Bruce Richardson , Thomas Monjalon Cc: Ferruh Yigit , dev@dpdk.org, david.marchand@redhat.com Date: Mon, 9 Nov 2020 14:55:06 +0000 Message-Id: <20201109145506.1758827-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201109130035.3948462-1-ferruh.yigit@intel.com> References: <20201109130035.3948462-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] devtools: fix 32-bits build 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" If the 'PKG_CONFIG_PATH' is set in the environment before script run, 32 bit still uses that value for 64-bits libraries. >From the build log: " Using DPDK_TARGET i386-pc-linux-gnu meson -Dexamples=l3fwd --buildtype=debugoptimized --werror -Dc_args=-m32 -Dc_link_args=-m32 /tmp/dpdk_maintain/self/dpdk/devtools/.. ./build-32b ... Using 'PKG_CONFIG_PATH' from environment with value: '/usr/local/lib64/pkgconfig/ " This causes build error when linking with the found libraries. Reproduced with 'librte_bpf' which only has 64 bit installed but still enables building 'af_xdp' and link fails. To fix this, using default 'PKG_CONFIG_PATH' variable unless 'CUSTOM_PKG_CONFIG_PATH' set, and set the 'CUSTOM_PKG_CONFIG_PATH' for 32 bit build. Fixes: 9b83106d8784 ("devtools: test 32-bit build") Signed-off-by: Ferruh Yigit --- Cc: Bruce Richardson Cc: Thomas Monjalon v2: * Enable overwriting default 'PKG_CONFIG_PATH' value --- devtools/test-meson-builds.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 0c95d1cc98..29aed9ac84 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -53,7 +53,11 @@ load_env () # { targetcc=$1 export PATH=$default_path - export PKG_CONFIG_PATH=$default_pkgpath + if [ -n "$CUSTOM_PKG_CONFIG_PATH" ]; then + export PKG_CONFIG_PATH=$CUSTOM_PKG_CONFIG_PATH + else + export PKG_CONFIG_PATH=$default_pkgpath + fi export CPPFLAGS=$default_cppflags export CFLAGS=$default_cflags export LDFLAGS=$default_ldflags @@ -226,10 +230,12 @@ if check_cc_flags '-m32' ; then # 32-bit pkgconfig on RHEL/Fedora (lib vs lib64) export PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig' fi + export CUSTOM_PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR target_override='i386-pc-linux-gnu' build build-32b cc -Dc_args='-m32' -Dc_link_args='-m32' target_override= unset PKG_CONFIG_LIBDIR + unset CUSTOM_PKG_CONFIG_PATH fi # x86 MinGW -- 2.26.2