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 8515DA0527; Mon, 9 Nov 2020 18:45:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64C886CA9; Mon, 9 Nov 2020 18:44:59 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 36C206004 for ; Mon, 9 Nov 2020 18:44:57 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id DDE415C04A6; Mon, 9 Nov 2020 12:44:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 09 Nov 2020 12:44:55 -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= heoHcuyCHAi9PHbrtqp3GKEW/kbVVHSOYGBO3ZpSk00=; b=JhlIGJa8jc+BHH67 vGjr7QHXs+iWsBebDOTyreJNgFooU4LSGNuy5EbibgoMcBvh2EK6iecurqFPcslp /pySVtHGJn5WZxB7v+brx+Z0LSbJ2BPQtbfD3X5d8uq5W8W9wWe15u8ciJfvdzKz 7KenO4a4AvRFftLMmYFRahcfnGUC8znFjuuP2WQI+j6v4jqjJqHduYYgxvDeYS4t zoWxNF8XllDvanYOWWhOy3Epji1Hft8YFLceVsVGGgkkSUGi4cJMsqOPKJG/kAbF RXQ7FnDHbfASjoz4O7YPfPyd3K0haxdazN62MTcNutFA9NOn+ds7zfiIrockbNS+ tj6g4g== 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=heoHcuyCHAi9PHbrtqp3GKEW/kbVVHSOYGBO3ZpSk 00=; b=NpzUg9l6ix2fKYFyK7HJ4c/30Ey02Qo6/81lbZ5iAd8OgpYXl8ZmIOIgA JVaIf8LKcKquj63AbIQdhs50473S4j54TRSyM0TcOzHzCzpU3Z1XGeXxnOzMDk8E 5DATh/zLq93q5wtoiklLeJ1IX8h8K0EtHE0dIQXPnxu9W6UWMxcrTo60LcFnCIqs iG2UhCWXCNkfEBQLSUaBoBQnLCPilCxpo7SRCh6MjVW9C5yBBWUgGiDg5Hrak+T6 9LltdubVGfXU7WXUapiqQnF2L6OfFvOWmyEIE2+3WyN+FegJT8Dc4E1afy8HJtAx k6sTI+YaV14NAQXo3owl8ChrF6Kig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudduhedguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth 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 09F55306308A; Mon, 9 Nov 2020 12:44:54 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit Cc: Bruce Richardson , dev@dpdk.org, david.marchand@redhat.com Date: Mon, 09 Nov 2020 18:44:54 +0100 Message-ID: <2240726.PXfc15pV6C@thomas> In-Reply-To: <3526179.Ta2yc0qjKd@thomas> References: <20201109130035.3948462-1-ferruh.yigit@intel.com> <07886870-844e-ef22-912a-b945746e0c30@intel.com> <3526179.Ta2yc0qjKd@thomas> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 09/11/2020 18:20, Thomas Monjalon: > 09/11/2020 18:15, Ferruh Yigit: > > On 11/9/2020 5:01 PM, Thomas Monjalon wrote: > > > 09/11/2020 17:48, Ferruh Yigit: > > >> I can send a new version to reset 'CUSTOM_PKG_CONFIG_PATH', > > >> what is the intention/plan with the config file? > > > > > > You should use a config file to set PKG_CONFIG_PATH, PATH, > > > DPDK_MESON_OPTIONS, etc accordingly to build with all > > > your non-installed dependencies. > > > CUSTOM_PKG_CONFIG_PATH is a way to avoid using the config file > > > in a single case. > > > > > > > Either use 'PKG_CONFIG_PATH' environment variable or a config file, both has the > > same problem that we need two different pkg config path, one for 64bit and one > > for 32bit. > > No. In the config file, you can set the right value by testing $DPDK_TARGET. > Note: the config file is a shell script. > > > v2 of this patch provides a way to use correct one when needed. > > This is not a global fix. > > > Moving the default values from system environment or script hardcoded values to > > a config file is something else and can be done later, what do you think? > > The root cause of your issue is using variables from the environment. > The global fix is then to reset them all, > while keeping a default value for PATH which is not only for compilation config. This is what we have currently: export PATH=$default_path export PKG_CONFIG_PATH=$default_pkgpath export CPPFLAGS=$default_cppflags export CFLAGS=$default_cflags export LDFLAGS=$default_ldflags unset DPDK_MESON_OPTIONS The PATH needs to be restored at each run to avoid using a wrong toolchain. The default value is best taken from the start environment, at the condition no conflicting toolchain is already set. PKG_CONFIG_PATH is specific to each target. I believe it can be reset at each run and configured only from the config file. A default PKG_CONFIG_PATH for all targets does not make any sense. CPPFLAGS, CFLAGS and LDFLAGS could be used to customize some options applying to all targets in some build tests without touching the config file. DPDK_MESON_OPTIONS could be the same as CFLAGS: take a global default from env and restore the value at each run, so each target can have additional options from the config file. Reminder about what can be a config file loaded by devtools/load-devel-config: Note: the complex regexps below are for compatibility with the Make build tests. if echo $DPDK_TARGET | grep -q '^i[3-6]86' ; then export PKG_CONFIG_PATH=${mlxdep}32/lib/pkgconfig elif echo $DPDK_TARGET | grep -q '^x86_64-w' ; then # MinGW : elif echo $DPDK_TARGET | grep -q '^x86_64' ; then export DPDK_MESON_OPTIONS="enable_kmods=true" export CFLAGS="-I$aesnidep -I$root/libsso/libsso-snow3g-0.3.1/include -I$root/libsso/libsso-kasumi-0.3.1/include -I$root/libsso/libsso-zuc-0.1.1-182/include" export LDFLAGS="-L$aesnidep -L$root/libsso/libsso-snow3g-0.3.1/build -L$root/libsso/libsso-kasumi-0.3.1/build -L$root/libsso/libsso-zuc-0.1.1-182/build" export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$mlxdep/lib/pkgconfig:$nfbdep/lib64/pkgconfig:$szedep/lib64/pkgconfig:$isaldep/.. elif echo $DPDK_TARGET | grep -q '^arm-' ; then export PATH=$PATH:$root/../pkg/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin elif echo $DPDK_TARGET | grep -q '^a.*64-' ; then export DPDK_MESON_OPTIONS="lib_musdk_dir=$LIBMUSDK_PATH" elif echo $DPDK_TARGET | grep -q '^p.*pc.*64' ; then export PATH=$PATH:$root/../pkg/powerpc64le-power8--glibc--stable-2018.11-1/bin fi export DPDK_GETMAINTAINER_PATH=$root/linux/scripts/get_maintainer.pl export DPDK_CHECKPATCH_PATH=$root/linux/scripts/checkpatch.pl export DPDK_CHECKPATCH_LINE_LENGTH=100 export DPDK_CHECKPATCH_CODESPELL=$root/codespell/dictionary.txt export DPDK_BUILD_TEST_DIR=$root/dpdk-build export DPDK_ABI_REF_DIR=$DPDK_BUILD_TEST_DIR/abiref #export DPDK_ABI_REF_VERSION=v20.11