doc: avoid meson deprecation in setup

The command "meson build" causes a deprecation warning with meson 0.64.0.

WARNING: Running the setup command as `meson [options]` instead of
    `meson setup [options]` is ambiguous and deprecated.

Therefore fix the examples in the documentation.

Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stanislaw Kardach <kda@semihalf.com>
This commit is contained in:
Stephen Hemminger 2022-11-15 09:35:16 -08:00 committed by David Marchand
parent db4092276a
commit e24b8ad46b
21 changed files with 63 additions and 58 deletions

View File

@ -47,7 +47,7 @@ To build DPDK with this virtual crypto PMD, the user is required to:
.. code-block:: console .. code-block:: console
meson build meson setup build
ninja -C build ninja -C build
The corresponding device can be created only if the following features The corresponding device can be created only if the following features

View File

@ -70,7 +70,7 @@ for cross compiling on x86 platform.
.. code-block:: console .. code-block:: console
cd <DPDK-source-directory> cd <DPDK-source-directory>
meson <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc meson setup <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc
cd <dest-dir> cd <dest-dir>
ninja ninja

View File

@ -87,7 +87,7 @@ Test steps
cd dpdk cd dpdk
mkdir build mkdir build
meson build (--reconfigure) meson setup build (--reconfigure)
cd build cd build
ninja ninja
sudo ninja install sudo ninja install

View File

@ -44,7 +44,7 @@ Building DPDK
The following commands can be used to build and install DPDK on a system. The following commands can be used to build and install DPDK on a system.
The final, install, step generally needs to be run as root:: The final, install, step generally needs to be run as root::
meson build meson setup build
cd build cd build
ninja ninja
ninja install ninja install

View File

@ -24,8 +24,8 @@ You need to indicate to meson where CUDA headers files are through the CFLAGS va
Three ways: Three ways:
- Set ``export CFLAGS=-I/usr/local/cuda/include`` before building - Set ``export CFLAGS=-I/usr/local/cuda/include`` before building
- Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson build`` - Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson setup build``
- Add the ``-Dc_args`` in meson command line ``meson build -Dc_args=-I/usr/local/cuda/include`` - Add the ``-Dc_args`` in meson command line ``meson setup build -Dc_args=-I/usr/local/cuda/include``
If headers are not found, the CUDA GPU driver library is not built. If headers are not found, the CUDA GPU driver library is not built.
@ -51,7 +51,7 @@ An example would be:
.. code-block:: console .. code-block:: console
$ meson build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include" $ meson setup build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include"
If headers are not found, the CUDA GPU driver library is built without the CPU map capability If headers are not found, the CUDA GPU driver library is built without the CPU map capability
and will return error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function. and will return error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function.

View File

@ -100,7 +100,7 @@ first.
ar = 'x86_64-openwrt-linux-ar' ar = 'x86_64-openwrt-linux-ar'
strip = 'x86_64-openwrt-linux-strip' strip = 'x86_64-openwrt-linux-strip'
meson builddir --cross-file openwrt-cross meson setup builddir --cross-file openwrt-cross
ninja -C builddir ninja -C builddir
Running DPDK application on OpenWrt Running DPDK application on OpenWrt

View File

@ -53,7 +53,7 @@ To configure a DPDK build use:
.. code-block:: console .. code-block:: console
meson <options> build meson setup <options> build
where "build" is the desired output build directory, and "<options>" can be where "build" is the desired output build directory, and "<options>" can be
empty or one of a number of meson or DPDK-specific build options, described empty or one of a number of meson or DPDK-specific build options, described
@ -140,7 +140,7 @@ automatically built as part of a meson build too.
To do so, pass a comma-separated list of the examples to build to the To do so, pass a comma-separated list of the examples to build to the
`-Dexamples` meson option as below:: `-Dexamples` meson option as below::
meson -Dexamples=l2fwd,l3fwd build meson setup -Dexamples=l2fwd,l3fwd build
As with other meson options, this can also be set post-initial-config using `meson configure` in the build directory. As with other meson options, this can also be set post-initial-config using `meson configure` in the build directory.
There is also a special value "all" to request that all example applications whose There is also a special value "all" to request that all example applications whose
@ -166,12 +166,12 @@ The following meson command can be used on RHEL/Fedora systems to configure a 32
assuming the relevant 32-bit development packages, such as a 32-bit libc, are installed:: assuming the relevant 32-bit development packages, such as a 32-bit libc, are installed::
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \ PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \
meson -Dc_args='-m32' -Dc_link_args='-m32' build meson setup -Dc_args='-m32' -Dc_link_args='-m32' build
For Debian/Ubuntu systems, the equivalent command is:: For Debian/Ubuntu systems, the equivalent command is::
PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig \ PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig \
meson -Dc_args='-m32' -Dc_link_args='-m32' build meson setup -Dc_args='-m32' -Dc_link_args='-m32' build
Once the build directory has been configured, Once the build directory has been configured,
DPDK can be compiled using ``ninja`` as described above. DPDK can be compiled using ``ninja`` as described above.

View File

@ -167,19 +167,19 @@ Cross Compiling DPDK with GNU toolchain using Meson
To cross-compile DPDK on a desired target machine we can use the following To cross-compile DPDK on a desired target machine we can use the following
command:: command::
meson cross-build --cross-file <target_machine_configuration> meson setup cross-build --cross-file <target_machine_configuration>
ninja -C cross-build ninja -C cross-build
For example if the target machine is aarch64 we can use the following For example if the target machine is aarch64 we can use the following
command, provided the cross file has been modified accordingly:: command, provided the cross file has been modified accordingly::
meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc meson setup aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
ninja -C aarch64-build-gcc ninja -C aarch64-build-gcc
If the target machine is aarch32 we can use the following command, If the target machine is aarch32 we can use the following command,
provided the cross file has been modified accordingly:: provided the cross file has been modified accordingly::
meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc meson setup aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc
ninja -C aarch32-build ninja -C aarch32-build
LLVM/Clang toolchain LLVM/Clang toolchain
@ -230,7 +230,7 @@ Assuming the file with augmented ``c_args`` and ``c_link_args``
is named ``arm64_armv8_linux_clang``, is named ``arm64_armv8_linux_clang``,
use the following command to cross-compile DPDK for the target machine:: use the following command to cross-compile DPDK for the target machine::
meson aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang meson setup aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang
ninja -C aarch64-build-clang ninja -C aarch64-build-clang
Cross Compiling DPDK with LLVM/Clang toolchain using Meson on Ubuntu 18.04 Cross Compiling DPDK with LLVM/Clang toolchain using Meson on Ubuntu 18.04
@ -247,7 +247,7 @@ On Ubuntu 18.04, these packages are needed:
Use the following command to cross-compile DPDK for the target machine:: Use the following command to cross-compile DPDK for the target machine::
meson aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804 meson setup aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804
ninja -C aarch64-build-clang ninja -C aarch64-build-clang
Building for an aarch64 SoC on an aarch64 build machine Building for an aarch64 SoC on an aarch64 build machine
@ -258,7 +258,7 @@ you don't need a separate cross toolchain, just a different set of
configuration options. To build for an aarch64 SoC, use the -Dplatform meson configuration options. To build for an aarch64 SoC, use the -Dplatform meson
option:: option::
meson soc_build -Dplatform=<target_soc> meson setup soc_build -Dplatform=<target_soc>
Substitute <target_soc> with one of the supported SoCs Substitute <target_soc> with one of the supported SoCs

View File

@ -81,7 +81,7 @@ To cross-compile DPDK for generic LoongArch we can use the following command:
.. code-block:: console .. code-block:: console
meson cross-build --cross-file config/loongarch/loongarch_loongarch64_linux_gcc meson setup cross-build --cross-file config/loongarch/loongarch_loongarch64_linux_gcc
ninja -C cross-build ninja -C cross-build
Supported cross-compilation targets Supported cross-compilation targets

View File

@ -68,13 +68,13 @@ Cross Compiling DPDK with GNU toolchain using Meson
To cross-compile DPDK for a desired target machine use the following command:: To cross-compile DPDK for a desired target machine use the following command::
meson cross-build --cross-file <target_machine_configuration> meson setup cross-build --cross-file <target_machine_configuration>
ninja -C cross-build ninja -C cross-build
For example if the target machine is a generic rv64gc RISC-V, use the following For example if the target machine is a generic rv64gc RISC-V, use the following
command:: command::
meson riscv64-build-gcc --cross-file config/riscv/riscv64_linux_gcc meson setup riscv64-build-gcc --cross-file config/riscv/riscv64_linux_gcc
ninja -C riscv64-build-gcc ninja -C riscv64-build-gcc
If riscv-gnu-toolchain is used, binary names should be updated to match. Update If riscv-gnu-toolchain is used, binary names should be updated to match. Update

View File

@ -282,7 +282,7 @@ CFLAGS environment prior to the meson build step. I.e.,
.. code-block:: console .. code-block:: console
export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60" export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
meson build meson setup build
Supported ARK RTL PCIe Instances Supported ARK RTL PCIe Instances

View File

@ -117,7 +117,7 @@ Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
.. code-block:: console .. code-block:: console
export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
meson build --cross-file config/arm/arm64_armada_linux_gcc meson setup build --cross-file config/arm/arm64_armada_linux_gcc
ninja -C build ninja -C build

View File

@ -133,7 +133,7 @@ Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
meson build --cross-file config/arm/arm64_armada_linux_gcc meson setup build --cross-file config/arm/arm64_armada_linux_gcc
ninja -C build ninja -C build

View File

@ -61,7 +61,7 @@ rdma-core library with corresponding kernel drivers is required.
.. code-block:: console .. code-block:: console
meson build meson setup build
ninja -C build ninja -C build
Cross Compilation Cross Compilation
@ -115,5 +115,5 @@ Then, untar the tarball at the cross toolchain directory on the x86 host.
.. code-block:: console .. code-block:: console
meson build --cross-file config/arm/arm64_bluefield_linux_gcc meson setup build --cross-file config/arm/arm64_bluefield_linux_gcc
ninja -C build ninja -C build

View File

@ -587,14 +587,14 @@ CN9K:
.. code-block:: console .. code-block:: console
meson -Dplatform=cn9k build meson setup -Dplatform=cn9k build
ninja -C build ninja -C build
CN10K: CN10K:
.. code-block:: console .. code-block:: console
meson -Dplatform=cn10k build meson setup -Dplatform=cn10k build
ninja -C build ninja -C build
Cross Compilation Cross Compilation
@ -606,14 +606,14 @@ CN9K:
.. code-block:: console .. code-block:: console
meson build --cross-file config/arm/arm64_cn9k_linux_gcc meson setup build --cross-file config/arm/arm64_cn9k_linux_gcc
ninja -C build ninja -C build
CN10K: CN10K:
.. code-block:: console .. code-block:: console
meson build --cross-file config/arm/arm64_cn10k_linux_gcc meson setup build --cross-file config/arm/arm64_cn10k_linux_gcc
ninja -C build ninja -C build
.. note:: .. note::

View File

@ -94,14 +94,14 @@ drivers can be compiled with the following steps,
.. code-block:: console .. code-block:: console
meson build -Dexamples=<application> meson setup build -Dexamples=<application>
ninja -C build ninja -C build
The example applications can be compiled using the following: The example applications can be compiled using the following:
.. code-block:: console .. code-block:: console
meson build -Dexamples=<application> meson setup build -Dexamples=<application>
ninja -C build ninja -C build
Cross Compilation Cross Compilation
@ -127,7 +127,7 @@ Now this build system can be used to build applications for **OCTEON TX** :sup:`
.. code-block:: console .. code-block:: console
cd <dpdk directory> cd <dpdk directory>
meson build --cross-file config/arm/arm64_thunderx_linux_gcc meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc
ninja -C build ninja -C build
The example applications can be compiled using the following: The example applications can be compiled using the following:
@ -135,7 +135,7 @@ The example applications can be compiled using the following:
.. code-block:: console .. code-block:: console
cd <dpdk directory> cd <dpdk directory>
meson build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application> meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application>
ninja -C build ninja -C build
.. note:: .. note::

View File

@ -9,7 +9,7 @@ Summary
For many platforms, compiling and installing DPDK should work using the For many platforms, compiling and installing DPDK should work using the
following set of commands:: following set of commands::
meson build meson setup build
cd build cd build
ninja ninja
ninja install ninja install
@ -57,12 +57,12 @@ Configuring the Build
---------------------- ----------------------
To configure a build, run the meson tool, passing the path to the directory To configure a build, run the meson tool, passing the path to the directory
to be used for the build e.g. ``meson build``, as shown above. If calling to be used for the build e.g. ``meson setup build``, as shown above. If calling
meson from somewhere other than the root directory of the DPDK project the meson from somewhere other than the root directory of the DPDK project the
path to the root directory should be passed as the first parameter, and the path to the root directory should be passed as the first parameter, and the
build path as the second. For example, to build DPDK in /tmp/dpdk-build:: build path as the second. For example, to build DPDK in /tmp/dpdk-build::
user@host:/tmp$ meson ~user/dpdk dpdk-build user@host:/tmp$ meson setup ~user/dpdk dpdk-build
Meson will then configure the build based on settings in the project's Meson will then configure the build based on settings in the project's
meson.build files, and by checking the build environment for e.g. compiler meson.build files, and by checking the build environment for e.g. compiler
@ -80,24 +80,29 @@ available run ``meson configure`` in the build directory.
Examples of adjusting the defaults when doing initial meson configuration. Examples of adjusting the defaults when doing initial meson configuration.
Project-specific options are passed used -Doption=value:: Project-specific options are passed used -Doption=value::
meson --werror werrorbuild # build with warnings as errors # build with warnings as errors
meson setup --werror werrorbuild
meson --buildtype=debug debugbuild # build for debugging # build for debugging
meson setup --buildtype=debug debugbuild
meson -Dexamples=l3fwd,l2fwd fwdbuild # build some examples as # build some examples as part of the normal DPDK build
# part of the normal DPDK build meson setup -Dexamples=l3fwd,l2fwd fwdbuild
meson -Dmax_lcores=8 smallbuild # scale build for smaller systems # scale build for smaller systems
meson setup -Dmax_lcores=8 smallbuild
meson -Denable_docs=true fullbuild # build and install docs # build and install docs
meson setup -Denable_docs=true fullbuild
meson -Dcpu_instruction_set=generic # use builder-independent baseline -march # use builder-independent baseline -march
meson setup -Dcpu_instruction_set=generic
meson -Ddisable_drivers=event/*,net/tap # disable tap driver and all # disable tap driver and all eventdev PMDs for a smaller build
# eventdev PMDs for a smaller build meson setup -Ddisable_drivers=event/*,net/tap
meson -Denable_trace_fp=true tracebuild # build with fast path traces # build with fast path traces enabled
# enabled meson setup -Denable_trace_fp=true tracebuild
Examples of setting some of the same options using meson configure:: Examples of setting some of the same options using meson configure::
@ -135,7 +140,7 @@ As well as those settings taken from ``meson configure``, other options
such as the compiler to use can be passed via environment variables. For such as the compiler to use can be passed via environment variables. For
example:: example::
CC=clang meson clang-build CC=clang meson setup clang-build
.. note:: .. note::
@ -188,12 +193,12 @@ Cross Compiling DPDK
To cross-compile DPDK on a desired target machine we can use the following To cross-compile DPDK on a desired target machine we can use the following
command:: command::
meson cross-build --cross-file <target_machine_configuration> meson setup cross-build --cross-file <target_machine_configuration>
For example if the target machine is arm64 we can use the following For example if the target machine is arm64 we can use the following
command:: command::
meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc meson setup arm-build --cross-file config/arm/arm64_armv8_linux_gcc
where config/arm/arm64_armv8_linux_gcc contains settings for the compilers where config/arm/arm64_armv8_linux_gcc contains settings for the compilers
and other build tools to be used, as well as characteristics of the target and other build tools to be used, as well as characteristics of the target

View File

@ -30,4 +30,4 @@ Link time optimization can be enabled by setting meson built-in 'b_lto' option:
.. code-block:: console .. code-block:: console
meson build -Db_lto=true meson setup build -Db_lto=true

View File

@ -42,7 +42,7 @@ and recompile the DPDK:
.. code-block:: console .. code-block:: console
meson build meson setup build
meson configure build -Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE meson configure build -Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE
ninja -C build ninja -C build
@ -103,7 +103,7 @@ Example:
.. code-block:: console .. code-block:: console
meson --cross config/arm/arm64_armv8_linux_gcc -Dc_args='-DRTE_ARM_EAL_RDTSC_USE_PMU' build meson setup --cross config/arm/arm64_armv8_linux_gcc -Dc_args='-DRTE_ARM_EAL_RDTSC_USE_PMU' build
.. warning:: .. warning::

View File

@ -255,7 +255,7 @@ To build just the ``vm_power_manager`` application using ``meson``/``ninja``:
.. code-block:: console .. code-block:: console
cd dpdk cd dpdk
meson build meson setup build
cd build cd build
ninja ninja
meson configure -Dexamples=vm_power_manager meson configure -Dexamples=vm_power_manager
@ -494,7 +494,7 @@ To build just the ``vm_power_manager`` application using ``meson``/``ninja``:
.. code-block:: console .. code-block:: console
cd dpdk cd dpdk
meson build meson setup build
cd build cd build
ninja ninja
meson configure -Dexamples=vm_power_manager/guest_cli meson configure -Dexamples=vm_power_manager/guest_cli

View File

@ -104,7 +104,7 @@ To compile the examples, the flag ``-Dexamples`` is required.
.. code-block:: console .. code-block:: console
cd C:\Users\me\dpdk cd C:\Users\me\dpdk
meson -Dexamples=helloworld build meson setup -Dexamples=helloworld build
ninja -C build ninja -C build
Option 2. Cross-Compile with MinGW-w64 Option 2. Cross-Compile with MinGW-w64
@ -115,5 +115,5 @@ Depending on the distribution, paths in this file may need adjustments.
.. code-block:: console .. code-block:: console
meson --cross-file config/x86/cross-mingw -Dexamples=helloworld build meson setup --cross-file config/x86/cross-mingw -Dexamples=helloworld build
ninja -C build ninja -C build