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 6EB7DA0527; Mon, 9 Nov 2020 14:35:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 75A855AB8; Mon, 9 Nov 2020 14:35:41 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5A7E95AA7 for ; Mon, 9 Nov 2020 14:35:39 +0100 (CET) IronPort-SDR: 7pyVJrOIlzEU83pGhdRyXJ/WEYpbUnNqOBpnKmtQ++EZoIoBw3Bz3nst1zAS6ePwrABVgL0/R2 0JDzrSnU4yoA== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="167213652" X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="167213652" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 05:35:38 -0800 IronPort-SDR: 5BDSxmtHBuxDTVp9TzqkTWhmCLpsLsZynKTAP28aQ50DNmyjf1CCD8ujeIgRD5QUWgnUHbTXCA 143FJjwfH33Q== X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="472978904" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.194.11]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 09 Nov 2020 05:35:36 -0800 Date: Mon, 9 Nov 2020 13:35:31 +0000 From: Bruce Richardson To: Ferruh Yigit Cc: Thomas Monjalon , dev@dpdk.org, david.marchand@redhat.com Message-ID: <20201109133531.GF831@bricha3-MOBL.ger.corp.intel.com> References: <20201109130035.3948462-1-ferruh.yigit@intel.com> <3243789.yRO6XYygMt@thomas> <2174e33f-d158-a8ef-ad1a-967688659815@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2174e33f-d158-a8ef-ad1a-967688659815@intel.com> Subject: Re: [dpdk-dev] [PATCH] 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" On Mon, Nov 09, 2020 at 01:24:28PM +0000, Ferruh Yigit wrote: > On 11/9/2020 1:19 PM, Thomas Monjalon wrote: > > 09/11/2020 14:00, Ferruh Yigit: > > > 32 bit still uses the pkgconfig file 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. > > > > I think it is a problem in your configuration. > > PKG_CONFIG_PATH is not empty before starting the script, right? > > > > > To fix updating 'PKG_CONFIG_PATH' and preventing 'load_env' overwrite > > > it. > > [...] > > > 'build-32b' check inside the 'load_env' looks ugly but not sure how to > > > be sure 'PKG_CONFIG_PATH' set correct. > > [...] > > > - export PKG_CONFIG_PATH=$default_pkgpath > > > + if [ "$targetdir" != "build-32b" ] ; then > > > + export PKG_CONFIG_PATH=$default_pkgpath > > > + fi > > > > You can reset PKG_CONFIG_PATH in your config file. > > Something like this: > > > > if echo $DPDK_TARGET | grep -q '^i[3-6]86' ; then > > export PKG_CONFIG_PATH=my32bitlibs/pkgconfig > > fi > > > > We can also discuss why inheriting some default values on script start > > instead of just resetting them. > > > > Yes I have 'PKG_CONFIG_PATH' set in my environment before running script, if > it expects it to be not set, +1 to reset it at the beginning of the script. +1 to this, because we can't have a global PKG_CONFIG_PATH for both 32-bit and 64-bit builds. /Bruce