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 79BF2A0527;
	Mon,  9 Nov 2020 14:24:39 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id EFA3D5AB8;
	Mon,  9 Nov 2020 14:24:37 +0100 (CET)
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 59BEF5953
 for <dev@dpdk.org>; Mon,  9 Nov 2020 14:24:34 +0100 (CET)
IronPort-SDR: 3CUKOX6GkLLNcwKNuo46XF6O2+pxRQ9Gioga7PiOI00YIwMIxBvXd2dYVJcbpL35g7/AJ8VaoP
 EMX1yInKZ1MQ==
X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="149648231"
X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="149648231"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 09 Nov 2020 05:24:33 -0800
IronPort-SDR: Ka9tcLgdRYwVhajXnQTnHO3anaMG9HDWoKBf9aH4cuRAvbFNaEx9BCeJrwcahmvMCBEzkyxxLm
 kePnP/nO8q2Q==
X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="530735050"
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 05:24:32 -0800
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
 david.marchand@redhat.com
References: <20201109130035.3948462-1-ferruh.yigit@intel.com>
 <3243789.yRO6XYygMt@thomas>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <2174e33f-d158-a8ef-ad1a-967688659815@intel.com>
Date: Mon, 9 Nov 2020 13:24:28 +0000
MIME-Version: 1.0
In-Reply-To: <3243789.yRO6XYygMt@thomas>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
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 <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>

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.