[1/1] build: increase minimum meson version to 0.53

Message ID 20220912170747.3128065-2-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Update minimum required meson version |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-aarch64-unit-testing warning Testing issues
ci/iol-intel-Performance fail Performance Testing issues
ci/github-robot: build fail github build: failed
ci/intel-Testing success Testing PASS

Commit Message

Bruce Richardson Sept. 12, 2022, 5:07 p.m. UTC
  This patchset bumps the minimum meson version from 0.49.2 to 0.53.
Rather than specifying a specific point-release of 0.53, as was done
with 0.49, the version specifier is kept to the major release number
only for simplicity, as new features are not introduces into bugfix
releases of meson.

Some new features of interest which can now be used in DPDK with this
new minimum meson version:

* can do header-file checks directly inside find_library calls, rather
  than needing a separate check.[v0.50].
* can pass multiple cross-files at the same time when cross-compiling
  [v0.51].
* "alias_target" function, to allow use to give better/shorter names
  for particular build objects [v0.52].
* auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets
  when those tools are present and config dotfiles are present.
  Similarly ctags and cscope are added as targets when those tools are
  present [v0.53]
* meson module for filesystem operations, so meson can now check for the
  presence of particlar files or directories [v0.53].
* "summary" function to provide a configuration summary at the end of
  the meson run [v0.53].

Plus many other features. See [1] for full details of each version.

[1] https://mesonbuild.com/Release-notes.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 .ci/linux-setup.sh                        | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/mlx5/linux/meson.build     | 2 +-
 meson.build                               | 8 +++-----
 5 files changed, 7 insertions(+), 9 deletions(-)
  

Comments

David Marchand Oct. 7, 2022, 1:17 p.m. UTC | #1
On Mon, Sep 12, 2022 at 7:08 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> This patchset bumps the minimum meson version from 0.49.2 to 0.53.
> Rather than specifying a specific point-release of 0.53, as was done
> with 0.49, the version specifier is kept to the major release number
> only for simplicity, as new features are not introduces into bugfix
> releases of meson.
>
> Some new features of interest which can now be used in DPDK with this
> new minimum meson version:
>
> * can do header-file checks directly inside find_library calls, rather
>   than needing a separate check.[v0.50].
> * can pass multiple cross-files at the same time when cross-compiling
>   [v0.51].
> * "alias_target" function, to allow use to give better/shorter names
>   for particular build objects [v0.52].
> * auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets
>   when those tools are present and config dotfiles are present.
>   Similarly ctags and cscope are added as targets when those tools are
>   present [v0.53]
> * meson module for filesystem operations, so meson can now check for the
>   presence of particlar files or directories [v0.53].
> * "summary" function to provide a configuration summary at the end of
>   the meson run [v0.53].
>
> Plus many other features. See [1] for full details of each version.
>
> [1] https://mesonbuild.com/Release-notes.html
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

- We have an issue with mingw cross compilation.
https://github.com/ovsrobot/dpdk/actions/runs/3039251235/jobs/4893964186

+ meson build --werror --cross-file config/x86/cross-mingw
-Dexamples=helloworld -Dplatform=generic --default-library=static
--buildtype=debugoptimized -Dcheck_includes=true
The Meson build system
Version: 0.53.0
Source dir: /home/runner/work/dpdk/dpdk
Build dir: /home/runner/work/dpdk/dpdk/build
Build type: cross build
Program cat found: YES (/usr/bin/cat)
Project name: DPDK
Project version: 22.11.0-rc0
C compiler for the build machine: ccache gcc (gcc 9.4.0 "gcc (Ubuntu
9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the build machine: gcc GNU ld.bfd 2.34

meson.build:4:0: ERROR: Unable to determine dynamic linker


- I reproduced locally, it looks like meson is trying to pass some
-fuse-ld option that is not understood.
4577  write(2, "x86_64-w64-mingw32-gcc: error: unrecognized command
line option \342\200\230-fuse-ld=x86_64-w64-mingw32-ld\342\200\231\n",
101) = 101


- Upgrading to 0.53.1, I don't see the issue anymore for mingw, so I
pushed a branch in GHA to get a status for other targets.
https://github.com/david-marchand/dpdk/actions/runs/3205007946
  
Bruce Richardson Oct. 7, 2022, 2:11 p.m. UTC | #2
On Fri, Oct 07, 2022 at 03:17:57PM +0200, David Marchand wrote:
> On Mon, Sep 12, 2022 at 7:08 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > This patchset bumps the minimum meson version from 0.49.2 to 0.53.
> > Rather than specifying a specific point-release of 0.53, as was done
> > with 0.49, the version specifier is kept to the major release number
> > only for simplicity, as new features are not introduces into bugfix
> > releases of meson.
> >
> > Some new features of interest which can now be used in DPDK with this
> > new minimum meson version:
> >
> > * can do header-file checks directly inside find_library calls, rather
> >   than needing a separate check.[v0.50].
> > * can pass multiple cross-files at the same time when cross-compiling
> >   [v0.51].
> > * "alias_target" function, to allow use to give better/shorter names
> >   for particular build objects [v0.52].
> > * auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets
> >   when those tools are present and config dotfiles are present.
> >   Similarly ctags and cscope are added as targets when those tools are
> >   present [v0.53]
> > * meson module for filesystem operations, so meson can now check for the
> >   presence of particlar files or directories [v0.53].
> > * "summary" function to provide a configuration summary at the end of
> >   the meson run [v0.53].
> >
> > Plus many other features. See [1] for full details of each version.
> >
> > [1] https://mesonbuild.com/Release-notes.html
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> - We have an issue with mingw cross compilation.
> https://github.com/ovsrobot/dpdk/actions/runs/3039251235/jobs/4893964186
> 
> + meson build --werror --cross-file config/x86/cross-mingw
> -Dexamples=helloworld -Dplatform=generic --default-library=static
> --buildtype=debugoptimized -Dcheck_includes=true
> The Meson build system
> Version: 0.53.0
> Source dir: /home/runner/work/dpdk/dpdk
> Build dir: /home/runner/work/dpdk/dpdk/build
> Build type: cross build
> Program cat found: YES (/usr/bin/cat)
> Project name: DPDK
> Project version: 22.11.0-rc0
> C compiler for the build machine: ccache gcc (gcc 9.4.0 "gcc (Ubuntu
> 9.4.0-1ubuntu1~20.04.1) 9.4.0")
> C linker for the build machine: gcc GNU ld.bfd 2.34
> 
> meson.build:4:0: ERROR: Unable to determine dynamic linker
> 
> 
> - I reproduced locally, it looks like meson is trying to pass some
> -fuse-ld option that is not understood.
> 4577  write(2, "x86_64-w64-mingw32-gcc: error: unrecognized command
> line option \342\200\230-fuse-ld=x86_64-w64-mingw32-ld\342\200\231\n",
> 101) = 101
> 
> 
> - Upgrading to 0.53.1, I don't see the issue anymore for mingw, so I
> pushed a branch in GHA to get a status for other targets.
> https://github.com/david-marchand/dpdk/actions/runs/3205007946
> 
So minimum should be 0.53.1 rather than 0.53 then?
  
David Marchand Oct. 7, 2022, 3:26 p.m. UTC | #3
On Fri, Oct 7, 2022 at 4:11 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > - We have an issue with mingw cross compilation.
> > https://github.com/ovsrobot/dpdk/actions/runs/3039251235/jobs/4893964186
> >
> > + meson build --werror --cross-file config/x86/cross-mingw
> > -Dexamples=helloworld -Dplatform=generic --default-library=static
> > --buildtype=debugoptimized -Dcheck_includes=true
> > The Meson build system
> > Version: 0.53.0
> > Source dir: /home/runner/work/dpdk/dpdk
> > Build dir: /home/runner/work/dpdk/dpdk/build
> > Build type: cross build
> > Program cat found: YES (/usr/bin/cat)
> > Project name: DPDK
> > Project version: 22.11.0-rc0
> > C compiler for the build machine: ccache gcc (gcc 9.4.0 "gcc (Ubuntu
> > 9.4.0-1ubuntu1~20.04.1) 9.4.0")
> > C linker for the build machine: gcc GNU ld.bfd 2.34
> >
> > meson.build:4:0: ERROR: Unable to determine dynamic linker
> >
> >
> > - I reproduced locally, it looks like meson is trying to pass some
> > -fuse-ld option that is not understood.
> > 4577  write(2, "x86_64-w64-mingw32-gcc: error: unrecognized command
> > line option \342\200\230-fuse-ld=x86_64-w64-mingw32-ld\342\200\231\n",
> > 101) = 101
> >
> >
> > - Upgrading to 0.53.1, I don't see the issue anymore for mingw, so I
> > pushed a branch in GHA to get a status for other targets.
> > https://github.com/david-marchand/dpdk/actions/runs/3205007946
> >
> So minimum should be 0.53.1 rather than 0.53 then?
>

- That's what my test shows.
Fyi, 0.53.2 works too.


- With 0.53, it seems the meaning of the ld variable (in meson config
file) changed.
I am unclear though if our current configs still make sense.
  
Bruce Richardson Oct. 7, 2022, 3:34 p.m. UTC | #4
On Fri, Oct 07, 2022 at 05:26:05PM +0200, David Marchand wrote:
> On Fri, Oct 7, 2022 at 4:11 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > > - We have an issue with mingw cross compilation.
> > > https://github.com/ovsrobot/dpdk/actions/runs/3039251235/jobs/4893964186
> > >
> > > + meson build --werror --cross-file config/x86/cross-mingw
> > > -Dexamples=helloworld -Dplatform=generic --default-library=static
> > > --buildtype=debugoptimized -Dcheck_includes=true
> > > The Meson build system
> > > Version: 0.53.0
> > > Source dir: /home/runner/work/dpdk/dpdk
> > > Build dir: /home/runner/work/dpdk/dpdk/build
> > > Build type: cross build
> > > Program cat found: YES (/usr/bin/cat)
> > > Project name: DPDK
> > > Project version: 22.11.0-rc0
> > > C compiler for the build machine: ccache gcc (gcc 9.4.0 "gcc (Ubuntu
> > > 9.4.0-1ubuntu1~20.04.1) 9.4.0")
> > > C linker for the build machine: gcc GNU ld.bfd 2.34
> > >
> > > meson.build:4:0: ERROR: Unable to determine dynamic linker
> > >
> > >
> > > - I reproduced locally, it looks like meson is trying to pass some
> > > -fuse-ld option that is not understood.
> > > 4577  write(2, "x86_64-w64-mingw32-gcc: error: unrecognized command
> > > line option \342\200\230-fuse-ld=x86_64-w64-mingw32-ld\342\200\231\n",
> > > 101) = 101
> > >
> > >
> > > - Upgrading to 0.53.1, I don't see the issue anymore for mingw, so I
> > > pushed a branch in GHA to get a status for other targets.
> > > https://github.com/david-marchand/dpdk/actions/runs/3205007946
> > >
> > So minimum should be 0.53.1 rather than 0.53 then?
> >
> 
> - That's what my test shows.
> Fyi, 0.53.2 works too.
> 
As latest point release of 0.53 that is probably better choice.

> 
> - With 0.53, it seems the meaning of the ld variable (in meson config
> file) changed.
> I am unclear though if our current configs still make sense.
> 
Do you want more time to examine this, or shall I respin this patch with
0.53.2 as minimum version?

/Bruce
  
David Marchand Oct. 7, 2022, 3:49 p.m. UTC | #5
On Fri, Oct 7, 2022 at 5:34 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Oct 07, 2022 at 05:26:05PM +0200, David Marchand wrote:
> > On Fri, Oct 7, 2022 at 4:11 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > > > - We have an issue with mingw cross compilation.
> > > > https://github.com/ovsrobot/dpdk/actions/runs/3039251235/jobs/4893964186
> > > >
> > > > + meson build --werror --cross-file config/x86/cross-mingw
> > > > -Dexamples=helloworld -Dplatform=generic --default-library=static
> > > > --buildtype=debugoptimized -Dcheck_includes=true
> > > > The Meson build system
> > > > Version: 0.53.0
> > > > Source dir: /home/runner/work/dpdk/dpdk
> > > > Build dir: /home/runner/work/dpdk/dpdk/build
> > > > Build type: cross build
> > > > Program cat found: YES (/usr/bin/cat)
> > > > Project name: DPDK
> > > > Project version: 22.11.0-rc0
> > > > C compiler for the build machine: ccache gcc (gcc 9.4.0 "gcc (Ubuntu
> > > > 9.4.0-1ubuntu1~20.04.1) 9.4.0")
> > > > C linker for the build machine: gcc GNU ld.bfd 2.34
> > > >
> > > > meson.build:4:0: ERROR: Unable to determine dynamic linker
> > > >
> > > >
> > > > - I reproduced locally, it looks like meson is trying to pass some
> > > > -fuse-ld option that is not understood.
> > > > 4577  write(2, "x86_64-w64-mingw32-gcc: error: unrecognized command
> > > > line option \342\200\230-fuse-ld=x86_64-w64-mingw32-ld\342\200\231\n",
> > > > 101) = 101
> > > >
> > > >
> > > > - Upgrading to 0.53.1, I don't see the issue anymore for mingw, so I
> > > > pushed a branch in GHA to get a status for other targets.
> > > > https://github.com/david-marchand/dpdk/actions/runs/3205007946
> > > >
> > > So minimum should be 0.53.1 rather than 0.53 then?
> > >
> >
> > - That's what my test shows.
> > Fyi, 0.53.2 works too.
> >
> As latest point release of 0.53 that is probably better choice.
>
> >
> > - With 0.53, it seems the meaning of the ld variable (in meson config
> > file) changed.
> > I am unclear though if our current configs still make sense.
> >
> Do you want more time to examine this, or shall I respin this patch with
> 0.53.2 as minimum version?

https://github.com/mesonbuild/meson/issues/6442
https://github.com/mesonbuild/meson/pull/6457/commits/8e7a7c36b579c11dd389fcb1152a4e8ead8b8782

I understand that the ld variable meaning has been restored, so
nothing to change for us.

Please respin to 0.53.2, with a note about this issue for posterity.

Thanks.
  

Patch

diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
index f5ef6b1b98..fd5b033051 100755
--- a/.ci/linux-setup.sh
+++ b/.ci/linux-setup.sh
@@ -4,7 +4,7 @@ 
 [ "$(id -u)" != '0' ] || alias sudo=
 
 # need to install as 'root' since some of the unit tests won't run without it
-sudo python3 -m pip install --upgrade 'meson==0.49.2'
+sudo python3 -m pip install --upgrade 'meson==0.53'
 
 # setup hugepages. error ignored because having hugepage is not mandatory.
 cat /proc/meminfo
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index 08d45898f0..a13aed76e1 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -43,7 +43,7 @@  Compilation of the DPDK
 
 *   Python 3.5 or later.
 
-*   Meson (version 0.49.2+) and ninja
+*   Meson (version 0.53+) and ninja
 
     * ``meson`` & ``ninja-build`` packages in most Linux distributions
     * If the packaged version is below the minimum version, the latest versions
diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst
index 30ce805902..f729bf1773 100644
--- a/doc/guides/prog_guide/build-sdk-meson.rst
+++ b/doc/guides/prog_guide/build-sdk-meson.rst
@@ -35,7 +35,7 @@  The ``meson`` tool is used to configure a DPDK build. On most Linux
 distributions this can be got using the local package management system,
 e.g. ``dnf install meson`` or ``apt-get install meson``. If meson is not
 available as a suitable package, it can also be installed using the Python
-3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.49.2 of meson is
+3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.53 of meson is
 required - if the version packaged is too old, the latest version is
 generally available from "pip".
 
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index f9d1937571..e77b46d157 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -47,7 +47,7 @@  endif
 
 libmtcr_ul_found = false
 lib = cc.find_library('mtcr_ul', required:false)
-if lib.found() and run_command('meson', '--version').stdout().version_compare('>= 0.49.2')
+if lib.found()
     libmtcr_ul_found = true
     ext_deps += lib
 endif
diff --git a/meson.build b/meson.build
index 7d6643da3a..87e1e48f09 100644
--- a/meson.build
+++ b/meson.build
@@ -12,16 +12,14 @@  project('DPDK', 'C',
             'default_library=static',
             'warning_level=2',
         ],
-        meson_version: '>= 0.49.2'
+        meson_version: '>= 0.53'
 )
 
 # check for developer mode
 developer_mode = false
 if get_option('developer_mode').auto()
-    if meson.version().version_compare('>=0.53') # fs module available
-        fs = import('fs')
-        developer_mode = fs.exists('.git')
-    endif
+    fs = import('fs')
+    developer_mode = fs.exists('.git')
 else
     developer_mode = get_option('developer_mode').enabled()
 endif