Skip to contentSkip to conversation

Increase minimum meson version

PATCH In review Bruce Richardson 8 participants 27 messages Sep 20, 2024 – Oct 17, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover Increase minimum meson version

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

--
2.43.0

#1 lore raw

PATCH 1/5 build: increase minimum meson version to 0.57

In order to work around some deprecated functions in meson, we need to increase meson version. Increasing to 0.57 to also gain support for other useful features for us in DPDK. Changes of interest to DPDK include:

* Use get_external_property instead of get_cross_property
* Ability to use a VERSION file rather than hacking it with scripting
* Ability to set built-in options in cross-build files
* Ability to set pkg_config_libdir in cross-build files

---
 .ci/linux-setup.sh                        | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 meson.build                               | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
.ci/linux-setup.sh +1 -1
index 975bf32144..8512a92b21 100755
@@ -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.53.2'
+sudo python3 -m pip install --upgrade 'meson==0.57.0'
 
 # setup hugepages. error ignored because having hugepage is not mandatory.
 cat /proc/meminfo
doc/guides/linux_gsg/sys_reqs.rst +1 -1
index 9c5282573e..13d632cec7 100644
@@ -44,7 +44,7 @@ Compilation of the DPDK
 
 *   Python 3.6 or later.
 
-*   Meson (version 0.53.2+) and ninja
+*   Meson (version 0.57+) and ninja
 
     * ``meson`` & ``ninja-build`` packages in most Linux distributions
     * If the packaged version is below the minimum version, the latest versions
doc/guides/prog_guide/build-sdk-meson.rst +1 -1
index 93aa1f80e3..fdb5d484fa 100644
@@ -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.53.2 or later of meson is
+3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.57 or later of meson is
 required - if the version packaged is too old, the latest version is
 generally available from "pip".
 
meson.build +1 -1
index 8b248d4505..69888834b4 100644
@@ -13,7 +13,7 @@ project('DPDK', 'c',
             'default_library=static',
             'warning_level=2',
         ],
-        meson_version: '>= 0.53.2'
+        meson_version: '>= 0.57'
 )
 
 # check for developer mode
Signature · 1 line
2.43.0
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] build: increase minimum meson version to 0.57

Bruce Richardson, Sep 20, 2024 at 14:57:

Quoted 11 lines

In order to work around some deprecated functions in meson, we need to increase meson version. Increasing to 0.57 to also gain support for other useful features for us in DPDK. Changes of interest to DPDK include:

* Use get_external_property instead of get_cross_property
* Ability to use a VERSION file rather than hacking it with scripting
* Ability to set built-in options in cross-build files
* Ability to set pkg_config_libdir in cross-build files

#3 lore raw

PATCH 2/5 build: remove version check on compiler links function

In reply to Bruce Richardson

The "compiler.links()" function meson documentation [1] is a little unclear, in a casual reading implies that the function was new in 0.60 meson release. In fact, it is only enhanced as described in that release, but is present earlier.
As such, we can remove the version checks preceeding the calls to links function in our code.

[1] https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerlinks

Fixes fd809737cf8c ("common/qat: fix build with incompatible IPsec library")
Fixes fb94d8243894 ("crypto/ipsec_mb: add dependency check for cross build")
---
 drivers/common/qat/meson.build      | 2 +-
 drivers/crypto/ipsec_mb/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/common/qat/meson.build +1 -1
index 3893b127dd..5a8de16fe0 100644
@@ -43,7 +43,7 @@ else
     IMB_required_ver = '1.4.0'
     IMB_header = '#include<intel-ipsec-mb.h>'
     libipsecmb = cc.find_library('IPSec_MB', required: false)
-    if libipsecmb.found() and meson.version().version_compare('>=0.60') and cc.links(
+    if libipsecmb.found() and cc.links(
             'int main(void) {return 0;}', dependencies: libipsecmb)
         # version comes with quotes, so we split based on " and take the middle
         imb_ver = cc.get_define('IMB_VERSION_STR',
drivers/crypto/ipsec_mb/meson.build +1 -1
index 87bf965554..81631d3050 100644
@@ -17,7 +17,7 @@ if not lib.found()
     build = false
     reason = 'missing dependency, "libIPSec_MB"'
 # if the lib is found, check it's the right format
-elif meson.version().version_compare('>=0.60') and not cc.links(
+elif not cc.links(
         'int main(void) {return 0;}', dependencies: lib)
     build = false
     reason = 'incompatible dependency, "libIPSec_MB"'
Signature · 1 line
2.43.0
Reviewed-by on v1 2/5
#4 lore raw

Re: [PATCH 2/5] build: remove version check on compiler links function

Bruce Richardson, Sep 20, 2024 at 14:57:

Quoted 7 lines

The "compiler.links()" function meson documentation [1] is a little unclear, in a casual reading implies that the function was new in 0.60 meson release. In fact, it is only enhanced as described in that release, but is present earlier.
As such, we can remove the version checks preceeding the calls to links function in our code.

Quoted 8 lines

[1] https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerlinks

Fixes fd809737cf8c ("common/qat: fix build with incompatible IPsec library")
Fixes fb94d8243894 ("crypto/ipsec_mb: add dependency check for cross build")

---

#5 lore raw

PATCH 3/5 build: remove unnecessary version checks

In reply to Bruce Richardson

Since minimum meson version is now 0.57 we can remove all version checks for versions lower than that.

---
 config/meson.build  | 2 +-
 doc/api/meson.build | 2 +-
 drivers/meson.build | 3 ---
 lib/meson.build     | 6 ------
 4 files changed, 2 insertions(+), 11 deletions(-)
config/meson.build +1 -1
index 8c8b019c25..913825b1ca 100644
@@ -97,7 +97,7 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 if not is_windows
     meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
             get_option('libdir'), pmd_subdir_opt)
-elif meson.version().version_compare('>=0.55.0')
+else
     # 0.55.0 is required to use external program with add_install_script
     meson.add_install_script(py3,
             files('../buildtools/symlink-drivers-solibs.py'),
doc/api/meson.build +1 -1
index 5b50692df9..404c145672 100644
@@ -97,6 +97,6 @@ doc_target_names += 'Doxygen_API(Manpage)'
 # refresh the manpage database on install
 # if DPDK manpages are installed to a staging directory, not in MANPATH, this has no effect
 mandb = find_program('mandb', required: false)
-if mandb.found() and get_option('enable_docs') and meson.version().version_compare('>=0.55.0')
+if mandb.found() and get_option('enable_docs')
     meson.add_install_script(mandb)
 endif
drivers/meson.build +0 -3
index 66931d4241..1cb98e9354 100644
@@ -280,9 +280,6 @@ foreach subpath:subdirs
                 lk_deps += [def_file]
 
                 lk_args = ['-Wl,/def:' + def_file.full_path()]
-                if meson.version().version_compare('<0.54.0')
-                    lk_args += ['-Wl,/implib:drivers\\lib' + lib_name + '.dll.a']
-                endif
             else
                 mingw_map = custom_target(lib_name + '_mingw',
                         command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
lib/meson.build +0 -6
index 162287753f..ce92cb5537 100644
@@ -276,14 +276,8 @@ foreach l:libraries
 
         if is_ms_compiler
             lk_args = ['/def:' + def_file.full_path()]
-            if meson.version().version_compare('<0.54.0')
-                lk_args += ['/implib:lib\\librte_' + l + '.dll.a']
-            endif
         else
             lk_args = ['-Wl,/def:' + def_file.full_path()]
-            if meson.version().version_compare('<0.54.0')
-                lk_args += ['-Wl,/implib:lib\\librte_' + l + '.dll.a']
-            endif
         endif
     else
         if is_windows
Signature · 1 line
2.43.0
#6 lore raw

Re: [PATCH 3/5] build: remove unnecessary version checks

Quoted 17 lines · Bruce Richardson

Since minimum meson version is now 0.57 we can remove all version checks for versions lower than that.

---
 config/meson.build  | 2 +-
 doc/api/meson.build | 2 +-
 drivers/meson.build | 3 ---
 lib/meson.build     | 6 ------
 4 files changed, 2 insertions(+), 11 deletions(-)
config/meson.build +0 -0
index 8c8b019c25..913825b1ca 100644

config/meson.build eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) · line 101

Quoted 6 lines
config/meson.build +1 -1
@@ -97,7 +97,7 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 if not is_windows
     meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
             get_option('libdir'), pmd_subdir_opt)
-elif meson.version().version_compare('>=0.55.0')
+else
     # 0.55.0 is required to use external program with add_install_script

Nit: this comment can be removed (I intend to do when applying).

Quoted 2 lines
config/meson.build +0 -0
     meson.add_install_script(py3,
             files('../buildtools/symlink-drivers-solibs.py'),
Signature · 1 line
David Marchand
#8 lore raw

PATCH 4/5 build: use version file support from meson

In reply to Bruce Richardson

Rather than having to use run_command to shell out and read the VERSION file for the DPDK version, we can use the support added directly to meson in version 0.57.

---
 meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meson.build +1 -4
index 69888834b4..fe9040369a 100644
@@ -2,10 +2,7 @@
 # Copyright(c) 2017-2019 Intel Corporation
 
 project('DPDK', 'c',
-        # Get version number from file.
-        # Fallback to "more" for Windows compatibility.
-        version: run_command(find_program('cat', 'more'),
-            files('VERSION'), check: true).stdout().strip(),
+        version: files('VERSION'),
         license: 'BSD',
         default_options: [
             'buildtype=release',
Signature · 1 line
2.43.0
#10 lore raw

PATCH 5/5 build: replace deprecated meson function

In reply to Bruce Richardson

The meson function "get_cross_property" is deprecated in meson 0.58 and should be replaced by "get_external_property".

---
 config/arm/meson.build         | 4 ++--
 config/meson.build             | 6 +++---
 config/riscv/meson.build       | 4 ++--
 drivers/event/cnxk/meson.build | 2 +-
 drivers/meson.build            | 4 ++--
 drivers/net/cnxk/meson.build   | 2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)
config/arm/meson.build +2 -2
index 012935d5d7..6ef91d3a1a 100644
@@ -717,7 +717,7 @@ if dpdk_conf.get('RTE_ARCH_32')
     dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
     if meson.is_cross_build()
         update_flags = true
-        soc = meson.get_cross_property('platform', '')
+        soc = meson.get_external_property('platform', '')
         if soc == ''
             error('Arm SoC must be specified in the cross file.')
         endif
@@ -772,7 +772,7 @@ else
         endif
     else
         # cross build
-        soc = meson.get_cross_property('platform', '')
+        soc = meson.get_external_property('platform', '')
         if soc == ''
             error('Arm SoC must be specified in the cross file.')
         endif
config/meson.build +3 -3
index 913825b1ca..869f7605e8 100644
@@ -227,7 +227,7 @@ endif
 # check for libraries used in multiple places in DPDK
 has_libnuma = false
 find_libnuma = true
-if meson.is_cross_build() and not meson.get_cross_property('numa', true)
+if meson.is_cross_build() and not meson.get_external_property('numa', true)
     # don't look for libnuma if explicitly disabled in cross build
     find_libnuma = false
 endif
@@ -377,12 +377,12 @@ dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
 # apply cross-specific options
 if meson.is_cross_build()
     # configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
-    cross_max_lcores = meson.get_cross_property('max_lcores', 0)
+    cross_max_lcores = meson.get_external_property('max_lcores', 0)
     if cross_max_lcores != 0
         message('Setting RTE_MAX_LCORE from cross file')
         dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
     endif
-    cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
+    cross_max_numa_nodes = meson.get_external_property('max_numa_nodes', 0)
     if cross_max_numa_nodes != 0
         message('Setting RTE_MAX_NUMA_NODES from cross file')
         dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
config/riscv/meson.build +2 -2
index 07d7d9da23..7562c6cb99 100644
@@ -84,8 +84,8 @@ if not meson.is_cross_build()
     endif
 else
     # cross build
-    vendor_id = meson.get_cross_property('vendor_id')
-    arch_id = meson.get_cross_property('arch_id')
+    vendor_id = meson.get_external_property('vendor_id')
+    arch_id = meson.get_external_property('arch_id')
 endif
 
 if not vendors.has_key(vendor_id)
drivers/event/cnxk/meson.build +1 -1
index e0e350570d..2c1060ad87 100644
@@ -9,7 +9,7 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
 endif
 
 if meson.is_cross_build()
-        soc_type = meson.get_cross_property('platform', '')
+        soc_type = meson.get_external_property('platform', '')
 else
         soc_type = platform
 endif
drivers/meson.build +2 -2
index 1cb98e9354..2733306698 100644
@@ -32,8 +32,8 @@ subdirs = [
 ]
 
 if meson.is_cross_build()
-    disable_drivers += ',' + meson.get_cross_property('disable_drivers', '')
-    enable_drivers += ',' + meson.get_cross_property('enable_drivers', '')
+    disable_drivers += ',' + meson.get_external_property('disable_drivers', '')
+    enable_drivers += ',' + meson.get_external_property('enable_drivers', '')
 endif
 
 # add cmdline disabled drivers and meson disabled drivers together
drivers/net/cnxk/meson.build +1 -1
index 7bce80098a..4506ce9306 100644
@@ -9,7 +9,7 @@ if not dpdk_conf.get('RTE_ARCH_64')
 endif
 
 if meson.is_cross_build()
-        soc_type = meson.get_cross_property('platform', '')
+        soc_type = meson.get_external_property('platform', '')
 else
         soc_type = platform
 endif
Signature · 1 line
2.43.0
Tested-by on the v1 series
#12 lore raw
In reply to Bruce Richardson
Quoted 10 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Quoted 7 lines

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Acked-by on the v1 series
#13 lore raw
In reply to Bruce Richardson
Quoted 36 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

--
2.43.0

#14 lore raw

It should be series-ack,

Quoted 40 lines · fengchengwen
Quoted 36 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

--
2.43.0

#15 lore raw
In reply to Bruce Richardson
Quoted 33 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)
Quoted 1 line

--

#16 lore raw
In reply to Bruce Richardson

Hello CI guys,

Quoted 18 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

Signature · 1 line
David Marchand
#17 lore raw
Quoted 11 lines · David Marchand

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

Thanks for the heads up. So, as far as I can tell, this will require an update to the dpdk/.ci/linux-setup.sh script (which I have just submitted) as I think various labs rely on it including the github robot, loongson, Intel (Maybe, I don't know). UNH does not use it much as we opt to meet the meson dependency separately in the dpdk-ci project's container template engine.

It will also require updates to the container template engine, which I can get Cody started on tomorrow.

Quoted 4 lines

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

Okay, full disclosure I don't think this is something we handled the last time the meson version got bumped in 2022. So, back then we just bumped the meson version for all environments to .53, then did LTS testing for 19.11, 20.11, 21.11 from environments running meson .53. But, I understand how this is an issue and something we should avoid this go around.

However, it is not ideal to set the meson version "at runtime" for CI testing based on the repo under test (mainline and next-* want .57, old LTS versions want .53). It would be possible to modify our jenkinsfiles (automation scripts) to check the DPDK version, and run pip commands resetting the meson version accordingly, at the start of each testing job... but I have a couple concerns here with regards to stability/maintenance.

Another option, which Adam is suggesting, is to create a dedicated environment which is version locked to .53 (it can just be an ubuntu container image), label it as a meson .53 environment, and add that to the total list of dpdk build environments which are run when we do testing for either 22.11, or 23.11. Then, we could run the rest of the testing from the same container images we use for mainline (that have .57 baked in), and this would not be a problem because we would have that 1 environment doing a dpdk build, which is guaranteed to be on .53. Bruce/David let me know if you can think of any issues with this.

This is also very similar to a Community Lab request from a few months ago (which we have an open internal Jira ticket for), which is to add a VM environment which is locked to the minimum supported kernel version for DPDK. But, that's another story...

Anyways, in terms of the timeline... the Jenkins script updates are probably the most difficult in that they will require a PR review, dry run tests etc. but it's still fairly trivial. Cody can probably update the meson dependencies on the template engine and submit that to the dpdk-ci project by end of week. So, I would say CI should be ready by next Tuesday, provided the patches which will be incoming to dev and ci mailing lists can be merged. Is this timeline okay?

#18 lore raw
Quoted 12 lines · Patrick Robb

On Tue, Oct 8, 2024 at 4:28 AM David Marchand
<[1][email protected]> wrote:

This series can't be merged until the (UNH and LoongArch) CI are ready
for such a change.
TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57
in the current release.
@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

Quoted 4 lines

Thanks for the heads up. So, as far as I can tell, this will require an update to the dpdk/.ci/linux-setup.sh script (which I have just submitted) as I think various labs rely on it including the github robot, loongson, Intel (Maybe, I don't know).

The update to that linux-setup file is included already in the first patch of the series. No additional updates needed for jobs that rely on it.

Quoted 3 lines

UNH does not use it much
as we opt to meet the meson dependency separately in the dpdk-ci project's container template engine.

That's a bit of a pity, since we can't update the meson version automatically as part of the meson update as we do with CIs using the linux-setup script. Is there some other file that can be in the DPDK main repo that can contain this details to regular DPDK patches can update the CI too as part of a meson update?

Quoted 7 lines

It will also require updates to the container template engine, which I can get Cody started on tomorrow.

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

Quoted 13 lines

Okay, full disclosure I don't think this is something we handled the last time the meson version got bumped in 2022. So, back then we just bumped the meson version for all environments to .53, then did LTS testing for 19.11, 20.11, 21.11 from environments running meson .53. But, I understand how this is an issue and something we should avoid this go around.
However, it is not ideal to set the meson version "at runtime" for CI testing based on the repo under test (mainline and next-* want .57, old LTS versions want .53). It would be possible to modify our jenkinsfiles (automation scripts) to check the DPDK version, and run pip commands resetting the meson version accordingly, at the start of each testing job... but I have a couple concerns here with regards to stability/maintenance.

I would recommend against using the DPDK version as a guide. However, the meson version is included in the project options in the meson.build file of the code. Could you use "grep meson_version meson.build" in a script to extra the required version info? If it's helpful, we can possibly provide some sort of compatibility guarantee of the format of this line.

Regards,
/Bruce

#19 lore raw
Quoted 5 lines · Bruce Richardson
Quoted 4 lines

UNH does not use it much
as we opt to meet the meson dependency separately in the dpdk-ci project's container template engine.

Quoted 7 lines

That's a bit of a pity, since we can't update the meson version automatically as part of the meson update as we do with CIs using the linux-setup script. Is there some other file that can be in the DPDK main repo that can contain this details to regular DPDK patches can update the CI too as part of a meson update?

I think the only way to do that would be to submit a patch alongside for the dpdk ci container template engine:
https://git.dpdk.org/tools/dpdk-ci/tree/containers/README.md. But this would not work very well as dpdk-ci is a separate repo from dpdk, so you can't really package the meson update and the ci update in one patchseries.

So, I guess based on your comments it seems like the best solution is to remove the meson step from the container template engine (Dockerfiles) and run the linux-setup.sh script right before each testrun, which solves the problem you raise about updating dpdk and CI side by side, and solves the main vs LTS issue. And of course it comes with the benefit of making CI processes more common across labs. I had run through this idea with Adam yesterday and we agreed that it would work but decided it was our second favorite option... but I think with the points you are raising it is clear this is the correct route to take.

Quoted 23 lines
Quoted 7 lines

It will also require updates to the container template engine, which I can get Cody started on tomorrow.

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

Quoted 8 lines

Okay, full disclosure I don't think this is something we handled the last time the meson version got bumped in 2022. So, back then we just bumped the meson version for all environments to .53, then did LTS testing for 19.11, 20.11, 21.11 from environments running meson .53. But, I understand how this is an issue and something we should avoid this go around.
However, it is not ideal to set the meson version "at runtime" for CI testing based on the repo under test (mainline and next-* want .57,

old

Quoted 1 line

LTS versions want .53). It would be possible to modify our

jenkinsfiles

Quoted 4 lines

(automation scripts) to check the DPDK version, and run pip commands resetting the meson version accordingly, at the start of each testing job... but I have a couple concerns here with regards to stability/maintenance.

Quoted 6 lines

I would recommend against using the DPDK version as a guide. However, the meson version is included in the project options in the meson.build file of the code. Could you use "grep meson_version meson.build" in a script to extra the required version info? If it's helpful, we can possibly provide some sort of compatibility guarantee of the format of this line.

Thanks this seems like another good option (I did not realize we could get this from meson.build) and something we can fall back on if usage of the linux-setup.sh is problematic in any way.

So, we have a different strategy but the timeline should be the same as this is all fairly trivial. Let me know if yall have any concerns.

Cheers.

#20 lore raw
In reply to David Marchand

Hi David,

Quoted 36 lines · David Marchand

Hello CI guys,

Quoted 17 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
  .ci/linux-setup.sh                        | 2 +-
  config/arm/meson.build                    | 4 ++--
  config/meson.build                        | 8 ++++----
  config/riscv/meson.build                  | 4 ++--
  doc/api/meson.build                       | 2 +-
  doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
  doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
  drivers/common/qat/meson.build            | 2 +-
  drivers/crypto/ipsec_mb/meson.build       | 2 +-
  drivers/event/cnxk/meson.build            | 2 +-
  drivers/meson.build                       | 7 ++-----
  drivers/net/cnxk/meson.build              | 2 +-
  lib/meson.build                           | 6 ------
  meson.build                               | 7 ++-----
  14 files changed, 20 insertions(+), 32 deletions(-)
Quoted 8 lines

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

It's OK for Loongson lab. The meson version for DPDK CI in Loongson lab is 0.63.0.

Quoted 5 lines

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

#21 lore raw

Hi Min Zhou,

I think it makes sense for you to set your meson version to the minimum version supported for DPDK (so, .57 now I suppose) instead of .63. The principle that David described above regarding LTS is also true for main. So, for the main and next-* branch testing that Loongson lab does, we want our CI testing to verify that no change relying on post .57 meson features get merged into main.

Quoted 56 lines · zhoumin

Hi David,

Quoted 36 lines · David Marchand

Hello CI guys,

Quoted 17 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
  .ci/linux-setup.sh                        | 2 +-
  config/arm/meson.build                    | 4 ++--
  config/meson.build                        | 8 ++++----
  config/riscv/meson.build                  | 4 ++--
  doc/api/meson.build                       | 2 +-
  doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
  doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
  drivers/common/qat/meson.build            | 2 +-
  drivers/crypto/ipsec_mb/meson.build       | 2 +-
  drivers/event/cnxk/meson.build            | 2 +-
  drivers/meson.build                       | 7 ++-----
  drivers/net/cnxk/meson.build              | 2 +-
  lib/meson.build                           | 6 ------
  meson.build                               | 7 ++-----
  14 files changed, 20 insertions(+), 32 deletions(-)
Quoted 8 lines

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

It's OK for Loongson lab. The meson version for DPDK CI in Loongson lab is 0.63.0.

Quoted 5 lines

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

#22 lore raw

Hi Patrick Robb,

Thank you for your reminding. I have set the meson version to 0.57.0 in Loongson lab.

Quoted 67 lines · Patrick Robb

Hi Min Zhou,

I think it makes sense for you to set your meson version to the minimum version supported for DPDK (so, .57 now I suppose) instead of .63. The principle that David described above regarding LTS is also true for main. So, for the main and next-* branch testing that Loongson lab does, we want our CI testing to verify that no change relying on post .57 meson features get merged into main.

On Tue, Oct 8, 2024 at 9:07 PM zhoumin <[email protected] <mailto:[email protected]>> wrote:

Hi David,

On Tues, Oct 8, 2024 at 8:28AM, David Marchand wrote:
> Hello CI guys,
>
> On Fri, Sep 20, 2024 at 2:57 PM Bruce Richardson
> <[email protected] <mailto:[email protected]>> wrote:
>> This patchset proposed increasing the minimum meson version to 0.57 >> and makes changes to update our build files appropriately for that >> change: replacing deprecated functions, removing unnecessary version
>> checks and taking advantage of some new capabilities. >>
>> Why 0.57? No one particular reason; it's mainly a conservative version
>> bump that doesn't have many impacts, but still gives us the minimum >> updates we need to replace the deprecated get_cross_properties fn >> and have a few extra features guaranteed available.
>>
>> Bruce Richardson (5):
>>    build: increase minimum meson version to 0.57
>>    build: remove version check on compiler links function >>    build: remove unnecessary version checks
>>    build: use version file support from meson
>>    build: replace deprecated meson function
>>
>>   .ci/linux-setup.sh                        | 2 +-
>>   config/arm/meson.build                    | 4 ++--
>>   config/meson.build                        | 8 ++++---- >>   config/riscv/meson.build                  | 4 ++--
>>   doc/api/meson.build                       | 2 +-
>>   doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
>>   doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
>>   drivers/common/qat/meson.build            | 2 +-
>>   drivers/crypto/ipsec_mb/meson.build       | 2 +-
>>   drivers/event/cnxk/meson.build            | 2 +-
>>   drivers/meson.build                       | 7 ++----- >>   drivers/net/cnxk/meson.build              | 2 +-
>>   lib/meson.build                           | 6 ------ >>   meson.build                               | 7 ++----- >>   14 files changed, 20 insertions(+), 32 deletions(-)
> This series can't be merged until the (UNH and LoongArch) CI are ready
> for such a change.
>
> TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57
> in the current release.
>
> @UNH @Min Zhou
> How long would it take for all CI to be ready for this change? It's OK for Loongson lab. The meson version for DPDK CI in Loongson lab
is 0.63.0.
> Important note: if relevant to your CI, testing against LTS branches > must still be done with the 0.53.2 version, so no change relying on > post 0.53.2 meson feature gets backported.
>
>

#23 lore raw

UNH will be updated to be running from the linux setup script by the end of the day today, and I'll send another response here.

Quoted 73 lines · zhoumin

Hi Patrick Robb,

Thank you for your reminding. I have set the meson version to 0.57.0 in Loongson lab.
On Wed, Oct 9, 2024 at 2:31PM, Patrick Robb wrote:

Hi Min Zhou,

I think it makes sense for you to set your meson version to the minimum version supported for DPDK (so, .57 now I suppose) instead of .63. The principle that David described above regarding LTS is also true for main. So, for the main and next-* branch testing that Loongson lab does, we want our CI testing to verify that no change relying on post .57 meson features get merged into main.

Quoted 56 lines · zhoumin

Hi David,

Quoted 36 lines · David Marchand

Hello CI guys,

Quoted 17 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
  .ci/linux-setup.sh                        | 2 +-
  config/arm/meson.build                    | 4 ++--
  config/meson.build                        | 8 ++++----
  config/riscv/meson.build                  | 4 ++--
  doc/api/meson.build                       | 2 +-
  doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
  doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
  drivers/common/qat/meson.build            | 2 +-
  drivers/crypto/ipsec_mb/meson.build       | 2 +-
  drivers/event/cnxk/meson.build            | 2 +-
  drivers/meson.build                       | 7 ++-----
  drivers/net/cnxk/meson.build              | 2 +-
  lib/meson.build                           | 6 ------
  meson.build                               | 7 ++-----
  14 files changed, 20 insertions(+), 32 deletions(-)
Quoted 8 lines

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

It's OK for Loongson lab. The meson version for DPDK CI in Loongson lab is 0.63.0.

Quoted 5 lines

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

#24 lore raw

UNH CI testing is ready for this change.

Quoted 78 lines · Patrick Robb

UNH will be updated to be running from the linux setup script by the end of the day today, and I'll send another response here.

Quoted 73 lines · zhoumin

Hi Patrick Robb,

Thank you for your reminding. I have set the meson version to 0.57.0 in Loongson lab.
On Wed, Oct 9, 2024 at 2:31PM, Patrick Robb wrote:

Hi Min Zhou,

I think it makes sense for you to set your meson version to the minimum version supported for DPDK (so, .57 now I suppose) instead of .63. The principle that David described above regarding LTS is also true for main. So, for the main and next-* branch testing that Loongson lab does, we want our CI testing to verify that no change relying on post .57 meson features get merged into main.

Quoted 56 lines · zhoumin

Hi David,

Quoted 36 lines · David Marchand

Hello CI guys,

Quoted 17 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
  .ci/linux-setup.sh                        | 2 +-
  config/arm/meson.build                    | 4 ++--
  config/meson.build                        | 8 ++++----
  config/riscv/meson.build                  | 4 ++--
  doc/api/meson.build                       | 2 +-
  doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
  doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
  drivers/common/qat/meson.build            | 2 +-
  drivers/crypto/ipsec_mb/meson.build       | 2 +-
  drivers/event/cnxk/meson.build            | 2 +-
  drivers/meson.build                       | 7 ++-----
  drivers/net/cnxk/meson.build              | 2 +-
  lib/meson.build                           | 6 ------
  meson.build                               | 7 ++-----
  14 files changed, 20 insertions(+), 32 deletions(-)
Quoted 8 lines

This series can't be merged until the (UNH and LoongArch) CI are ready for such a change.

TL;DR: the meson minimum version is being changed from 0.53.2 to 0.57 in the current release.

@UNH @Min Zhou
How long would it take for all CI to be ready for this change?

It's OK for Loongson lab. The meson version for DPDK CI in Loongson lab is 0.63.0.

Quoted 5 lines

Important note: if relevant to your CI, testing against LTS branches must still be done with the 0.53.2 version, so no change relying on post 0.53.2 meson feature gets backported.

#25 lore raw
In reply to Bruce Richardson
Quoted 18 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

The series looks good, and CI guys gave me the green light. Series applied, thanks Bruce.

There is one remaining TODO in config/meson.build:

# MS linker requires special treatment.
# TODO: use cc.get_linker_id() with Meson >= 0.54 is_ms_compiler = is_windows and (cc.get_id() == 'msvc') is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler)

Signature · 1 line
David Marchand
#26 lore raw
Quoted 40 lines · David Marchand
Quoted 18 lines · Bruce Richardson

This patchset proposed increasing the minimum meson version to 0.57 and makes changes to update our build files appropriately for that
change: replacing deprecated functions, removing unnecessary version checks and taking advantage of some new capabilities.

Why 0.57? No one particular reason; it's mainly a conservative version bump that doesn't have many impacts, but still gives us the minimum updates we need to replace the deprecated get_cross_properties fn and have a few extra features guaranteed available.

Bruce Richardson (5):
build: increase minimum meson version to 0.57
build: remove version check on compiler links function
build: remove unnecessary version checks
build: use version file support from meson
build: replace deprecated meson function

Quoted 15 lines
 .ci/linux-setup.sh                        | 2 +-
 config/arm/meson.build                    | 4 ++--
 config/meson.build                        | 8 ++++----
 config/riscv/meson.build                  | 4 ++--
 doc/api/meson.build                       | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst         | 2 +-
 doc/guides/prog_guide/build-sdk-meson.rst | 2 +-
 drivers/common/qat/meson.build            | 2 +-
 drivers/crypto/ipsec_mb/meson.build       | 2 +-
 drivers/event/cnxk/meson.build            | 2 +-
 drivers/meson.build                       | 7 ++-----
 drivers/net/cnxk/meson.build              | 2 +-
 lib/meson.build                           | 6 ------
 meson.build                               | 7 ++-----
 14 files changed, 20 insertions(+), 32 deletions(-)

The series looks good, and CI guys gave me the green light. Series applied, thanks Bruce.

Quoted 8 lines

There is one remaining TODO in config/meson.build:

# MS linker requires special treatment.
# TODO: use cc.get_linker_id() with Meson >= 0.54 is_ms_compiler = is_windows and (cc.get_id() == 'msvc') is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler)

Yep.

I'm hoping perhaps one of the windows maintainers/devs could look at this because I see a number of possible linker values for windows listed in the table at [1] and I'm not 100% sure which ones are to be accepted here.

/Bruce

[1] https://mesonbuild.com/Reference-tables.html#linker-ids