From: Stephen Hemminger <stephen@networkplumber.org>
To: Jeffrey Helt <jhelt@andrew.cmu.edu>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Building a shared library that uses DPDK
Date: Wed, 14 Feb 2018 17:08:06 -0800 [thread overview]
Message-ID: <20180214170806.3e670b57@xeon-e3> (raw)
In-Reply-To: <BB7DFD06-3259-455F-A6DA-2BBE703511F6@andrew.cmu.edu>
On Wed, 14 Feb 2018 19:06:03 -0500
Jeffrey Helt <jhelt@andrew.cmu.edu> wrote:
> 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
The DPDK builds lots of little shared libraries.
You need to have all of them in your LD_LIBRARY_PATH and then add your socket wrapper.
next prev parent reply other threads:[~2018-02-15 1:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 0:06 Jeffrey Helt
2018-02-15 1:08 ` Stephen Hemminger [this message]
2018-02-15 2:34 ` Jeffrey Helt
2018-02-15 23:44 ` Jeffrey Helt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180214170806.3e670b57@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=jhelt@andrew.cmu.edu \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).