Hello, I'm having trouble compiling the dpdk plugin using vpp 19.01.1 and dpdk 18.01. I'm using yocto with glibc 2.27. It fails to link in the glibc functions that libdpdk uses:
/home/jonathar/work/yocto/poky/build/tmp/work/aarch64-poky-linux/vpp/19.01 .1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch 64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld: /home/jonathar/work/yocto/poky/build/tmp/work/aarch64-poky-linux/vpp/19.01 .1-r0/recipe-sysroot/usr/lib64/librte_bus_dpaa.a(of.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `versionsort@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC I'm wondering why the link option whole-archive is being used to pull in all symbols instead of letting the linker resolve what's needed and link statically: set(DPDK_LINK_FLAGS "-L${DPDK_LIB_DIR} -Wl,--whole-archive,${DPDK_LIB},--no-whole-archive") libdpdk is a GROUP so it should let the linker resolve the required symbols. I changed the line to: set(DPDK_LINK_FLAGS "-Wl,-Bstatic -L${DPDK_LIB_DIR} -Wl,-ldpdk -Wl,-Bdynamic") But when loading dpdk plugin at runtime it says it can't find the symbol below: load_one_plugin:145: /usr/lib64/vpp_plugins/dpdk_plugin.so: undefined symbol: rte_pktmbuf_init load_one_plugin:146: Failed to load plugin 'dpdk_plugin.so' Is this due to the way the plugin is loaded? I'll try changing dpdk to dynamic linking. If I do readelf -a on the plugin I see: Relocation section '.rela.dyn' at offset 0x4448 contains 369 entries: Offset Info Type Sym. Value Sym. Name + Addend 00000004cde0 003100000401 R_AARCH64_GLOB_DA 0000000000000000 rte_pktmbuf_init + 0 The decoding of unwind sections for machine type AArch64 is not currently supported. Symbol table '.dynsym' contains 341 entries: Num: Value Size Type Bind Vis Ndx Name 49: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND rte_pktmbuf_init Symbol table '.symtab' contains 882 entries: Num: Value Size Type Bind Vis Ndx Name 606: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND rte_pktmbuf_init Thanks, Jon
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13450): https://lists.fd.io/g/vpp-dev/message/13450 Mute This Topic: https://lists.fd.io/mt/32312159/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-