DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dave Young <dave@youngcopy.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH 2/6] Section 2: Install and Build DPDK
Date: Thu, 12 Oct 2023 14:08:46 -0400	[thread overview]
Message-ID: <CAMXm8ESQVXEczfXivmMTm5CKPEkHLgbGqoW-C4BziBh9WZ+fWg@mail.gmail.com> (raw)
In-Reply-To: <20230925160516.GA28993@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

[-- Attachment #1: Type: text/plain, Size: 13118 bytes --]

Tyler, can you provide an example of the OS specific section/title you're
thinking would make sense to use?

Can you confirm the following?

1. The Clang-LLVM C compiler (version >= 16.0.x)
2. Meson Build system (Required version: 0.57.0)
3. Updated commands:

# Previous Command
meson -Dexamples=helloworld build
# Updated Command
meson setup -Dexamples=helloworld build

# Previous Command
ninja -C build
# Updated Command
meson compile -C build

4. Since Ninja is bundled with Meson 0.57.0, a separate section for its
installation may not be necessary. Is this correct?

Thanks!
David Young
Professional Copywriter/Technical Writer
Young Copy
+1 (678) 500-9550
https://www.youngcopy.com


On Mon, Sep 25, 2023 at 12:05 PM Tyler Retzlaff <
roretzla@linux.microsoft.com> wrote:

> On Wed, Sep 20, 2023 at 11:48:06AM -0400, 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.
>
> when the title of the section is general it shouldn't mention a specific
> OS in the content. if the content is OS specific then the parent section
> or the title of the section should identify to which OS it applies. in
> general it would be nice to convey that windows is an equally supported
> platform to the other operating systems.
>
> i know it's a bit of a dance i hope you can help interpret what i'm
> trying to convey.
>
> > +
> > +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+)
> > +
> > +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
> > +
> > +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/`` <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
> > +   ldconfig
> > +
> > +For detailed information on Meson build configuration options specific
> to DPDK, see :ref:`DPDK Meson Build Configuration Options
> <dpdk_meson_build_options>`.
> > +
> > +Cross-Compilation Instructions for Different Architectures
> > +----------------------------------------------------------
> > +
> > +For instructions on building DPDK for ARM64, LoongArch, and RISC-V,
> refer to :ref:`cross_compile_dpdk`.
> > diff --git
> a/doc/guides/getting_started_guide/install_and_build/index.rst
> b/doc/guides/getting_started_guide/install_and_build/index.rst
> > new file mode 100644
> > index 0000000000..f4d8740fb6
> > --- /dev/null
> > +++ b/doc/guides/getting_started_guide/install_and_build/index.rst
> > @@ -0,0 +1,15 @@
> > +..  SPDX-License-Identifier: BSD-3-Clause
> > +    Copyright(c) 2010-2025 Intel Corporation.
> > +
> > +.. _install_and_build:
> > +
> > +Install and Build DPDK
> > +======================
> > +
> > +.. toctree::
> > +    :maxdepth: 2
> > +
> > +
> > +    installing_prebuilt_packages
> > +    building_from_sources
> > +    windows_install_build
> > \ No newline at end of file
> > diff --git
> a/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
> b/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
> > new file mode 100644
> > index 0000000000..3e395d65f1
> > --- /dev/null
> > +++
> b/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst
> > @@ -0,0 +1,54 @@
> > +..  SPDX-License-Identifier: BSD-3-Clause
> > +    Copyright(c) 2010-2025 Intel Corporation.
> > +
> > +.. _installing_prebuilt_packages:
> > +
> > +Installing Pre-built Packages
> > +=============================
> > +
> > +Pre-built packages provide a convenient way to install DPDK without the
> need to compile
> > +the source code manually. These packages are created and maintained by
> the DPDK
> > +community or OS vendors and are available for various operating systems
> and
> > +distributions.
> > +
> > +Available Distributions
> > +-----------------------
> > +
> > +Linux
> > +^^^^^
> > +
> > +Pre-built DPDK packages are available for several popular Linux
> distributions,
> > +including but not limited to:
> > +
> > +Alpine
> > +
> > +.. code-block:: bash
> > +
> > +   sudo apk add dpdk
> > +
> > +Debian and Ubuntu and derivatives
> > +
> > +.. code-block:: bash
> > +
> > +   sudo apt-get install dpdk
> > +
> > +Fedora and RedHat Enterprise Linux RHEL
> > +
> > +.. code-block:: bash
> > +
> > +   sudo dnf install dpdk
> > +
> > +openSUSE
> > +
> > +.. code-block:: bash
> > +
> > +   sudo zypper install dpdk
> > +
> > +FreeBSD
> > +^^^^^^^
> > +
> > +To install DPDK on FreeBSD, use the following command:
> > +
> > +.. code-block:: bash
> > +
> > +   sudo pkg install dpdk
> > \ No newline at end of file
> > diff --git
> a/doc/guides/getting_started_guide/install_and_build/windows_install_build.rst
> b/doc/guides/getting_started_guide/install_and_build/windows_install_build.rst
> > new file mode 100644
> > index 0000000000..ea0e131766
> > --- /dev/null
> > +++
> b/doc/guides/getting_started_guide/install_and_build/windows_install_build.rst
> > @@ -0,0 +1,93 @@
> > +..  SPDX-License-Identifier: BSD-3-Clause
> > +    Copyright(c) 2010-2015 Intel Corporation.
> > +
> > +.. _windows_install_build:
> > +
> > +Windows DPDK Build
> > +==================
> > +
> > +Before you begin the process of building DPDK on Windows,
> > +make sure your system meets all the necessary requirements as outlined
> below.
> > +
> > +Windows System Requirements
> > +---------------------------
> > +
> > +Building the DPDK and its applications on Windows requires one of the
> following
> > +environments:
> > +
> > +- The Clang-LLVM C compiler and Microsoft MSVC linker.
>
> would it be overly objectionable to state specific LLVM >= 16.0.x as
> required?
>
> > +- The MinGW-w64 toolchain (either native or cross).
> > +
> > +The Meson Build system is used to prepare the sources for compilation
> with the Ninja backend.
> > +
> > +Option 1: Clang-LLVM C Compiler and Microsoft MSVC Linker
> > +---------------------------------------------------------
> > +
> > +1. Install the Compiler: Download and install the clang compiler from
> the
> > +`LLVM website <http://releases.llvm.org/>`_.
> > +
> > +2. Install the Linker: Download and install the Build Tools for Visual
> Studio from the
> > +`Microsoft website <https://visualstudio.microsoft.com/downloads/>`_.
> > +When installing build tools, select the “Visual C++ build tools” option
> and make sure
> > +the Windows SDK is selected.
> > +
> > +Option 2: MinGW-w64 Toolchain
> > +-----------------------------
> > +
> > +1. On Linux (for cross-compilation): Install MinGW-w64 via a package
> manager.
> > +Version 4.0.4 for Ubuntu 16.04 cannot be used due to a MinGW-w64 bug.
> > +
> > +2. On Windows: Obtain the latest version installer from the
> > +`MinGW-w64 repository <https://mingw-w64.org/doku.php>`_.
> > +Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on
> it.
> > +Install to a folder without spaces in its name, like ``C:\MinGW``.
> > +This path is assumed for the rest of this guide.
> > +
> > +Install the Build System
> > +------------------------
> > +
> > +Download and install the build system from the
> > +`Meson website <
> http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer>`_.
>
> > +A good option to choose is the MSI installer for both meson and ninja
> together.
> > +Recommended version is either Meson 0.57.0 (baseline) or the latest
> release.
>
> s/Recommended/Required/ is 0.57.0 i do not believe their latest release
> works?
>
> > +
> > +Install the Backend
> > +-------------------
> > +
> > +If using Ninja, download and install the backend from the
> > +`Ninja website <https://ninja-build.org/>`_ or install along with the
> meson build
> > +system.
>
> i'm not sure we need to mention the installation of the ninja backend
> since you acquire it along with meson 0.57.0? anyone call me wrong on
> this or does windows use any other backend that we are aware? if not i
> think we can delete the 'install the backend' section entirely.
>
> > +
> > +Once you have verified that your system meets these requirements,
> > +you can proceed with the following steps to build DPDK.
> > +
> > +Build the Code
> > +--------------
> > +
> > +The build environment is setup to build the EAL and the helloworld
> example by default.
> > +To compile the examples, the flag -Dexamples is required.
> > +
> > +**Option 1. Native Build on Windows**
> > +
> > +When using Clang-LLVM, specifying the compiler might be required to
> complete the meson
> > +command::
> > +
> > +        set CC=clang
> > +
> > +When using MinGW-w64, it is sufficient to have toolchain executables in
> PATH::
> > +
> > +        set PATH=C:\MinGW\mingw64\bin;%PATH%
> > +
> > +To compile the examples::
> > +
> > +        cd C:\Users\me\dpdk
> > +        meson -Dexamples=helloworld build
>
>         meson setup -Dexamples=helloworld build
>
> > +        ninja -C build
>
>         meson compile -C build
>
> > +
> > +**Option 2. Cross-Compile with MinGW-w64**
> > +
> > +The cross-file option must be specified for Meson.
> > +Depending on the distribution, paths in this file may need adjustments::
> > +
> > +        meson --cross-file config/x86/cross-mingw -Dexamples=helloworld
> build
> > +        ninja -C build
> > \ No newline at end of file
> > --
> > 2.41.0.windows.1
>

[-- Attachment #2: Type: text/html, Size: 16136 bytes --]

  reply	other threads:[~2023-10-12 18:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 15:48 [PATCH 0/6] docs: Unify Getting Started Guides David Young
2023-09-20 15:48 ` [PATCH 1/6] Section 1: Introduction David Young
2023-09-25 11:30   ` Ferruh Yigit
2023-10-11 18:26     ` Dave Young
2023-09-20 15:48 ` [PATCH 2/6] Section 2: Install and Build DPDK David Young
2023-09-25 11:30   ` Ferruh Yigit
2023-09-25 12:20     ` Bruce Richardson
2023-09-25 16:05   ` Tyler Retzlaff
2023-10-12 18:08     ` Dave Young [this message]
2023-10-17 13:37       ` Tyler Retzlaff
2023-09-20 15:48 ` [PATCH 3/6] Section 3: Setting up a System to Run DPDK Applications David Young
2023-09-25 11:31   ` Ferruh Yigit
2023-09-25 12:22     ` Bruce Richardson
2023-10-12 17:32       ` Dave Young
2023-09-20 15:48 ` [PATCH 4/6] Section 4: Running Applications David Young
2023-09-25 11:32   ` Ferruh Yigit
2023-09-20 15:48 ` [PATCH 5/6] Section 5: Appendix David Young
2023-09-25 11:33   ` Ferruh Yigit
2023-09-25 11:52     ` Ferruh Yigit
2023-09-25 12:24     ` Bruce Richardson
2023-09-20 15:48 ` [PATCH 6/6] Section 6: Glossary David Young
2023-09-25 11:43   ` Ferruh Yigit
2023-09-22  4:15 ` [PATCH 0/6] docs: Unify Getting Started Guides Tyler Retzlaff
2023-09-22 14:47 ` David Marchand
2023-09-22 15:54   ` Bruce Richardson
2023-09-25 11:54 ` Ferruh Yigit
2023-10-11 18:34   ` Dave Young
2023-10-13 16:28   ` Bruce Richardson

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=CAMXm8ESQVXEczfXivmMTm5CKPEkHLgbGqoW-C4BziBh9WZ+fWg@mail.gmail.com \
    --to=dave@youngcopy.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).