Score:0

Package installs to a different path from existing packages

sz flag

DPDK installs via pkg-config manager. I used these commands to build from source:

git clone https://github.com/DPDK/dpdk.git
cd dpdk
meson setup build
cd build
ninja
ninja install
ldconfig

https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html

However, it installed to /usr/local/lib/x86_64-linux-gnu/pkgconfig. In contrast all my other packages are located at /usr/lib/x86_64-linux-gnu/pkgconfig.

Because of this pkg-config --list-all could not find my DPDK package.

I even set PKG_CONFIG_PATH to /usr/lib/x86_64-linux-gnu/pkgconfig and retried, but it still installed to the same path.

  1. Could someone confirm if this is a Ubuntu issue and how should it be installed correctly with the other packages?

  2. Is there an easier way of installing DPDK via the Ubuntu package manager? I couldn't find one.

HolyBlackCat avatar
cn flag
Setting `PKG_CONFIG_PATH` should've worked. Can you elaborate what exactly you did?
Score:2
cn flag

You don't have a "DPDK package." You built the software from source, and installed it using a non-Debian tool (ninja). That does not meet the minimum definition of a software package.

You can install software that way all you like, it's not wrong. It's just not a package.

For a Debian-based system like Ubuntu, your ninja installed DPDK into the correct place.

  • /usr/local is for non-deb software, including software you built yourself from source.
  • /usr/lib is for software provided by deb packages (which yours is not)

It seems clear that you were misled by the DPDK documentation that building from source was the best way to install.

It's not.

The dpdk package has been in the Ubuntu repositories for many years.

Let's see how to find it in a 22.10 system: (hint: it's the very first result)
You will get analagous results for any supported release of Ubuntu.

$ apt search dpdk | grep dpdk

dpdk/kinetic 21.11.2-0ubuntu1 amd64
dpdk-dev/kinetic 21.11.2-0ubuntu1 amd64
dpdk-doc/kinetic,kinetic 21.11.2-0ubuntu1 all
dpdk-kmods-dkms/kinetic 0~20220111+git-1ubuntu1 amd64
libdpdk-dev/kinetic 21.11.2-0ubuntu1 amd64
libuhd4.2.0-dpdk/kinetic 4.2.0.1+ds1-1 amd64
libuhd4.2.0-dpdk-tests/kinetic 4.2.0.1+ds1-1 amd64
openvswitch-switch-dpdk/kinetic-updates,kinetic-security 3.0.3-0ubuntu0.22.10.2 amd64

Next, let's check the package description to verify that the dpdk package is really what we want:

$ apt show dpdk
[... snip ...]
Description: Data Plane Development Kit (runtime)
 DPDK is a set of libraries for fast packet processing. Applications run
 in user-space and communicate directly with dedicated network interfaces.
 .
 This package contains the runtime environment to run DPDK applications.

Okay, if that matches, then there are two steps to install:

  1. (OPTIONAL) Delete your manually-installed duplicate to avoid confusion.
  2. sudo apt install dpdk
mezamorphic avatar
sz flag
But surely `pkg-config` should check both if these are well-known paths?
user535733 avatar
cn flag
`pkg-config` is the wrong tool, since you did not install a deb package. Wrong tool = Wrong result.
mezamorphic avatar
sz flag
But I didn't choose `pkg-config`, that's what the DPDK install script uses?
mezamorphic avatar
sz flag
Is there a way to install DPDK using an Ubuntu repository? I couldn't see one
user535733 avatar
cn flag
Big edit to answer both questions in your original question, and to show you how to find in in the Ubuntu repositories. Keep in mind that the AskUbuntu format is poorly suited to follow-up questions. It's Question/Answer, not a threaded forum. Try to ask your question...in your Question.
mezamorphic avatar
sz flag
Thank you so much for that edit. Regarding removing my existing installation, am I dependent on whether DPDK provided an uninstall script?
user535733 avatar
cn flag
That I do not know, as the answer depends upon whatever documentation or scripts the upstream website provides. Those uncertainties around manually compiling and installing and uninstalling are precisely why Debian created standardized *packages* 29 years ago, and we all cheered and never looked back upon the broken chains of our tedium.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.