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 856EAA0527; Mon, 9 Nov 2020 17:48:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6F3F697B; Mon, 9 Nov 2020 17:48:41 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2D8F26947 for ; Mon, 9 Nov 2020 17:48:39 +0100 (CET) IronPort-SDR: uFYwyWehaBd0iHBoTQS46ypE1CqsBHTQPDsJ3t5io8/neLQGX44CGW0YabWZVNAiLxnbzLt7qU HARWkwmfjKMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9800"; a="187784303" X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="187784303" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 08:48:36 -0800 IronPort-SDR: la9lEKz1jKMANbxEThmWSLgWCL8mGUKc5rcogtA//mnVMy6KSCaKvY4XLroEbk6spWby+9o2Ak XdnvRIvbVtEg== X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="530827338" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.193.177]) ([10.213.193.177]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 08:48:35 -0800 To: Bruce Richardson , Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com References: <20201109130035.3948462-1-ferruh.yigit@intel.com> <2070456.l6g01IXifr@thomas> <20201109154404.GH831@bricha3-MOBL.ger.corp.intel.com> <2525675.zXVb4LriKk@thomas> <20201109161925.GL831@bricha3-MOBL.ger.corp.intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 9 Nov 2020 16:48:31 +0000 MIME-Version: 1.0 In-Reply-To: <20201109161925.GL831@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [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" On 11/9/2020 4:19 PM, Bruce Richardson wrote: > On Mon, Nov 09, 2020 at 05:14:24PM +0100, Thomas Monjalon wrote: >> 09/11/2020 16:44, Bruce Richardson: >>> On Mon, Nov 09, 2020 at 04:28:16PM +0100, Thomas Monjalon wrote: >>>> 09/11/2020 15:55, Ferruh Yigit: >>>>> 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 >>>> >>>> It was not my conclusion. >>>> I think we can just reset all env vars. >>>> >>> >>> Perhaps, but I think that may cause more problems for people who want >>> custom CFLAGS and LDFLAGS for building with extra 3rd-party packages. >>> While this can be done using the config script that is sourced in, I >>> suspect most of us do not use such a script. >>> >>> Therefore I'd suggest rather than clearing the env vars globally, we just >>> override them temporarily for the 32-bit, using CFLAGS32, LDFLAGS32, >>> PKG_CONFIG_PATH32 instead. That allows someone to have a 32-bit and 64-bit >>> version of e.g. libbpf installed, with a PKG_CONFIG_PATH pointing to each. >> >> So you want to duplicate all vars just to avoid writing them cleanly in a file? >> And what happens for other targets? >> >> I'm tending to nack this approach. >> There is no problem in using a clean config file. >> > Well, when you put it that way :-) > However, I was only thinking of the 3 variables above, though really it's > only the PKG_CONFIG_PATH that is going to be the most likely culprit, so > supporting just one extra var "PKG_CONFIG_PATH_32" seems reasonable. > > I'm also ok with your solution of just clearing the environment and relying > on a config file too, though. > I was worried for any side affects to reset the var, this is smaller change to change only 'CUSTOM_PKG_CONFIG_PATH' for 'build-32b' I can send a new version to reset 'CUSTOM_PKG_CONFIG_PATH', what is the intention/plan with the config file?