Skip to contentSkip to conversation

doc: prefer installing using meson rather than ninja

PATCH Superseded Bruce Richardson 3 participants 10 messages Jun 9, 2023 – Jun 28, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: prefer installing using meson rather than ninja

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)
doc/guides/contributing/coding_style.rst +1 -1
index 89db6260cf..00d6270624 100644
@@ -956,7 +956,7 @@ ext_deps
 headers
 	**Default Value = []**.
 	Used to return the list of header files for the library that should be
-	installed to $PREFIX/include when ``ninja install`` is run. As with
+	installed to $PREFIX/include when ``meson install`` is run. As with
 	source files, these should be specified using the meson ``files()``
 	function.
 	When ``check_includes`` build option is set to ``true``, each header file
doc/guides/cryptodevs/uadk.rst +1 -1
index 9af6b88a5a..136ab4be6a 100644
@@ -90,7 +90,7 @@ Test steps
       meson setup build (--reconfigure)
       cd build
       ninja
-      sudo ninja install
+      sudo meson install
 
 #. Prepare hugepages for DPDK (see also :doc:`../tools/hugepages`)
 
doc/guides/freebsd_gsg/build_dpdk.rst +1 -1
index 514d18c870..86e8e5a805 100644
@@ -47,7 +47,7 @@ The final, install, step generally needs to be run as root::
   meson setup build
   cd build
   ninja
-  ninja install
+  meson install
 
 This will install the DPDK libraries and drivers to `/usr/local/lib` with a
 pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
doc/guides/freebsd_gsg/build_sample_apps.rst +1 -1
index c87e982759..b1ab7545b1 100644
@@ -22,7 +22,7 @@ the system when DPDK is installed, and so can be built using GNU make.
    on the FreeBSD system.
 
 The following shows how to compile the helloworld example app, following
-the installation of DPDK using `ninja install` as described previously::
+the installation of DPDK using `meson install` as described previously::
 
         $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 
doc/guides/linux_gsg/build_dpdk.rst +1 -1
index bbd2efc9d8..56a503dc96 100644
@@ -68,7 +68,7 @@ Once configured, to build and then install DPDK system-wide use:
 
         cd build
         ninja
-        ninja install
+        meson install
         ldconfig
 
 The last two commands above generally need to be run as root,
doc/guides/prog_guide/build-sdk-meson.rst +2 -2
index 5deabbe54c..93aa1f80e3 100644
@@ -12,7 +12,7 @@ following set of commands::
 	meson setup build
 	cd build
 	ninja
-	ninja install
+	meson install
 
 This will compile DPDK in the ``build`` subdirectory, and then install the
 resulting libraries, drivers and header files onto the system - generally
@@ -165,7 +165,7 @@ printing each command on a new line as it runs.
 Installing the Compiled Files
 ------------------------------
 
-Use ``ninja install`` to install the required DPDK files onto the system.
+Use ``meson install`` to install the required DPDK files onto the system.
 The install prefix defaults to ``/usr/local`` but can be used as with other
 options above. The environment variable ``DESTDIR`` can be used to adjust
 the root directory for the install, for example when packaging.
Signature · 1 line
2.39.2
#1 lore raw
Quoted 11 lines · Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

Should we align the CI scripts?

Signature · 1 line
David Marchand
#2 lore raw
Quoted 10 lines · David Marchand
Quoted 8 lines · Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

Quoted 6 lines
Quoted 3 lines

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

Should we align the CI scripts?

Hadn't considered it.

For them, it probably doesn't matter. This change is only really for someone building as one user and then doing a sudo install. The CI scripts don't install system-wide so don't need any privilege changes.

However, if you think our CI should just align with the practice in the docs, I can do a V2 with some CI changes too.

/Bruce

#3 lore raw
Quoted 18 lines · Bruce Richardson
Quoted 10 lines · David Marchand
Quoted 8 lines · Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

Quoted 6 lines
Quoted 3 lines

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

Should we align the CI scripts?

Quoted 8 lines

Hadn't considered it.

For them, it probably doesn't matter. This change is only really for someone building as one user and then doing a sudo install. The CI scripts don't install system-wide so don't need any privilege changes.

However, if you think our CI should just align with the practice in the docs, I can do a V2 with some CI changes too.

My concern is that we recommend something we are not testing. So I'd prefer we have some minimal testing.

Signature · 1 line
David Marchand
#4 lore raw

PATCH v2 1/1 doc: prefer installing using meson rather than ninja

In reply to Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---
V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly tested.

---
 .ci/linux-build.sh                           | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)
.ci/linux-build.sh +2 -2
index 9631e342b5..69ca46a6a1 100755
@@ -150,14 +150,14 @@ if [ "$ABI_CHECKS" = "true" ]; then
         git clone --single-branch -b "$REF_GIT_TAG" $REF_GIT_REPO $refsrcdir
         meson setup $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
-        DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
+        DESTDIR=$(pwd)/reference meson -C $refsrcdir/build install
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
         echo $REF_GIT_TAG > reference/VERSION
     fi
 
-    DESTDIR=$(pwd)/install ninja -C build install
+    DESTDIR=$(pwd)/install meson -C build install
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
doc/guides/contributing/coding_style.rst +1 -1
index 89db6260cf..00d6270624 100644
@@ -956,7 +956,7 @@ ext_deps
 headers
 	**Default Value = []**.
 	Used to return the list of header files for the library that should be
-	installed to $PREFIX/include when ``ninja install`` is run. As with
+	installed to $PREFIX/include when ``meson install`` is run. As with
 	source files, these should be specified using the meson ``files()``
 	function.
 	When ``check_includes`` build option is set to ``true``, each header file
doc/guides/cryptodevs/uadk.rst +1 -1
index 9af6b88a5a..136ab4be6a 100644
@@ -90,7 +90,7 @@ Test steps
       meson setup build (--reconfigure)
       cd build
       ninja
-      sudo ninja install
+      sudo meson install
 
 #. Prepare hugepages for DPDK (see also :doc:`../tools/hugepages`)
 
doc/guides/freebsd_gsg/build_dpdk.rst +1 -1
index 514d18c870..86e8e5a805 100644
@@ -47,7 +47,7 @@ The final, install, step generally needs to be run as root::
   meson setup build
   cd build
   ninja
-  ninja install
+  meson install
 
 This will install the DPDK libraries and drivers to `/usr/local/lib` with a
 pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
doc/guides/freebsd_gsg/build_sample_apps.rst +1 -1
index c87e982759..b1ab7545b1 100644
@@ -22,7 +22,7 @@ the system when DPDK is installed, and so can be built using GNU make.
    on the FreeBSD system.
 
 The following shows how to compile the helloworld example app, following
-the installation of DPDK using `ninja install` as described previously::
+the installation of DPDK using `meson install` as described previously::
 
         $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 
doc/guides/linux_gsg/build_dpdk.rst +2 -2
index bbd2efc9d8..9c0dd9daf6 100644
@@ -68,11 +68,11 @@ Once configured, to build and then install DPDK system-wide use:
 
         cd build
         ninja
-        ninja install
+        meson install
         ldconfig
 
 The last two commands above generally need to be run as root,
-with the `ninja install` step copying the built objects to their final system-wide locations,
+with the `meson install` step copying the built objects to their final system-wide locations,
 and the last step causing the dynamic loader `ld.so` to update its cache to take account of the new objects.
 
 .. note::
doc/guides/prog_guide/build-sdk-meson.rst +2 -2
index 5deabbe54c..93aa1f80e3 100644
@@ -12,7 +12,7 @@ following set of commands::
 	meson setup build
 	cd build
 	ninja
-	ninja install
+	meson install
 
 This will compile DPDK in the ``build`` subdirectory, and then install the
 resulting libraries, drivers and header files onto the system - generally
@@ -165,7 +165,7 @@ printing each command on a new line as it runs.
 Installing the Compiled Files
 ------------------------------
 
-Use ``ninja install`` to install the required DPDK files onto the system.
+Use ``meson install`` to install the required DPDK files onto the system.
 The install prefix defaults to ``/usr/local`` but can be used as with other
 options above. The environment variable ``DESTDIR`` can be used to adjust
 the root directory for the install, for example when packaging.
Signature · 1 line
2.39.2
#5 lore raw

PATCH v3 1/1 doc: prefer installing using meson rather than ninja

In reply to Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---
V3:
* correct order of arguments to meson in CI scripts. The "-C" option must follow the meson "install" command. [This is consistent with other uses e.g. meson compile -C ..., meson test -C ...]

V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly tested.

---
 .ci/linux-build.sh                           | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)
.ci/linux-build.sh +2 -2
index 9631e342b5..76d3e776af 100755
@@ -150,14 +150,14 @@ if [ "$ABI_CHECKS" = "true" ]; then
         git clone --single-branch -b "$REF_GIT_TAG" $REF_GIT_REPO $refsrcdir
         meson setup $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
-        DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
+        DESTDIR=$(pwd)/reference meson install -C $refsrcdir/build
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
         echo $REF_GIT_TAG > reference/VERSION
     fi
 
-    DESTDIR=$(pwd)/install ninja -C build install
+    DESTDIR=$(pwd)/install meson install -C build
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
doc/guides/contributing/coding_style.rst +1 -1
index 89db6260cf..00d6270624 100644
@@ -956,7 +956,7 @@ ext_deps
 headers
 	**Default Value = []**.
 	Used to return the list of header files for the library that should be
-	installed to $PREFIX/include when ``ninja install`` is run. As with
+	installed to $PREFIX/include when ``meson install`` is run. As with
 	source files, these should be specified using the meson ``files()``
 	function.
 	When ``check_includes`` build option is set to ``true``, each header file
doc/guides/cryptodevs/uadk.rst +1 -1
index 9af6b88a5a..136ab4be6a 100644
@@ -90,7 +90,7 @@ Test steps
       meson setup build (--reconfigure)
       cd build
       ninja
-      sudo ninja install
+      sudo meson install
 
 #. Prepare hugepages for DPDK (see also :doc:`../tools/hugepages`)
 
doc/guides/freebsd_gsg/build_dpdk.rst +1 -1
index 514d18c870..86e8e5a805 100644
@@ -47,7 +47,7 @@ The final, install, step generally needs to be run as root::
   meson setup build
   cd build
   ninja
-  ninja install
+  meson install
 
 This will install the DPDK libraries and drivers to `/usr/local/lib` with a
 pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
doc/guides/freebsd_gsg/build_sample_apps.rst +1 -1
index c87e982759..b1ab7545b1 100644
@@ -22,7 +22,7 @@ the system when DPDK is installed, and so can be built using GNU make.
    on the FreeBSD system.
 
 The following shows how to compile the helloworld example app, following
-the installation of DPDK using `ninja install` as described previously::
+the installation of DPDK using `meson install` as described previously::
 
         $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 
doc/guides/linux_gsg/build_dpdk.rst +2 -2
index bbd2efc9d8..9c0dd9daf6 100644
@@ -68,11 +68,11 @@ Once configured, to build and then install DPDK system-wide use:
 
         cd build
         ninja
-        ninja install
+        meson install
         ldconfig
 
 The last two commands above generally need to be run as root,
-with the `ninja install` step copying the built objects to their final system-wide locations,
+with the `meson install` step copying the built objects to their final system-wide locations,
 and the last step causing the dynamic loader `ld.so` to update its cache to take account of the new objects.
 
 .. note::
doc/guides/prog_guide/build-sdk-meson.rst +2 -2
index 5deabbe54c..93aa1f80e3 100644
@@ -12,7 +12,7 @@ following set of commands::
 	meson setup build
 	cd build
 	ninja
-	ninja install
+	meson install
 
 This will compile DPDK in the ``build`` subdirectory, and then install the
 resulting libraries, drivers and header files onto the system - generally
@@ -165,7 +165,7 @@ printing each command on a new line as it runs.
 Installing the Compiled Files
 ------------------------------
 
-Use ``ninja install`` to install the required DPDK files onto the system.
+Use ``meson install`` to install the required DPDK files onto the system.
 The install prefix defaults to ``/usr/local`` but can be used as with other
 options above. The environment variable ``DESTDIR`` can be used to adjust
 the root directory for the install, for example when packaging.
Signature · 1 line
2.39.2
#6 lore raw

09/06/2023 16:51, Bruce Richardson:

Quoted 21 lines

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---
V3:
* correct order of arguments to meson in CI scripts. The "-C" option must follow the meson "install" command. [This is consistent with other uses e.g. meson compile -C ..., meson test -C ...]

V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly tested.

Quoted 9 lines
---
 .ci/linux-build.sh                           | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)

I see other occurences which could be replaced:

.ci/linux-build.sh: [ -d install ] || DESTDIR=$(pwd)/install ninja -C build install

devtools/test-meson-builds.sh:  echo "DESTDIR=$2 $ninja_cmd -C $1 install" >&$verbose
devtools/test-meson-builds.sh:  DESTDIR=$2 $ninja_cmd -C $1 install >&$veryverbose
doc/guides/nics/mlx4.rst:    ninja install
doc/guides/platform/mlx5.rst:    ninja install
#7 lore raw
Quoted 32 lines · Thomas Monjalon

09/06/2023 16:51, Bruce Richardson:

Quoted 21 lines

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---
V3:
* correct order of arguments to meson in CI scripts. The "-C" option must follow the meson "install" command. [This is consistent with other uses e.g. meson compile -C ..., meson test -C ...]

V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly tested.

Quoted 9 lines
---
 .ci/linux-build.sh                           | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)
Quoted 3 lines

I see other occurences which could be replaced:

.ci/linux-build.sh: [ -d install ] || DESTDIR=$(pwd)/install ninja -C build install

Yes, this could be replaced, I somehow missed it.

Quoted 2 lines
devtools/test-meson-builds.sh:  echo "DESTDIR=$2 $ninja_cmd -C $1 install" >&$verbose
devtools/test-meson-builds.sh:  DESTDIR=$2 $ninja_cmd -C $1 install >&$veryverbose

While these could be replaced, the use of ninja is not a problem here, as the whole script runs with user permissions. I'll consider replacing them in a new version, though.

Quoted 2 lines
doc/guides/nics/mlx4.rst:    ninja install
doc/guides/platform/mlx5.rst:    ninja install

I looked at these before when doing the patch. They need to stay as they are. They are part of instructions for installing the mlx driver dependencies, which use cmake, not meson.

/Bruce

#8 lore raw

PATCH v4 1/1 doc: prefer installing using meson rather than ninja

In reply to Bruce Richardson

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

---

V4:
* replaced missed calls to ninja install in ci script and test-meson-builds script.

V3:
* correct order of arguments to meson in CI scripts. The "-C" option must follow the meson "install" command. [This is consistent with other uses e.g. meson compile -C ..., meson test -C ...]

V2:
* Fix one missed reference to "ninja install" in Linux GSG
* Changed CI scripts to use "meson install" to ensure step is properly tested.

---
 .ci/linux-build.sh                           | 6 +++---
 devtools/test-meson-builds.sh                | 4 ++--
 doc/guides/contributing/coding_style.rst     | 2 +-
 doc/guides/cryptodevs/uadk.rst               | 2 +-
 doc/guides/freebsd_gsg/build_dpdk.rst        | 2 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst          | 4 ++--
 doc/guides/prog_guide/build-sdk-meson.rst    | 4 ++--
 8 files changed, 13 insertions(+), 13 deletions(-)
.ci/linux-build.sh +3 -3
index d0d9f89bae..45f2729996 100755
@@ -151,14 +151,14 @@ if [ "$ABI_CHECKS" = "true" ]; then
         git clone --single-branch -b "$REF_GIT_TAG" $REF_GIT_REPO $refsrcdir
         meson setup $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
-        DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
+        DESTDIR=$(pwd)/reference meson install -C $refsrcdir/build
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
         echo $REF_GIT_TAG > reference/VERSION
     fi
 
-    DESTDIR=$(pwd)/install ninja -C build install
+    DESTDIR=$(pwd)/install meson install -C build
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
@@ -172,7 +172,7 @@ fi
 
 # Test examples compilation with an installed dpdk
 if [ "$BUILD_EXAMPLES" = "true" ]; then
-    [ -d install ] || DESTDIR=$(pwd)/install ninja -C build install
+    [ -d install ] || DESTDIR=$(pwd)/install meson install -C build
     export LD_LIBRARY_PATH=$(dirname $(find $(pwd)/install -name librte_eal.so)):$LD_LIBRARY_PATH
     export PKG_CONFIG_PATH=$(dirname $(find $(pwd)/install -name libdpdk.pc)):$PKG_CONFIG_PATH
     export PKGCONF="pkg-config --define-prefix"
devtools/test-meson-builds.sh +2 -2
index 1eb28a2490..84b907d2ea 100755
@@ -158,8 +158,8 @@ compile () # <builddir>
 install_target () # <builddir> <installdir>
 {
 	rm -rf $2
-	echo "DESTDIR=$2 $ninja_cmd -C $1 install" >&$verbose
-	DESTDIR=$2 $ninja_cmd -C $1 install >&$veryverbose
+	echo "DESTDIR=$2 $MESON install -C $1" >&$verbose
+	DESTDIR=$2 $MESON install -C $1 >&$veryverbose
 }
 
 build () # <directory> <target cc | cross file> <ABI check> [meson options]
doc/guides/contributing/coding_style.rst +1 -1
index 0861305dc6..13b2390d9e 100644
@@ -975,7 +975,7 @@ ext_deps
 headers
 	**Default Value = []**.
 	Used to return the list of header files for the library that should be
-	installed to $PREFIX/include when ``ninja install`` is run. As with
+	installed to $PREFIX/include when ``meson install`` is run. As with
 	source files, these should be specified using the meson ``files()``
 	function.
 	When ``check_includes`` build option is set to ``true``, each header file
doc/guides/cryptodevs/uadk.rst +1 -1
index 9af6b88a5a..136ab4be6a 100644
@@ -90,7 +90,7 @@ Test steps
       meson setup build (--reconfigure)
       cd build
       ninja
-      sudo ninja install
+      sudo meson install
 
 #. Prepare hugepages for DPDK (see also :doc:`../tools/hugepages`)
 
doc/guides/freebsd_gsg/build_dpdk.rst +1 -1
index 514d18c870..86e8e5a805 100644
@@ -47,7 +47,7 @@ The final, install, step generally needs to be run as root::
   meson setup build
   cd build
   ninja
-  ninja install
+  meson install
 
 This will install the DPDK libraries and drivers to `/usr/local/lib` with a
 pkg-config file `libdpdk.pc` installed to `/usr/local/lib/pkgconfig`. The
doc/guides/freebsd_gsg/build_sample_apps.rst +1 -1
index c87e982759..b1ab7545b1 100644
@@ -22,7 +22,7 @@ the system when DPDK is installed, and so can be built using GNU make.
    on the FreeBSD system.
 
 The following shows how to compile the helloworld example app, following
-the installation of DPDK using `ninja install` as described previously::
+the installation of DPDK using `meson install` as described previously::
 
         $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 
doc/guides/linux_gsg/build_dpdk.rst +2 -2
index bbd2efc9d8..9c0dd9daf6 100644
@@ -68,11 +68,11 @@ Once configured, to build and then install DPDK system-wide use:
 
         cd build
         ninja
-        ninja install
+        meson install
         ldconfig
 
 The last two commands above generally need to be run as root,
-with the `ninja install` step copying the built objects to their final system-wide locations,
+with the `meson install` step copying the built objects to their final system-wide locations,
 and the last step causing the dynamic loader `ld.so` to update its cache to take account of the new objects.
 
 .. note::
doc/guides/prog_guide/build-sdk-meson.rst +2 -2
index 5deabbe54c..93aa1f80e3 100644
@@ -12,7 +12,7 @@ following set of commands::
 	meson setup build
 	cd build
 	ninja
-	ninja install
+	meson install
 
 This will compile DPDK in the ``build`` subdirectory, and then install the
 resulting libraries, drivers and header files onto the system - generally
@@ -165,7 +165,7 @@ printing each command on a new line as it runs.
 Installing the Compiled Files
 ------------------------------
 
-Use ``ninja install`` to install the required DPDK files onto the system.
+Use ``meson install`` to install the required DPDK files onto the system.
 The install prefix defaults to ``/usr/local`` but can be used as with other
 options above. The environment variable ``DESTDIR`` can be used to adjust
 the root directory for the install, for example when packaging.
Signature · 1 line
2.39.2
#9 lore raw

23/06/2023 13:43, Bruce Richardson:

Quoted 10 lines

After doing a build, to install DPDK system-wide our documentation recommended using the "ninja install" command. However, for anyone building as a non-root user and only installing as root, the "meson install" command is a better alternative, as it provides for automatically dropping or elevating privileges as necessary in more recent meson releases [1].

[1] https://mesonbuild.com/Installing.html#installing-as-the-superuser

Applied, thanks.