From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 176F3A0527;
	Mon,  9 Nov 2020 17:14:31 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 3E3426947;
	Mon,  9 Nov 2020 17:14:29 +0100 (CET)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com
 [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 1E48F5F18
 for <dev@dpdk.org>; Mon,  9 Nov 2020 17:14:28 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 5D3565C0498;
 Mon,  9 Nov 2020 11:14:26 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 09 Nov 2020 11:14:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm2; bh=
 9I9hPKsvHXVcuy6X4Ui4I04S3uhMi4cy2ROO3CxRCh8=; b=X4+rSINVKv8gNOXi
 x0EIBEH4QLHQwsj0SKHwUP8cxif5K0rvTlL78B6OGKXcF945G0FZRhtuPufX4dVB
 idODFEBII6CGfEL2JzocX75Yk74p3FCPMRAkhL7NjUVaKXz7wKdAB6XPC+YYgYQX
 6neJfyru5tJPfOeMqrGzynZhTVAGqPKwxq+VexLVhqakU1pE7AZFYCupow3MfGCD
 AP+ibvZIlxnE2sQZ4sFS1T5PBjCVjonweNuQ4Sk3+jIqgY4or9QqnCdtX1TJsxMD
 3Y0VjpoY0xfOGO1yuyekpjyK3jp956SmxpmrlzhuEJV4zmyaz5f1/dilvyFg3HFc
 hszaWg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=9I9hPKsvHXVcuy6X4Ui4I04S3uhMi4cy2ROO3CxRC
 h8=; b=d+ZEh80PqQmzbmLozjkMvUbj6+FtES6KyyHLSNet1O27bBa42EpJtFqXn
 4z1rOfHFTh4axBNCtz7lPEtdKUkYVAKjuTNhCMyZuQFpzHain04F+KDXuKd6N6U2
 NqcCuk9KbgtDfYR7USHLS4KDQ72jwLRSYanfctf6j2kv6dHv1QGKquyuHHoFIgyT
 bmQneBCdxJVjMwjwas+/r6RkD5Puemd7yUrDhQlQhvsELU+gaMn4u50WQzJVNobn
 +3Kenqp+ZY2mjPo0E2nBcyWnnLdpMJ3zvZG7RlhZGACjxRj04+Y4wMlEbUOvMIFU
 z74p5e5AAlnDtG0xhB/htXAyu/vlw==
X-ME-Sender: <xms:4WqpX5ap17il3bWzVotcCsAxeKud-khDRBm5ESWzA985eFIOntrsvQ>
 <xme:4WqpXwYVbiiPkz3UX82jvGSLCBDJb5LwpJoifDoTY1BzJqH90beUCsYSQ9eg4Wm0M
 ulDt3PjBRfE1RBPrg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudduhedgkeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu
 ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf
 hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl
 ohhnrdhnvght
X-ME-Proxy: <xmx:4WqpX7-vqqpHows_FyLn0W1dtVP3CcTyHtxh8aPGTzTFTVBclnWyqg>
 <xmx:4WqpX3raie-HqAHqRddcxbe8kWO934LeTPYxxWjGIfr-WtYmBWh0Ow>
 <xmx:4WqpX0pmt0iVLIwmQr3pW5zHT-3_7KdmGB_23lAA9ZKDqSuw-ujhbA>
 <xmx:4mqpXxD7b_SxYElOgpH-YUSetNd_wkmCYLUBKzWTk_Cczn0qJukY4A>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4F20A3280060;
 Mon,  9 Nov 2020 11:14:25 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev@dpdk.org,
 david.marchand@redhat.com
Date: Mon, 09 Nov 2020 17:14:24 +0100
Message-ID: <2525675.zXVb4LriKk@thomas>
In-Reply-To: <20201109154404.GH831@bricha3-MOBL.ger.corp.intel.com>
References: <20201109130035.3948462-1-ferruh.yigit@intel.com>
 <2070456.l6g01IXifr@thomas>
 <20201109154404.GH831@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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 <ferruh.yigit@intel.com>
> > > ---
> > > Cc: Bruce Richardson <bruce.richardson@intel.com>
> > > Cc: Thomas Monjalon <thomas@monjalon.net>
> > > 
> > > 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.