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 033ADA0527; Mon, 9 Nov 2020 14:51:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C293C5B30; Mon, 9 Nov 2020 14:51:25 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5E6755AB8 for ; Mon, 9 Nov 2020 14:51:24 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0B4F45C0347; Mon, 9 Nov 2020 08:51:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 09 Nov 2020 08:51:23 -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= Wm/D43e1Mdhj1vcfmgfKU+QYSVMPMqZmDy8xbmHd0sg=; b=qFebuGmNHVRbJh8F /r/CBb8tQ0vzU2gzKvyNp8f8ccNW+o11ZYYxBeNgI7Qpv3X9a5pCuhbCkgpQKUig VpFR8tI2EJsgRgPb619XSCIkqfJen6FlFwv2Aue2YgPds2lXmXIR7neLmJggGJEp bnPBRaDmmI/0EZ6Puzpo/wiJKHbVG+7H2kaYeCji/8OwfcS5AtAOtEYX+SFvpbKE 1DBP1YVndpA7SB1b8PcsE/BboblOFtD2L4MIcqLYqbVYSJcU0Xvm3M4N4vKPB7Qb Uy8TVXtkjAAdQ0TA6FTLOrdrq9hB6AAtSCBPa8fVW1DimlbkPIVEu4z9yHevefF5 aZHh7w== 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=Wm/D43e1Mdhj1vcfmgfKU+QYSVMPMqZmDy8xbmHd0 sg=; b=DyVy55P+Gd/kH9aYGTm+P9Q7CHgl+i1/w++zcW7qih20w8wCk6n9/aLMg 8Ova7mqgEtO4tC7CJHuD9AFBdW8Zna+0JDBQhnGhiAy/7/c7SfDzAoTVOreEIFhf YSB6CzkIR9+fzk8tP1iEmZoVGpY6k9CUrs8XjtYqyc2sR25g31ZqiUT9R6h7VZMP vf/G+BGHuCj5VYvgENGknmnCOPlUmoDuYG4th8Y2WMy2+/Y3tvZaZH7Cvmy5dH6s dhg0iLJldZ7XeBEIN8+VtblSc3UivPbMGyznvcYiNtTytAgotQ3ke8PhN6g9sItG EqKk6AO04kRxwznddW91MM8SluvmQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudduhedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C0A283280068; Mon, 9 Nov 2020 08:51:21 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit , Bruce Richardson Cc: dev@dpdk.org, david.marchand@redhat.com Date: Mon, 09 Nov 2020 14:51:20 +0100 Message-ID: <107452781.OxjIhUcIOi@thomas> In-Reply-To: <20201109133531.GF831@bricha3-MOBL.ger.corp.intel.com> References: <20201109130035.3948462-1-ferruh.yigit@intel.com> <2174e33f-d158-a8ef-ad1a-967688659815@intel.com> <20201109133531.GF831@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] 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" 09/11/2020 14:35, Bruce Richardson: > 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. Not sure what is best. The idea of saving the env vars is to consider what the user set for one run, not in the config file: default_path=$PATH default_pkgpath=$PKG_CONFIG_PATH default_cppflags=$CPPFLAGS default_cflags=$CFLAGS default_ldflags=$LDFLAGS Do you want to change this assumption to ignore all environment vars? Should we save PATH at least? Do we set every variables inside the configuration file? I tend to think that it may be safer to avoid influence of the env and have a self-contained config file. So I would add PATH=/usr/bin at the beginning of my config file.