From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by dpdk.org (Postfix) with ESMTP id CBEA85A9D for ; Mon, 24 Aug 2015 01:11:10 +0200 (CEST) Received: by lbbpu9 with SMTP id pu9so69875467lbb.3 for ; Sun, 23 Aug 2015 16:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=oayLM+alNoUnEQNUOK+tDJ8br5TD0P9fYeuqWs+jg5E=; b=aY251QNBco91KjledLtPjMtKhAXs4oGdT/XYVQhEr7s9Dfxys4p6ko/VFtkQpOCIQ8 Ip4XmpaMKnWaMTuC6SK6AZa/BuJ+ycX6fbu1jbx0FBWa/ZilEndidhcwkp6uBlRuipx7 aS7E6yEUFkXcNPolzUhdukn0X32jgMyzYxuh/Q/9Xha2fVm6oHyC2sOZrUD1/p37rJjC fCp2OWsQ5qOqpW/imIXjBg1ZRwLhxKgPRh6hfRwCuLzxLAIdAxrYyMJ9y7UE+smKjMLV ZEBKsugny8kiIVNP2Kjq0dqAS83tJdMWs/YfdpLI+Jd5OLTBmImMUfjaon0z2/YaUxgy a7Wg== X-Received: by 10.112.130.97 with SMTP id od1mr17139305lbb.37.1440371470254; Sun, 23 Aug 2015 16:11:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.233.193 with HTTP; Sun, 23 Aug 2015 16:10:30 -0700 (PDT) From: William Yeung Date: Mon, 24 Aug 2015 01:10:30 +0200 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2015 23:11:11 -0000 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