Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dpdk build error
Found ninja-1.7.2 at /usr/bin/ninja
+ ninja -C build
ninja: Entering directory `build'
[1415/1451] Linking target drivers/librte_compress_isal.so.21.0.
FAILED: drivers/librte_compress_isal.so.21.0
cc -o drivers/librte_compress_isal.so.21.0 'drivers/drivers@@rte_compress_isal@sha/meson-generated_.._rte_compress_isal.pmd.c.o' 'drivers/drivers@@tmp_rte_compress_isal@sta/compress_isal_isal_compress_pmd.c.o' 'drivers/drivers@@tmp_rte_compress_isal@sta/compress_isal_isal_compress_pmd_ops.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_compress_isal.so.21 -Wl,--no-as-needed -pthread -lm -ldl -lnuma lib/librte_compressdev.so.21.0 lib/librte_eal.so.21.0 lib/librte_kvargs.so.21.0 lib/librte_telemetry.so.21.0 lib/librte_mbuf.so.21.0 lib/librte_mempool.so.21.0 lib/librte_ring.so.21.0 drivers/librte_bus_vdev.so.21.0 -Wl,--end-group -Wl,--version-script=/home/tanabarr/projects/daos-dpdk-20_11/_topdir/BUILD/dpdk-20.11/drivers/compress/isal/version.map '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home/tanabarr/projects/daos-dpdk-20_11/_topdir/BUILD/dpdk-20.11/build/lib:/home/tanabarr/projects/daos-dpdk-20_11/_topdir/BUILD/dpdk-20.11/build/drivers
drivers/drivers@@tmp_rte_compress_isal@sta/compress_isal_isal_compress_pmd.c.o: In function `isal_comp_pmd_enqueue_burst':
isal_compress_pmd.c:(.text+0x212): undefined reference to `isal_inflate_init'
isal_compress_pmd.c:(.text+0x2fa): undefined reference to `isal_inflate'
isal_compress_pmd.c:(.text+0x5a0): undefined reference to `isal_deflate_init'
isal_compress_pmd.c:(.text+0x6d4): undefined reference to `isal_deflate'
isal_compress_pmd.c:(.text+0x7aa): undefined reference to `isal_deflate_set_hufftables'
isal_compress_pmd.c:(.text+0x984): undefined reference to `isal_deflate_set_hufftables'
isal_compress_pmd.c:(.text+0x9db): undefined reference to `isal_deflate_stateless'
isal_compress_pmd.c:(.text+0xa5b): undefined reference to `isal_inflate_stateless'
collect2: error: ld returned 1 exit status
[1422/1451] Compiling C object 'drivers/drivers@@tmp_rte_net_mlx5@sta/net_mlx5_mlx5_rxtx.c.o'.
ninja: build stopped: subcommand failed.
error: Bad exit status from /var/tmp/rpm-tmp.gFavmY (%build)
@yuan-luo

This comment has been minimized.

Copy link

@yuan-luo yuan-luo commented Feb 15, 2021

I fixed this issue, it is due to nasm version is 2.13, but isa-l needs nasm 2.14. So I installed nasm 2.14 and rebuild isa-l in dpdk.
Everything works fine now.
...
gcc -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -fvisibility=hidden -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -fvisibility=hidden -o nasm asm/nasm.o libnasm.a
gcc -c -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -fvisibility=hidden -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o disasm/ndisasm.o disasm/ndisasm.c
gcc -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -fvisibility=hidden -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -fvisibility=hidden -o ndisasm disasm/ndisasm.o libnasm.a
mkdir -p /usr/bin
/usr/bin/install -c nasm /usr/bin/nasm
/usr/bin/install -c ndisasm /usr/bin/ndisasm
mkdir -p /usr/share/man/man1
/usr/bin/install -c -m 644 ./nasm.1 /usr/share/man/man1/nasm.1
/usr/bin/install -c -m 644 ./ndisasm.1 /usr/share/man/man1/ndisasm.1

root@yuan-ubuntu18:/tools/nasm-2.14# nasm -v
NASM version 2.14 compiled on Feb 15 2021

=====================================
root@yuan-ubuntu18:/spdk# ./build/examples/hello_world
[2021-02-15 20:57:25.603029] Starting SPDK v21.04-pre git sha1 48aed8a57 / DPDK 20.11.0 initialization...
[2021-02-15 20:57:25.603125] [ DPDK EAL parameters: [2021-02-15 20:57:25.603161] hello_world [2021-02-15 20:57:25.603195] -c 0x1 [2021-02-15 20:57:25.603217] --log-level=lib.eal:6 [2021-02-15 20:57:25.603249] --log-level=lib.cryptodev:5 [2021-02-15 20:57:25.603274] --log-level=user1:6 [2021-02-15 20:57:25.603308] --iova-mode=pa [2021-02-15 20:57:25.603327] --base-virtaddr=0x200000000000 [2021-02-15 20:57:25.603359] --match-allocations [2021-02-15 20:57:25.603379] --file-prefix=spdk0 [2021-02-15 20:57:25.603411] --proc-type=auto [2021-02-15 20:57:25.603433] ]
EAL: No available hugepages reported in hugepages-1048576kB
EAL: No legacy callbacks, legacy socket not created
Initializing NVMe Controllers
Attaching to 0000:03:00.0
Attached to 0000:03:00.0
Using controller VMware Virtual NVMe (VMWare NVME-0000 ) with 1 namespaces.
Namespace ID: 1 size: 53GB
Initialization complete.
INFO: using host memory buffer for IO
Hello world!
[2021-02-15 20:57:35.780005] nvme_ctrlr.c: 981:nvme_ctrlr_shutdown_poll_async: ERROR: ctrlr 0000:03:00.0 did not shutdown within 10000 milliseconds
[2021-02-15 20:57:35.780155] nvme_ctrlr.c: 983:nvme_ctrlr_shutdown_poll_async: ERROR: likely due to shutdown handling in the VMWare emulated NVMe SSD

@yuan-luo

This comment has been minimized.

Copy link

@yuan-luo yuan-luo commented Apr 13, 2021

I used nasm 2.14.2, but still encountered this error. Any idea?

yluo@ubuntu:~/spdk/dpdk/build$ nasm -v
NASM version 2.14.02

yluo@ubuntu:~/spdk/dpdk/build$ ninja
[2/44] Linking target drivers/librte_pmd_isal.so.20.0.3
FAILED: drivers/librte_pmd_isal.so.20.0.3 
cc  -o drivers/librte_pmd_isal.so.20.0.3 drivers/librte_pmd_isal.so.20.0.3.p/meson-generated_.._rte_pmd_isal.pmd.c.o drivers/libtmp_rte_pmd_isal.a.p/compress_isal_isal_compress_pmd.c.o drivers/libtmp_rte_pmd_isal.a.p/compress_isal_isal_compress_pmd_ops.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_pmd_isal.so.20.0 -Wl,--no-as-needed -pthread -lm -ldl -lnuma '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home/yluo/spdk/dpdk/build/lib -Wl,-rpath-link,/home/yluo/spdk/dpdk/build/drivers lib/librte_compressdev.so.20.0.3 lib/librte_eal.so.20.0.3 lib/librte_kvargs.so.20.0.3 lib/librte_telemetry.so.20.0.3 lib/librte_mbuf.so.20.0.3 lib/librte_mempool.so.20.0.3 lib/librte_ring.so.20.0.3 drivers/librte_bus_vdev.so.20.0.3 -Wl,--end-group -Wl,--version-script=/home/yluo/spdk/dpdk/drivers/compress/isal/rte_pmd_isal_version.map
/usr/bin/ld: drivers/libtmp_rte_pmd_isal.a.p/compress_isal_isal_compress_pmd.c.o: in function `isal_comp_pmd_enqueue_burst':
isal_compress_pmd.c:(.text+0xd17): undefined reference to `isal_deflate_init'
/usr/bin/ld: isal_compress_pmd.c:(.text+0xe8c): undefined reference to `isal_deflate'
/usr/bin/ld: isal_compress_pmd.c:(.text+0xf33): undefined reference to `isal_inflate_init'
/usr/bin/ld: isal_compress_pmd.c:(.text+0x1025): undefined reference to `isal_inflate'
/usr/bin/ld: isal_compress_pmd.c:(.text+0x1260): undefined reference to `isal_deflate_set_hufftables'
/usr/bin/ld: isal_compress_pmd.c:(.text+0x12b3): undefined reference to `isal_deflate_stateless'
/usr/bin/ld: isal_compress_pmd.c:(.text+0x13d4): undefined reference to `isal_inflate_stateless'
/usr/bin/ld: isal_compress_pmd.c:(.text+0x1418): undefined reference to `isal_deflate_set_hufftables'
collect2: error: ld returned 1 exit status
[7/44] Compiling C object drivers/libtmp_rte_pmd_qat.a.p/crypto_qat_qat_sym_session.c.o
ninja: build stopped: subcommand failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment