DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Sudharshan Krishnakumar <sudhar.ckrishna@gmail.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] question related to build issue with Pktgen-DPDK tool
Date: Thu, 29 Oct 2020 14:20:32 +0000
Message-ID: <F9D62717-97C1-4CF6-941B-0FDD05C8012A@intel.com> (raw)
In-Reply-To: <CAEm3rUnZTo9ueOQ5hdBgbzXqWCHJVzho7A3ZEk-UJeoeXedDgg@mail.gmail.com>

> 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

      reply	other threads:[~2020-10-29 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  2:33 Sudharshan Krishnakumar
2020-10-29 14:20 ` Wiles, Keith [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F9D62717-97C1-4CF6-941B-0FDD05C8012A@intel.com \
    --to=keith.wiles@intel.com \
    --cc=sudhar.ckrishna@gmail.com \
    --cc=users@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git