[dpdk-users] Building a shared library that uses DPDK

Jeffrey Helt jhelt at andrew.cmu.edu
Thu Feb 15 01:06:03 CET 2018


Hi,

I am attempting to build a shared library that uses DPDK, specifically that wraps the Linux socket API and backs it by shared memory DPDK shared memory regions. I built DPDK 17.11 with “CONFIG_RTE_BUILD_SHARED_LIB=y”. In my shared library directory, I am using the following Makefile:

ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif

# Default target, can be overridden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc

include $(RTE_SDK)/mk/rte.vars.mk

# binary name
SHARED = libshim.so

# all source are stored in SRCS-y
SRCS-y := wrap_socket.c

CFLAGS += -O3

include $(RTE_SDK)/mk/rte.extshared.mk

However, whenever I try to use my library, such as with "LD_PRELOAD=./build/lib/libshim.so ./test”, I receive "symbol lookup error: ./build/lib/libshim.so: undefined symbol: rte_eal_init”. What am I missing?

Thank you in advance for help!

Jeff


More information about the users mailing list