Issue with version DOCA when compile Sample

Hi there,

I’m encountering an issue when attempting to compile a sample project. The linker is attempting to link to version 22 and 23 simultaneously.

I’m trying to remove the files associated with version 22, but the application is unable to compile.

The project is using DOCA 3.1 and BF-2.

root@localhost:/opt/mellanox/doca/samples/doca_flow/flow_fwd_target# meson /tmp/build
The Meson build system
Version: 0.61.2
Source dir: /opt/mellanox/doca/samples/doca_flow/flow_fwd_target
Build dir: /tmp/build
Build type: native build
Program cat found: YES (/usr/bin/cat)
Project name: DOCA_SAMPLE
Project version: 3.1.0105
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency doca-common found: YES 3.1.0105
Run-time dependency doca-flow found: YES 3.1.0105
Run-time dependency doca-dpdk-bridge found: YES 3.1.0105
Run-time dependency doca-argp found: YES 3.1.0105
Run-time dependency libdpdk found: YES 21.11.9
Build targets in project: 1

Found ninja-1.10.1 at /usr/bin/ninja
root@localhost:/opt/mellanox/doca/samples/doca_flow/flow_fwd_target# ninja -C /tmp/build
ninja: Entering directory `/tmp/build'
[6/6] Linking target doca_flow_fwd_target
/usr/bin/ld: warning: librte_mempool.so.23, needed by /opt/mellanox/doca/lib/aarch64-linux-gnu/libdoca_flow.so, may conflict with librte_mempool.so.22
/usr/bin/ld: warning: librte_eal.so.23, needed by /opt/mellanox/doca/lib/aarch64-linux-gnu/libdoca_flow.so, may conflict with librte_eal.so.22
/usr/bin/ld: warning: librte_ethdev.so.23, needed by /opt/mellanox/doca/lib/aarch64-linux-gnu/libdoca_dpdk_bridge.so, may conflict with librte_ethdev.so.22
/usr/bin/ld: warning: librte_net.so.23, needed by /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ethdev.so.23, may conflict with librte_net.so.22
/usr/bin/ld: warning: librte_mbuf.so.23, needed by /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ethdev.so.23, may conflict with librte_mbuf.so.22
root@localhost:/opt/mellanox/doca/samples/doca_flow/flow_fwd_target# ldd /tmp/build/doca_flow_fwd_target | grep rte
	librte_ethdev.so.22 => /lib/aarch64-linux-gnu/librte_ethdev.so.22 (0x0000ffff7e7a0000)
	librte_net.so.22 => /lib/aarch64-linux-gnu/librte_net.so.22 (0x0000ffff7e780000)
	librte_mbuf.so.22 => /lib/aarch64-linux-gnu/librte_mbuf.so.22 (0x0000ffff7e760000)
	librte_mempool.so.22 => /lib/aarch64-linux-gnu/librte_mempool.so.22 (0x0000ffff7e740000)
	librte_eal.so.22 => /lib/aarch64-linux-gnu/librte_eal.so.22 (0x0000ffff7e620000)
	librte_mempool.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_mempool.so.23 (0x0000ffff7e040000)
	librte_eal.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_eal.so.23 (0x0000ffff7df20000)
	librte_ethdev.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ethdev.so.23 (0x0000ffff7c600000)
	librte_net_mlx5.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_net_mlx5.so.23 (0x0000ffff7c410000)
	librte_kvargs.so.22 => /lib/aarch64-linux-gnu/librte_kvargs.so.22 (0x0000ffff7c3a0000)
	librte_telemetry.so.22 => /lib/aarch64-linux-gnu/librte_telemetry.so.22 (0x0000ffff7c380000)
	librte_ring.so.22 => /lib/aarch64-linux-gnu/librte_ring.so.22 (0x0000ffff7c360000)
	librte_meter.so.22 => /lib/aarch64-linux-gnu/librte_meter.so.22 (0x0000ffff7c340000)
	librte_kvargs.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_kvargs.so.23 (0x0000ffff7c170000)
	librte_telemetry.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_telemetry.so.23 (0x0000ffff7c150000)
	librte_ring.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ring.so.23 (0x0000ffff7c130000)
	librte_ip_frag.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ip_frag.so.23 (0x0000ffff7c110000)
	librte_net.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_net.so.23 (0x0000ffff7c0f0000)
	librte_mbuf.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_mbuf.so.23 (0x0000ffff7c0d0000)
	librte_hash.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_hash.so.23 (0x0000ffff7c0a0000)
	librte_rcu.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_rcu.so.23 (0x0000ffff7c080000)
	librte_meter.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_meter.so.23 (0x0000ffff7c060000)
	librte_bus_pci.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_bus_pci.so.23 (0x0000ffff7c040000)
	librte_pci.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_pci.so.23 (0x0000ffff7c020000)
	librte_bus_vdev.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_bus_vdev.so.23 (0x0000ffff7c000000)
	librte_common_mlx5.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_common_mlx5.so.23 (0x0000ffff7bfb0000)
	librte_bus_auxiliary.so.23 => /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_bus_auxiliary.so.23 (0x0000ffff7bf90000)
root@localhost:/opt/mellanox/doca/samples/doca_flow/flow_fwd_target# 

How can solve?

I made some changes compile but no can’t run


root@localhost:~# /tmp/build/doca_flow_fwd_target

Segmentation fault (core dumped)

root@localhost:~# ls -lh core*

ls: cannot access 'core*': No such file or directory

root@localhost:~# sudo sh -c "echo '/tmp/core.%e.%p' > /proc/sys/kernel/core_pattern"

root@localhost:~# /tmp/build/doca_flow_fwd_target

Segmentation fault (core dumped)

root@localhost:~# gdb /tmp/build/doca_flow_fwd_target /tmp/core.doca_flow_fwd_target.<pid>

bash: syntax error near unexpected token `newline'

root@localhost:~# ls -lh /tmp/core.*

-rw------- 1 root root 28M Oct 28 01:56 /tmp/core.doca_flow_fwd_t.1097092

root@localhost:~#

root@localhost:~# gdb /tmp/build/doca_flow_fwd_target /tmp/core.doca_flow_fwd_t.1097092

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1

Copyright (C) 2022 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

Type "show copying" and "show warranty" for details.

This GDB was configured as "aarch64-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<https://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

    <http://www.gnu.org/software/gdb/documentation/>.



For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from /tmp/build/doca_flow_fwd_target...

[New LWP 1097092]

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Core was generated by `/tmp/build/doca_flow_fwd_target'.

Program terminated with signal SIGSEGV, Segmentation fault.

#0  0x0000ffffa0fd9f20 in eth_dev_init_cb_lists () from /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ethdev.so.23

(gdb) bt

#0  0x0000ffffa0fd9f20 in eth_dev_init_cb_lists () from /opt/mellanox/dpdk/lib/aarch64-linux-gnu/librte_ethdev.so.23

#1  0x0000ffffa43f5624 in call_init (env=0xffffd591f3e8, argv=0xffffd591f3d8, argc=1, l=<optimized out>) at ./elf/dl-init.c:70

#2  call_init (l=<optimized out>, argc=1, argv=0xffffd591f3d8, env=0xffffd591f3e8) at ./elf/dl-init.c:26

#3  0x0000ffffa43f572c in _dl_init (main_map=0xffffa442d370, argc=1, argv=0xffffd591f3d8, env=0xffffd591f3e8) at ./elf/dl-init.c:117

#4  0x0000ffffa4407cc8 in _dl_start_user () from /lib/ld-linux-aarch64.so.1

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb) quit