doc: prefer installing using meson rather than ninja
Checks
Commit Message
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
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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(-)
Comments
On Fri, Jun 9, 2023 at 12:52 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Should we align the CI scripts?
On Fri, Jun 09, 2023 at 01:13:15PM +0200, David Marchand wrote:
> On Fri, Jun 9, 2023 at 12:52 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > 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
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> 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
On Fri, Jun 9, 2023 at 1:19 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Jun 09, 2023 at 01:13:15PM +0200, David Marchand wrote:
> > On Fri, Jun 9, 2023 at 12:52 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > 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
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> > 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.
My concern is that we recommend something we are not testing.
So I'd prefer we have some minimal testing.
@@ -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
@@ -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`)
@@ -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
@@ -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
@@ -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,
@@ -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.