Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
308 views
in Technique[技术] by (71.8m points)

dpdk - testpmd fails to run because librte_pmd_bond.so is missing

I have built and installed DPDK v.18.11.9 on Centos 7 using x86_64-native-linuxapp-gcc and option:

CONFIG_RTE_BUILD_SHARED_LIB=y

We want to run testpmd but it fails to load:

$ ./x86_64-native-linuxapp-gcc/app/testpmd

./x86_64-native-linuxapp-gcc/app/testpmd: error while loading shared
libraries: librte_pmd_bond.so.2.1: cannot open shared object file: No such file or directory

This is expected as lib/ does not contain librte_pmd_bond.so.

What build options should I use to build this library?

Best regards David

question from:https://stackoverflow.com/questions/65884274/testpmd-fails-to-run-because-librte-pmd-bond-so-is-missing

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is a common error when one forgets to point the application elf the path for libraries. When DPDK libraries are built with shared mode, one has to specify the path to dpdk shared object via LD_LIBRARY_PATH. In failing to do so we get

# ldd app/testpmd
        linux-vdso.so.1 (0x00007fff3eeb2000)
        librte_pmd_bond.so.2.1 => not found
        librte_pmd_dpaa.so.1.1 => not found
        librte_pmd_ixgbe.so.2.1 => not found
        librte_pmd_i40e.so.2.1 => not found
        librte_pmd_bnxt.so.2.1 => not found
        librte_pmd_softnic.so.1.1 => not found
        librte_pdump.so.2.1 => not found
        librte_metrics.so.1.1 => not found
        librte_bitratestats.so.2.1 => not found
        librte_latencystats.so.1.1 => not found
        librte_bpf.so.1.1 => not found
        librte_gro.so.1.1 => not found
        librte_gso.so.1.1 => not found
        librte_mbuf.so.4.1 => not found
        librte_net.so.1.1 => not found
        librte_ethdev.so.11.1 => not found
        librte_mempool.so.5.1 => not found
        librte_ring.so.2.1 => not found
        librte_eal.so.9.1 => not found
        librte_cmdline.so.2.1 => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1474089000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1473c98000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f14745cf000)

Thereby running the application we get

 # ./app/testpmd
./app/testpmd: error while loading shared libraries: librte_pmd_bond.so.2.1: cannot open shared object file: No such file or directory

To fix the error, as mentioned above use

export LD_LIBRARY_PATH=[path to dpdk shared libraries]

this resolves the dependencies and application runs.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...