<div dir="ltr"><div>Tyler, can you provide an example of the OS specific section/title you're thinking would make sense to use?</div><div><br></div><div>Can you confirm the following?<br><br>1. The Clang-LLVM C compiler (version >= 16.0.x)</div><div>2. Meson Build system (Required version: 0.57.0)</div><div>3. Updated commands:</div><div><br></div><div># Previous Command<br>meson -Dexamples=helloworld build<br># Updated Command<br>meson setup -Dexamples=helloworld build<br><br># Previous Command<br>ninja -C build<br># Updated Command<br>meson compile -C build</div><div><br></div><div>4. Since Ninja is bundled with Meson 0.57.0, a separate section for its installation may not be necessary. Is this correct?<br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Thanks!<br>David Young<br>Professional Copywriter/Technical Writer<br>Young Copy<br></div><div>+1 (678) 500-9550<br></div><div><a href="https://www.youngcopy.com" target="_blank">https://www.youngcopy.com</a><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 25, 2023 at 12:05 PM Tyler Retzlaff <<a href="mailto:roretzla@linux.microsoft.com">roretzla@linux.microsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Sep 20, 2023 at 11:48:06AM -0400, David Young wrote:<br>
> ---<br>
>  .../building_from_sources.rst                 | 108 ++++++++++++++++++<br>
>  .../install_and_build/index.rst               |  15 +++<br>
>  .../installing_prebuilt_packages.rst          |  54 +++++++++<br>
>  .../windows_install_build.rst                 |  93 +++++++++++++++<br>
>  4 files changed, 270 insertions(+)<br>
>  create mode 100644 doc/guides/getting_started_guide/install_and_build/building_from_sources.rst<br>
>  create mode 100644 doc/guides/getting_started_guide/install_and_build/index.rst<br>
>  create mode 100644 doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst<br>
>  create mode 100644 doc/guides/getting_started_guide/install_and_build/windows_install_build.rst<br>
> <br>
> 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<br>
> new file mode 100644<br>
> index 0000000000..e4ee8e436d<br>
> --- /dev/null<br>
> +++ b/doc/guides/getting_started_guide/install_and_build/building_from_sources.rst<br>
> @@ -0,0 +1,108 @@<br>
> +..  SPDX-License-Identifier: BSD-3-Clause<br>
> +    Copyright(c) 2010-2025 Intel Corporation.<br>
> +<br>
> +.. _building_from_sources:<br>
> +<br>
> +Building and Installing DPDK from Sources<br>
> +=========================================<br>
> +<br>
> +This chapter provides a comprehensive guide for building DPDK from sources on both<br>
> +Linux and FreeBSD platforms. It covers the necessary steps, prerequisites, <br>
> +and considerations for different architectures and compilers.<br>
<br>
when the title of the section is general it shouldn't mention a specific<br>
OS in the content. if the content is OS specific then the parent section<br>
or the title of the section should identify to which OS it applies. in<br>
general it would be nice to convey that windows is an equally supported<br>
platform to the other operating systems.<br>
<br>
i know it's a bit of a dance i hope you can help interpret what i'm<br>
trying to convey.<br>
<br>
> +<br>
> +Required Tools<br>
> +--------------<br>
> +<br>
> +To build DPDK, you'll need the following tools:<br>
> +<br>
> +- A C compiler like ``gcc`` (version 5+) or ``clang`` (version 3.6+)<br>
> +- ``pkg-config`` or ``pkgconf``<br>
> +- Python 3.6 or later<br>
> +- ``meson`` (version 0.53.2+) and ``ninja``<br>
> +- ``pyelftools`` (version 0.22+)<br>
> +<br>
> +Here's how to install them:<br>
> +<br>
> +Linux<br>
> +^^^^^<br>
> +<br>
> +Alpine<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo apk add alpine-sdk bsd-compat-headers<br>
> +   pip install meson ninja<br>
> +<br>
> +Debian and Ubuntu and derivatives<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo apt install build-essential<br>
> +   pip install meson ninja<br>
> +<br>
> +Fedora and RedHat Enterprise Linux RHEL<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo dnf groupinstall "Development Tools"<br>
> +   pip install meson ninja<br>
> +<br>
> +openSUSE<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo zypper install -t pattern devel_basis python3-pyelftools<br>
> +   pip install meson ninja<br>
> +<br>
> +FreeBSD<br>
> +^^^^^^^<br>
> +<br>
> +FreeBSD (as root)<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   pkg install meson pkgconf py38-pyelftools<br>
> +<br>
> +Note: If you're using FreeBSD, you'll also need kernel sources. Make sure they're included during the FreeBSD installation.<br>
> +<br>
> +Getting the DPDK Source<br>
> +-----------------------<br>
> +<br>
> +Download the DPDK source code from the official repository <br>
> +``<a href="https://fast.dpdk.org/rel/" rel="noreferrer" target="_blank">https://fast.dpdk.org/rel/``</a>.<br>
> +<br>
> +Use ``wget`` to grab the DPDK version::<br>
> +<br>
> +        wget <a href="https://fast.dpdk.org/rel/dpdk-" rel="noreferrer" target="_blank">https://fast.dpdk.org/rel/dpdk-</a><version>.tar.xz<br>
> +<br>
> +Extract the downloaded archive:<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   tar -xvf dpdk-<version>.tar.gz<br>
> +<br>
> +Navigate to the DPDK directory:<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   cd dpdk-<version><br>
> +<br>
> +Building DPDK<br>
> +-------------<br>
> +<br>
> +Configure the build based on your needs, hardware, and environment. <br>
> +This might include setting specific flags or options. For example: “meson setup -Dbuildtype=debugoptimized build”. Then compile using “ninja” and install using “meson install”.<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   ninja -C build<br>
> +   cd build<br>
> +   sudo ninja install<br>
> +   ldconfig<br>
> +<br>
> +For detailed information on Meson build configuration options specific to DPDK, see :ref:`DPDK Meson Build Configuration Options <dpdk_meson_build_options>`.<br>
> +<br>
> +Cross-Compilation Instructions for Different Architectures<br>
> +----------------------------------------------------------<br>
> +<br>
> +For instructions on building DPDK for ARM64, LoongArch, and RISC-V, refer to :ref:`cross_compile_dpdk`.<br>
> diff --git a/doc/guides/getting_started_guide/install_and_build/index.rst b/doc/guides/getting_started_guide/install_and_build/index.rst<br>
> new file mode 100644<br>
> index 0000000000..f4d8740fb6<br>
> --- /dev/null<br>
> +++ b/doc/guides/getting_started_guide/install_and_build/index.rst<br>
> @@ -0,0 +1,15 @@<br>
> +..  SPDX-License-Identifier: BSD-3-Clause<br>
> +    Copyright(c) 2010-2025 Intel Corporation.<br>
> +<br>
> +.. _install_and_build:<br>
> +<br>
> +Install and Build DPDK<br>
> +======================<br>
> +<br>
> +.. toctree::<br>
> +    :maxdepth: 2<br>
> +<br>
> +    <br>
> +    installing_prebuilt_packages<br>
> +    building_from_sources<br>
> +    windows_install_build<br>
> \ No newline at end of file<br>
> 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<br>
> new file mode 100644<br>
> index 0000000000..3e395d65f1<br>
> --- /dev/null<br>
> +++ b/doc/guides/getting_started_guide/install_and_build/installing_prebuilt_packages.rst<br>
> @@ -0,0 +1,54 @@<br>
> +..  SPDX-License-Identifier: BSD-3-Clause<br>
> +    Copyright(c) 2010-2025 Intel Corporation.<br>
> +<br>
> +.. _installing_prebuilt_packages:<br>
> +<br>
> +Installing Pre-built Packages<br>
> +=============================<br>
> +<br>
> +Pre-built packages provide a convenient way to install DPDK without the need to compile<br>
> +the source code manually. These packages are created and maintained by the DPDK<br>
> +community or OS vendors and are available for various operating systems and<br>
> +distributions.<br>
> +<br>
> +Available Distributions<br>
> +-----------------------<br>
> +<br>
> +Linux<br>
> +^^^^^<br>
> +<br>
> +Pre-built DPDK packages are available for several popular Linux distributions,<br>
> +including but not limited to:<br>
> +<br>
> +Alpine<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo apk add dpdk<br>
> +<br>
> +Debian and Ubuntu and derivatives<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo apt-get install dpdk<br>
> +<br>
> +Fedora and RedHat Enterprise Linux RHEL<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo dnf install dpdk<br>
> +<br>
> +openSUSE<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo zypper install dpdk<br>
> +<br>
> +FreeBSD<br>
> +^^^^^^^<br>
> +<br>
> +To install DPDK on FreeBSD, use the following command:<br>
> +<br>
> +.. code-block:: bash<br>
> +<br>
> +   sudo pkg install dpdk<br>
> \ No newline at end of file<br>
> 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<br>
> new file mode 100644<br>
> index 0000000000..ea0e131766<br>
> --- /dev/null<br>
> +++ b/doc/guides/getting_started_guide/install_and_build/windows_install_build.rst<br>
> @@ -0,0 +1,93 @@<br>
> +..  SPDX-License-Identifier: BSD-3-Clause<br>
> +    Copyright(c) 2010-2015 Intel Corporation.<br>
> +<br>
> +.. _windows_install_build:<br>
> +<br>
> +Windows DPDK Build<br>
> +==================<br>
> +<br>
> +Before you begin the process of building DPDK on Windows, <br>
> +make sure your system meets all the necessary requirements as outlined below.<br>
> +<br>
> +Windows System Requirements<br>
> +---------------------------<br>
> +<br>
> +Building the DPDK and its applications on Windows requires one of the following<br>
> +environments:<br>
> +<br>
> +- The Clang-LLVM C compiler and Microsoft MSVC linker.<br>
<br>
would it be overly objectionable to state specific LLVM >= 16.0.x as<br>
required?<br>
<br>
> +- The MinGW-w64 toolchain (either native or cross).<br>
> +<br>
> +The Meson Build system is used to prepare the sources for compilation with the Ninja backend.<br>
> +<br>
> +Option 1: Clang-LLVM C Compiler and Microsoft MSVC Linker<br>
> +---------------------------------------------------------<br>
> +<br>
> +1. Install the Compiler: Download and install the clang compiler from the <br>
> +`LLVM website <<a href="http://releases.llvm.org/" rel="noreferrer" target="_blank">http://releases.llvm.org/</a>>`_.<br>
> +<br>
> +2. Install the Linker: Download and install the Build Tools for Visual Studio from the<br>
> +`Microsoft website <<a href="https://visualstudio.microsoft.com/downloads/" rel="noreferrer" target="_blank">https://visualstudio.microsoft.com/downloads/</a>>`_. <br>
> +When installing build tools, select the “Visual C++ build tools” option and make sure<br>
> +the Windows SDK is selected.<br>
> +<br>
> +Option 2: MinGW-w64 Toolchain<br>
> +-----------------------------<br>
> +<br>
> +1. On Linux (for cross-compilation): Install MinGW-w64 via a package manager. <br>
> +Version 4.0.4 for Ubuntu 16.04 cannot be used due to a MinGW-w64 bug.<br>
> +<br>
> +2. On Windows: Obtain the latest version installer from the<br>
> +`MinGW-w64 repository <<a href="https://mingw-w64.org/doku.php" rel="noreferrer" target="_blank">https://mingw-w64.org/doku.php</a>>`_. <br>
> +Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on it. <br>
> +Install to a folder without spaces in its name, like ``C:\MinGW``. <br>
> +This path is assumed for the rest of this guide.<br>
> +<br>
> +Install the Build System<br>
> +------------------------<br>
> +<br>
> +Download and install the build system from the<br>
> +`Meson website <<a href="http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer" rel="noreferrer" target="_blank">http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer</a>>`_. <br>
> +A good option to choose is the MSI installer for both meson and ninja together.<br>
> +Recommended version is either Meson 0.57.0 (baseline) or the latest release.<br>
<br>
s/Recommended/Required/ is 0.57.0 i do not believe their latest release<br>
works?<br>
<br>
> +<br>
> +Install the Backend<br>
> +-------------------<br>
> +<br>
> +If using Ninja, download and install the backend from the<br>
> +`Ninja website <<a href="https://ninja-build.org/" rel="noreferrer" target="_blank">https://ninja-build.org/</a>>`_ or install along with the meson build<br>
> +system. <br>
<br>
i'm not sure we need to mention the installation of the ninja backend<br>
since you acquire it along with meson 0.57.0? anyone call me wrong on<br>
this or does windows use any other backend that we are aware? if not i<br>
think we can delete the 'install the backend' section entirely.<br>
<br>
> +<br>
> +Once you have verified that your system meets these requirements, <br>
> +you can proceed with the following steps to build DPDK.<br>
> +<br>
> +Build the Code<br>
> +--------------<br>
> +<br>
> +The build environment is setup to build the EAL and the helloworld example by default.<br>
> +To compile the examples, the flag -Dexamples is required.<br>
> +<br>
> +**Option 1. Native Build on Windows**<br>
> +<br>
> +When using Clang-LLVM, specifying the compiler might be required to complete the meson<br>
> +command::<br>
> +<br>
> +        set CC=clang<br>
> +<br>
> +When using MinGW-w64, it is sufficient to have toolchain executables in PATH::<br>
> +<br>
> +        set PATH=C:\MinGW\mingw64\bin;%PATH%<br>
> +<br>
> +To compile the examples::<br>
> +<br>
> +        cd C:\Users\me\dpdk<br>
> +        meson -Dexamples=helloworld build<br>
<br>
        meson setup -Dexamples=helloworld build<br>
<br>
> +        ninja -C build<br>
<br>
        meson compile -C build<br>
<br>
> +<br>
> +**Option 2. Cross-Compile with MinGW-w64**<br>
> +<br>
> +The cross-file option must be specified for Meson. <br>
> +Depending on the distribution, paths in this file may need adjustments::<br>
> +<br>
> +        meson --cross-file config/x86/cross-mingw -Dexamples=helloworld build<br>
> +        ninja -C build<br>
> \ No newline at end of file<br>
> -- <br>
> 2.41.0.windows.1<br>
</blockquote></div>