DPDK patches and discussions
 help / color / mirror / Atom feed
From: William Yeung <williamsyyeung@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Building dpdk 1.7.0 and 2.0.0 with shared library and combine library options fail in test module and building example application
Date: Mon, 24 Aug 2015 01:10:30 +0200	[thread overview]
Message-ID: <CAEDK36OzH0MgqFEbXt-RXLo72ORbH+q2Nkc-hcZCPyudVVoXuA@mail.gmail.com> (raw)

Hello,

I built dpdk 1.7.0 with the share library and combine library options
activated, but I receive errors when building an example application and
when running the test module in tools/setup.sh.

I modified the common_linuxapp file (dpdk-1.7.0/config/common_linuxapp) to
share library and combine into one library as follow:

CONFIG_RTE_BUILD_SHARED_LIB=y # Compile to share library
CONFIG_RTE_BUILD_COMBINE_LIBS=y # Combine to one single library

Then I built using the following commands:

CONFIG_RTE_LIBRTE_MLX4_PMD=y
export EXTRA_CFLAGS=-I$TMP/install/usr/local/include
export EXTRA_LDFLAGS=-L$TMP/install/usr/local/lib
make config T=x86_64-native-linuxapp-gcc
make

I executed the tools/setup.sh script and ran the test modules, but I
get this error:

Option: 17

Enter hex bitmask of cores to execute test app on
Example: to execute app on cores 0 to 7, enter 0xff
bitmask: 0x01
Launching app
sudo: /app/test: command not found
Press enter to continue ...

Option 17 is "Run test application ($RTE_TARGET/app/test)".

Building the helloworld sample application yields the following error:

ubuntu-pc@ubuntu-pc:~/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/examples/helloworld$
export RTE_SDK=/home/ubuntu-
pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0
ubuntu-pc@ubuntu-pc:~/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/examples/helloworld$
export RTE_TARGET=x86_64-
native-linuxapp-gcc
ubuntu-pc@ubuntu-pc:~/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/examples/helloworld$
make
LD helloworld
/home/ubuntu-pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib/librte_eal.so:
undefined reference
to `rte_malloc'
/home/ubuntu-pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib/librte_eal.so:
undefined reference
to `rte_mempool_lookup'
/home/ubuntu-pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib/librte_eal.so:
undefined reference
to `rte_zmalloc'
/home/ubuntu-pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib/librte_eal.so:
undefined reference
to `rte_free'
/home/ubuntu-pc/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib/librte_eal.so:
undefined reference
to `rte_mempool_create'
collect2: ld returned 1 exit status
make[1]: *** [helloworld] Error 1
make: *** [all] Error 2
ubuntu-pc@ubuntu-pc:~/devel-ostinato-dpdk/ostinato-dpdk-master/dpdk-1.7.0/examples/helloworld$

I also built dpdk 2.0.0 on the same PC, but I received the same
errors. My steps for building dpdk 2.0.0 are as follows:

Modify the following lines in common_linuxapp file
(dpdk-1.7.0/config/common_linuxapp):

CONFIG_RTE_BUILD_SHARED_LIB=y # Compile to share library
CONFIG_RTE_BUILD_COMBINE_LIBS=y # Combine to one single library

Execute the commands:

CONFIG_RTE_LIBRTE_MLX4_PMD=y
export EXTRA_CFLAGS=-I$TMP/install/usr/local/include
export EXTRA_LDFLAGS=-L$TMP/install/usr/local/lib
make config T=x86_64-native-linuxapp-gcc
sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
make

If I don't enable the share library and combine library options, I was
able to build the helloworld example and run the test modules in
tools/setup.sh without any issues. However I need to enable these two
options to build an application (In my case, the open source Ostinato
dpdk traffic generator. See: https://github.com/pstavirs/ostinato and
https://github.com/PLVision/ostinato-dpdk)

My environment:

Linux ubuntu-pc 3.13.0-32-generic #57~precise1-Ubuntu
OS: Ubuntu 12.04.5 desktop amd64 (http://releases.ubuntu.com/12.04/)
on an Intel CPU.
Linux Kernel: 3.13.0-32-generic

For the 3.13.0 kernel I had to modify the kcompat.h file in
dpdk-1.7.0/lib/librte_eal/linuxapp/kni/ethtool/igb to comply with this
kernel. I modified line 3848 to:

#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) )

I also built these two dpdk versions on the same PC using the 3.14.4
kernel but I still ended with the same results. What steps do I need
to take to make dpdk run properly (i.e. build example apps and run
test modules) while keeping the shared library and combine library
options set? I would like to note that in my attempts, dpdk was built
without any errors and binding drivers to NICs worked (despite not
having dpdk supported NICs). I need this to build the Ostinato
application.

Also, what will my NIC do if it has the igb_uio driver on it despite
not being a dpdk supported device?

My NICs:

Realtek RTL-8110SC/8169SC Gigabit Ethernet

Intel 82579V Gigabit Network Connection

I apologize for the long post.

Thank you and kind regards,

Will

                 reply	other threads:[~2015-08-23 23:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAEDK36OzH0MgqFEbXt-RXLo72ORbH+q2Nkc-hcZCPyudVVoXuA@mail.gmail.com \
    --to=williamsyyeung@gmail.com \
    --cc=dev@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).