DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] question related to build issue with Pktgen-DPDK tool
@ 2020-10-29  2:33 Sudharshan Krishnakumar
  2020-10-29 14:20 ` Wiles, Keith
  0 siblings, 1 reply; 2+ messages in thread
From: Sudharshan Krishnakumar @ 2020-10-29  2:33 UTC (permalink / raw)
  To: users

Hi All,

This is the first time, I am posting to this group, please excuse if there
are any errors.

I have a much older version of DPDK(17.08) and corresponding old version of
PktGen both built using Makefiles,
working fine on my system.

Trying to move to latest DPDK(20.08) and PktGen tool.
Based on what I read, I am guessing it is NOT possible to build latest
version of Pktgen using make,
needs to be built using meson/ninja. So I have tried to build both DPDK and
Pktgen tool using meson/ninja.

Running into a build issue with latest Pktgen(using meson/ninja)->seeing
this error->
meson.build:58:0: ERROR:  Native dependency 'libdpdk' not found.

I have the 20.08 DPDK built and installed(in a different prefix path, other
than the default /usr/local):

DPDK Build/install steps:
meson build --prefix /home/my_userid/new_dpdk/dpdk-20.08/install
ninja -C build
ninja -C build install

~/new_dpdk/dpdk-20.08$ find . -name libdpdk.a
./x86_64-native-linux-gcc/lib/libdpdk.a
./install/lib/x86_64-linux-gnu/libdpdk.a

~/new_dpdk/dpdk-20.08$ find . -name *.pc
./build/meson-private/libdpdk.pc
./build/meson-private/libdpdk-libs.pc
./install/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
./install/lib/x86_64-linux-gnu/pkgconfig/libdpdk-libs.pc

For building Pktgen-DPDK, I am setting the path PKG_CONFIG_PATH to point to
the libdpdk.pc file,
but it still doesn’t find the libdpdk library(not sure why, that is the
case).

~/new_pktgen_dpdk/Pktgen-DPDK$
export
PKG_CONFIG_PATH=/home/my_userid/new_dpdk/dpdk-20.08/install/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc

When building PktGen seeing this error-> meson.build:58:0: ERROR:  Native
dependency 'libdpdk' not found.

Have the build logs below, can you please let me know.

~/new_pktgen_dpdk/Pktgen-DPDK$ make
>>> Use 'make help' for more commands

./tools/pktgen-build.sh build
>>> lua_enabled      : '-Denable_lua=false'
>>> gui_enabled      : '-Denable_gui=false'
>>> SDK Directory    : '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK'
>>> Build Directory  :
'/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir'
>>> Target Directory : '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/usr'

>>> Ninja build in '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir'
buildtype='release'
meson -Dbuildtype=release -Denable_lua=false -Denable_gui=false Builddir
The Meson build system
Version: 0.47.1
Source dir: /home/my_userid/new_pktgen_dpdk/Pktgen-DPDK
Build dir: /home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir
Build type: native build
Program cat found: YES (/bin/cat)
Project name: pktgen
Project version: 20.10.0
Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Compiler for C supports arguments -mavx2: YES
Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES
Compiler for C supports arguments -Wno-format-truncation
-Wformat-truncation: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)

meson.build:58:0: ERROR:  Native dependency 'libdpdk' not found


Thanks,



Sudha

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] question related to build issue with Pktgen-DPDK tool
  2020-10-29  2:33 [dpdk-users] question related to build issue with Pktgen-DPDK tool Sudharshan Krishnakumar
@ 2020-10-29 14:20 ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2020-10-29 14:20 UTC (permalink / raw)
  To: Sudharshan Krishnakumar; +Cc: users



> On Oct 28, 2020, at 9:33 PM, Sudharshan Krishnakumar <sudhar.ckrishna@gmail.com> wrote:
> 
> Hi All,
> 
> This is the first time, I am posting to this group, please excuse if there
> are any errors.
> 
> I have a much older version of DPDK(17.08) and corresponding old version of
> PktGen both built using Makefiles,
> working fine on my system.
> 
> Trying to move to latest DPDK(20.08) and PktGen tool.
> Based on what I read, I am guessing it is NOT possible to build latest
> version of Pktgen using make,
> needs to be built using meson/ninja. So I have tried to build both DPDK and
> Pktgen tool using meson/ninja.
> 
> Running into a build issue with latest Pktgen(using meson/ninja)->seeing
> this error->
> meson.build:58:0: ERROR:  Native dependency 'libdpdk' not found.
> 
> I have the 20.08 DPDK built and installed(in a different prefix path, other
> than the default /usr/local):
> 
> DPDK Build/install steps:
> meson build --prefix /home/my_userid/new_dpdk/dpdk-20.08/install
> ninja -C build
> ninja -C build install
> 
> ~/new_dpdk/dpdk-20.08$ find . -name libdpdk.a
> ./x86_64-native-linux-gcc/lib/libdpdk.a
> ./install/lib/x86_64-linux-gnu/libdpdk.a
> 
> ~/new_dpdk/dpdk-20.08$ find . -name *.pc
> ./build/meson-private/libdpdk.pc
> ./build/meson-private/libdpdk-libs.pc
> ./install/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
> ./install/lib/x86_64-linux-gnu/pkgconfig/libdpdk-libs.pc
> 
> For building Pktgen-DPDK, I am setting the path PKG_CONFIG_PATH to point to
> the libdpdk.pc file,
> but it still doesn’t find the libdpdk library(not sure why, that is the
> case).
> 
> ~/new_pktgen_dpdk/Pktgen-DPDK$
> export
> PKG_CONFIG_PATH=/home/my_userid/new_dpdk/dpdk-20.08/install/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
> 
> When building PktGen seeing this error-> meson.build:58:0: ERROR:  Native
> dependency 'libdpdk' not found.
> 
> Have the build logs below, can you please let me know.
> 
> ~/new_pktgen_dpdk/Pktgen-DPDK$ make
>>>> Use 'make help' for more commands
> 
> ./tools/pktgen-build.sh build
>>>> lua_enabled      : '-Denable_lua=false'
>>>> gui_enabled      : '-Denable_gui=false'
>>>> SDK Directory    : '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK'
>>>> Build Directory  :
> '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir'
>>>> Target Directory : '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/usr'
> 
>>>> Ninja build in '/home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir'
> buildtype='release'
> meson -Dbuildtype=release -Denable_lua=false -Denable_gui=false Builddir
> The Meson build system
> Version: 0.47.1
> Source dir: /home/my_userid/new_pktgen_dpdk/Pktgen-DPDK
> Build dir: /home/my_userid/new_pktgen_dpdk/Pktgen-DPDK/Builddir
> Build type: native build
> Program cat found: YES (/bin/cat)
> Project name: pktgen
> Project version: 20.10.0
> Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
> Compiler for C supports arguments -mavx2: YES
> Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES
> Compiler for C supports arguments -Wno-format-truncation
> -Wformat-truncation: YES
> Found pkg-config: /usr/bin/pkg-config (0.29.1)
> 
> meson.build:58:0: ERROR:  Native dependency 'libdpdk' not found

The latest pktgen uses meson/ninja and DPDK must be built and installed, which appears to be the case. The ‘find’s you did were only looking in the local build directories and not in the DPDK installed location.

The normal installed location of DPDK is here from the ‘pkg-config’ command:

rkwiles@purley (main):.../intel/dpdk$ pkg-config --libs libdpdk
-L/usr/local/lib/x86_64-linux-gnu -Wl,--as-needed -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -lbsd

Please note the location is /usr/local/lib/x86_64-linux-gnu directory for libs and the /usr/local/lib/x86_64-linux-gnu/pkgconfig for the libdpdp.pc file.

The PKG_CONFIG_PATH should be set to /usr/local/lib/x86_64-linux-gnu/pkgconfig if needed.

I am using Ubuntu 20.04.1 and I do not have PKG_CONFIG_PATH set. It is possible the /etc/ld.so.conf.d/x86_64-linux-gnu.conf contains the /usr/local/lib/x86_64-linux-gnu directory as a search path for DPDK libs and libdpdk.pc file.

Because you don’t have DPDK installed in the default location, you will need to install it in the default location or find the magic path to the libdpdk.pc file and set PKG_CONFIG_PATH. Make sure you have not mis-spelled something.


> 
> Thanks,
> 
> 
> 
> Sudha


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-29 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  2:33 [dpdk-users] question related to build issue with Pktgen-DPDK tool Sudharshan Krishnakumar
2020-10-29 14:20 ` Wiles, Keith

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).