Hello everyone,
I'm trying to add a new library in spdk/lib which will provide some
statistical information. The functions from this library can be called from other
libraries. One of the functions from my library is called from env_dpdk/env.c. During
compilation, I'm getting the following linker errors only in vhost and iscsi_tgt
apps.
/root/spdk/build/lib/libspdk_env_dpdk.a(env.o): In function `spdk_dma_zmalloc':
/root/spdk/lib/env_dpdk/env.c:87: undefined reference to `malloc_stats'
collect2: error: ld returned 1 exit status
make[2]: *** [iscsi_tgt] Error 1
make[1]: *** [iscsi_tgt] Error 2
make[1]: *** Waiting for unfinished jobs....
/root/spdk/build/lib/libspdk_env_dpdk.a(env.o): In function `spdk_dma_zmalloc':
/root/spdk/lib/env_dpdk/env.c:87: undefined reference to `malloc_stats'
collect2: error: ld returned 1 exit status
make[2]: *** [vhost] Error 1
make[1]: *** [vhost] Error 2
make: *** [app] Error 2
The nvmf_tgt application compiled successfully. I'm not able to figure out what is
going wrong since I have made the same changes in Makefiles of nvmf_tgt and
vhost/iscsi_tgt. I tried re-ordering the library in the Makefile but it did not solve the
issue. Can anyone suggest what might be going wrong?
Thanks,
Avinash