[dpdk-dev] Linker error on rte_dump_stack() on Windows

William Tu u9012063 at gmail.com
Mon Aug 9 04:30:21 CEST 2021


On Sun, Aug 8, 2021 at 12:52 PM Dmitry Kozlyuk <dmitry.kozliuk at gmail.com> wrote:
>
> 2021-08-08 10:45 (UTC-0700), William Tu:
> > Hi,
> >
> > While linking OVS to Windows DPDK library, static link to
> > librte_eal.a, we hit some error about rte_dump_stack().
> > I don't know why other symbols work, but only a couple symbols showed
> > errors here.
> > Any suggestions about how to debug/fix this? Thank you!
> >
> > [5/15] Linking target utilities/ovs-vsctl.exeFAILED:
> > utilities/ovs-vsctl.exe"clang"  -Wl,/MACHINE:X64
> > -Wl,/OUT:utilities/ovs-vsctl.exe
> > utilities/ovs-vsctl.exe.p/ovs-vsctl.c.obj "-Wl,/nologo" "-Wl,/release"
> > "-Wl,/nologo" "-Wl,/OPT:REF" "lib\libopenvswitch.a"
> > "-Wl,--no-undefined" "C:/dpdk/install/lib/librte_eal.a"
> > "C:/dpdk/install/lib/librte_ethdev.a"
> > "C:/dpdk/install/lib/librte_mempool.a"
> > "C:/dpdk/install/lib/librte_mbuf.a"
> > "C:/dpdk/install/lib/librte_meter.a""C:/dpdk/install/lib/librte_telemetry.a"
> > "C:/dpdk/install/lib/librte_kvargs.a"
> > "C:/PTHREADS-BUILT/lib/libpthreadVC3.lib" "-lWs2_32" "-lWbemUuid"
> > "-lShlwapi" "-lIphlpapi" "-Wl,/SUBSYSTEM:CONSOLE" "-lkernel32"
> > "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32"
> > "-luuid" "-lcomdlg32" "-ladvapi32"
> > LINK : warning LNK4044: unrecognized option '/-no-undefined'; ignored
> > librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved
> > external symbol __imp_SymInitialize referenced in function
> > rte_dump_stack
>
> Hi William,
>
> `rte_dump_stack()` implementation requires linking DbgHelp system library.
> There are other required libraries, see `add_project_link_arguments()` in
> `config/meson.build`.

Thanks, pass linking stage now.

>
> I also noticed that these libraries are not added to pkg-config
> `Libs.private`. We must use `ext_deps` and `cc.find_library()`
> instead of `add_project_link_arguments('-l...')`. IIRC you don't use
> pkg-config, but still.
Thanks, and yes, the pkg-config on my system still doesn't work.
Regards,
William


More information about the dev mailing list