DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] meson: wrong dependency in cross compilation on ARM
@ 2020-12-21 12:19 Hemant Agrawal
  2020-12-21 14:04 ` Bruce Richardson
  0 siblings, 1 reply; 13+ messages in thread
From: Hemant Agrawal @ 2020-12-21 12:19 UTC (permalink / raw)
  To: dev

Hi,
                I am trying to cross compile DPDK for arm64 on a ubuntu machine, which has a zlib pre-installed for native env.

I am encountering following build error in net_bnx2x as it has dependency on zlib.  It is trying to link with x86 arch based zlib.

Cross compiling zlib and setting the PKG_CONFIG_PATH solve the issue. But, Is their an easy way to disable these dependencies?



b10814@dpdk-xeon:~/dpdk-up$ meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc
Configuration found that :
Run-time dependency zlib found: YES 1.2.11
(NOTE: it seems meson is detecting the default x86 based zlib for linking)

Note that this machine has ARM tool chain installed by Ubuntu
sudo apt-get install gcc-aarch64-linux-gnu

b10814@dpdk-xeon:~/dpdk-up$ ninja -C arm-build
ninja: Entering directory `arm-build'
[1289/2375] Linking target drivers/librte_net_bnx2x.so.21.1
FAILED: drivers/librte_net_bnx2x.so.21.1
aarch64-linux-gnu-gcc  -o drivers/librte_net_bnx2x.so.21.1 drivers/librte_net_bnx2x.so.21.1.p/meson-generated_.._rte_net_bnx2x.pmd.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_ethdev.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_rxtx.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_stats.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_vfpf.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_ecore_sp.c.o drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_elink.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_net_bnx2x.so.21 -Wl,--no-as-needed -pthread -lm -ldl lib/librte_ethdev.so.21.1 lib/librte_eal.so.21.1 lib/librte_kvargs.so.21.1 lib/librte_telemetry.so.21.1 lib/librte_net.so.21.1 lib/librte_mbuf.so.21.1 lib/librte_mempool.so.21.1 lib/librte_ring.so.21.1 lib/librte_meter.so.21.1 drivers/librte_bus_pci.so.21.1 lib/librte_pci.so.21.1 drivers/librte_bus_vdev.so.21.1 -Wl,--version-script=/home/b10814/dpdk-up/drivers/net/bnx2x/version.map /usr/lib/x86_64-linux-gnu/libz.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home/b10814/dpdk-up/arm-build/lib -Wl,-rpath-link,/home/b10814/dpdk-up/arm-build/drivers
/usr/lib/x86_64-linux-gnu/libz.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
[1314/2375] Compiling C object drivers/net/ice/base/libice_base.a.p/ice_switch.c.o
ninja: build stopped: subcommand failed.


Regards,
Hemant


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

end of thread, other threads:[~2021-01-22 12:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 12:19 [dpdk-dev] meson: wrong dependency in cross compilation on ARM Hemant Agrawal
2020-12-21 14:04 ` Bruce Richardson
2020-12-21 14:28   ` Hemant Agrawal
2020-12-21 14:47     ` Bruce Richardson
2021-01-22 10:20     ` Juraj Linkeš
2021-01-15 18:40   ` Ferruh Yigit
2021-01-18 10:51     ` Bruce Richardson
2021-01-18 11:58       ` Ferruh Yigit
2021-01-18 12:05         ` Ferruh Yigit
2021-01-18 12:16           ` Ferruh Yigit
2021-01-18 13:29             ` Bruce Richardson
2021-01-22 12:47             ` Hemant Agrawal
2021-01-18 13:28         ` Bruce Richardson

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git