[PATCH 2/6] Section 2: Install and Build DPDK
Bruce Richardson
bruce.richardson at intel.com
Mon Sep 25 14:20:24 CEST 2023
On Mon, Sep 25, 2023 at 12:30:35PM +0100, Ferruh Yigit wrote:
> On 9/20/2023 4:48 PM, David Young wrote:
> > ---
> > .../building_from_sources.rst | 108 ++++++++++++++++++
> > .../install_and_build/index.rst | 15 +++
> > .../installing_prebuilt_packages.rst | 54 +++++++++
> > .../windows_install_build.rst | 93 +++++++++++++++
> > 4 files changed, 270 insertions(+)
> > create mode 100644 doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
> > create mode 100644 doc/guides/getting_started_guide/install_and_build/index.rst
> > create mode 100644 doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
> > create mode 100644 doc/guides/getting_started_guide/install_and_build/windows_install_build.rst
> >
> > diff --git a/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst b/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
> > new file mode 100644
> > index 0000000000..e4ee8e436d
> > --- /dev/null
> > +++ b/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst
> > @@ -0,0 +1,108 @@
> > +.. SPDX-License-Identifier: BSD-3-Clause
> > + Copyright(c) 2010-2025 Intel Corporation.
> > +
> > +.. _building_from_sources:
> > +
> > +Building and Installing DPDK from Sources
> > +=========================================
> > +
> > +This chapter provides a comprehensive guide for building DPDK from sources on both
> > +Linux and FreeBSD platforms. It covers the necessary steps, prerequisites,
> > +and considerations for different architectures and compilers.
> > +
> > +Required Tools
> > +--------------
> > +
> > +To build DPDK, you'll need the following tools:
> > +
> > +- A C compiler like ``gcc`` (version 5+) or ``clang`` (version 3.6+)
> > +- ``pkg-config`` or ``pkgconf``
> > +- Python 3.6 or later
> > +- ``meson`` (version 0.53.2+) and ``ninja``
> > +- ``pyelftools`` (version 0.22+)
> > +
> >
>
> Is 'libnuma' also a dependency?
>
> When I remove it in my platform and build DPDK again, getting following
> in meson stage:
>
> "
> config/meson.build:419:4: ERROR: Problem encountered:
> No NUMA library (development package) found, yet DPDK configured for
> multiple NUMA nodes.
> Please install libnuma, or set 'max_numa_nodes' option to '1' to build
> without NUMA support.
> "
>
Realistically, yes it is a dependency and we should include it here.
>
>
> > +Here's how to install them:
> > +
> > +Linux
> > +^^^^^
> > +
> > +Alpine
> > +
> > +.. code-block:: bash
> > +
> > + sudo apk add alpine-sdk bsd-compat-headers
> > + pip install meson ninja
> > +
> > +Debian and Ubuntu and derivatives
> > +
> > +.. code-block:: bash
> > +
> > + sudo apt install build-essential
> > + pip install meson ninja
> > +
> > +Fedora and RedHat Enterprise Linux RHEL
> > +
> > +.. code-block:: bash
> > +
> > + sudo dnf groupinstall "Development Tools"
> > + pip install meson ninja
> > +
>
> Above are missing some of the dependencies above, just to confirm if
> they are installed by default?
> And even if so, if we should provide explicit commands to install all,
> to be sure?
>
>
>
> > +openSUSE
> > +
> > +.. code-block:: bash
> > +
> > + sudo zypper install -t pattern devel_basis python3-pyelftools
> > + pip install meson ninja
> > +
> > +FreeBSD
> > +^^^^^^^
> > +
> > +FreeBSD (as root)
> > +
> > +.. code-block:: bash
> > +
> > + pkg install meson pkgconf py38-pyelftools
> > +
> > +Note: If you're using FreeBSD, you'll also need kernel sources. Make sure they're included during the FreeBSD installation.
> > +
> > +Getting the DPDK Source
> > +-----------------------
> > +
> > +Download the DPDK source code from the official repository
> > +``https://fast.dpdk.org/rel/``.
> > +
> > +Use ``wget`` to grab the DPDK version::
> > +
> > + wget https://fast.dpdk.org/rel/dpdk-<version>.tar.xz
> > +
> > +Extract the downloaded archive:
> > +
> > +.. code-block:: bash
> > +
> > + tar -xvf dpdk-<version>.tar.gz
> > +
> > +Navigate to the DPDK directory:
> > +
> > +.. code-block:: bash
> > +
> > + cd dpdk-<version>
> > +
> > +Building DPDK
> > +-------------
> > +
> > +Configure the build based on your needs, hardware, and environment.
> > +This might include setting specific flags or options. For example: “meson setup -Dbuildtype=debugoptimized build”. Then compile using “ninja” and install using “meson install”.
> > +
> > +.. code-block:: bash
> > +
> > + ninja -C build
> > + cd build
> > + sudo ninja install>
>
> Above mentions from "meson install", here using "ninja install", should
> we unify it to one?
>
Yes, we should standardize on meson install.
>
<snip for brevity>
More information about the dev
mailing list