DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] devtools: fix 32-bits build
@ 2020-11-09 13:00 Ferruh Yigit
  2020-11-09 13:19 ` Thomas Monjalon
  2020-11-09 14:55 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  0 siblings, 2 replies; 17+ messages in thread
From: Ferruh Yigit @ 2020-11-09 13:00 UTC (permalink / raw)
  To: dev, Bruce Richardson, Thomas Monjalon; +Cc: 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.

To fix updating 'PKG_CONFIG_PATH' and preventing 'load_env' overwrite
it.

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>

'build-32b' check inside the 'load_env' looks ugly but not sure how to
be sure 'PKG_CONFIG_PATH' set correct.
---
 devtools/test-meson-builds.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 0c95d1cc98..9e44359398 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -53,7 +53,9 @@ load_env () # <target compiler>
 {
 	targetcc=$1
 	export PATH=$default_path
-	export PKG_CONFIG_PATH=$default_pkgpath
+	if [ "$targetdir" != "build-32b" ] ; then
+		export PKG_CONFIG_PATH=$default_pkgpath
+	fi
 	export CPPFLAGS=$default_cppflags
 	export CFLAGS=$default_cflags
 	export LDFLAGS=$default_ldflags
@@ -226,10 +228,12 @@ if check_cc_flags '-m32' ; then
 		# 32-bit pkgconfig on RHEL/Fedora (lib vs lib64)
 		export PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig'
 	fi
+	export PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
 	target_override='i386-pc-linux-gnu'
 	build build-32b cc -Dc_args='-m32' -Dc_link_args='-m32'
 	target_override=
 	unset PKG_CONFIG_LIBDIR
+	unset PKG_CONFIG_PATH
 fi
 
 # x86 MinGW
-- 
2.26.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-11-11 12:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 13:00 [dpdk-dev] [PATCH] devtools: fix 32-bits build Ferruh Yigit
2020-11-09 13:19 ` Thomas Monjalon
2020-11-09 13:24   ` Ferruh Yigit
2020-11-09 13:35     ` Bruce Richardson
2020-11-09 13:51       ` Thomas Monjalon
2020-11-09 14:55 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-11-09 15:28   ` Thomas Monjalon
2020-11-09 15:44     ` Bruce Richardson
2020-11-09 16:14       ` Thomas Monjalon
2020-11-09 16:19         ` Bruce Richardson
2020-11-09 16:48           ` Ferruh Yigit
2020-11-09 17:01             ` Thomas Monjalon
2020-11-09 17:15               ` Ferruh Yigit
2020-11-09 17:20                 ` Thomas Monjalon
2020-11-09 17:44                   ` Thomas Monjalon
2020-11-09 21:02                     ` Thomas Monjalon
2020-11-11 12:34                       ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).