[1/3] meson: fix minimum required meson version

Message ID 20210322083901.22493-1-gabriel.ganne@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [1/3] meson: fix minimum required meson version |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Gabriel Ganne March 22, 2021, 8:38 a.m. UTC
  WARNING: Project targetting '>= 0.47.1' but tried to use feature introduced
         in '0.48.0': console arg in custom_target

console argument is used within kernel/linux/kni/meson.build

Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson March 22, 2021, 9:34 a.m. UTC | #1
On Mon, Mar 22, 2021 at 09:38:59AM +0100, Gabriel Ganne wrote:
> WARNING: Project targetting '>= 0.47.1' but tried to use feature introduced
>          in '0.48.0': console arg in custom_target
> 
> console argument is used within kernel/linux/kni/meson.build
> 
> Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 7778e18200a9..65c46f051365 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -8,7 +8,7 @@ project('DPDK', 'C',
>  		files('VERSION')).stdout().strip(),
>  	license: 'BSD',
>  	default_options: ['buildtype=release', 'default_library=static'],
> -	meson_version: '>= 0.47.1'
> +	meson_version: '>= 0.48.0'
>  )
>  

No objection to this on my part. Rather than bumping to just 0.48, I think
we might as well jump a couple of versions. For example, 0.49 adds support
for "break" and "continue" keywords which could allow loop simplification.
Beyond that, it's a matter of how up-to-date we want to be...
  
David Marchand March 22, 2021, 1:57 p.m. UTC | #2
On Mon, Mar 22, 2021 at 9:39 AM Gabriel Ganne <gabriel.ganne@6wind.com> wrote:
>
> WARNING: Project targetting '>= 0.47.1' but tried to use feature introduced
>          in '0.48.0': console arg in custom_target
>
> console argument is used within kernel/linux/kni/meson.build
>
> Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 7778e18200a9..65c46f051365 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -8,7 +8,7 @@ project('DPDK', 'C',
>                 files('VERSION')).stdout().strip(),
>         license: 'BSD',
>         default_options: ['buildtype=release', 'default_library=static'],
> -       meson_version: '>= 0.47.1'
> +       meson_version: '>= 0.48.0'
>  )
>
>  # set up some global vars for compiler, platform, configuration, etc.
> --
> 2.29.2
>

There are references in the docs and the CI is blocked at 0.47.1 explicitly:

.ci/linux-setup.sh:sudo python3 -m pip install --upgrade 'meson==0.47.1'
doc/guides/linux_gsg/sys_reqs.rst:*   Meson (version 0.47.1+) and ninja
doc/guides/prog_guide/build-sdk-meson.rst:3 ``pip`` tool, e.g. ``pip3
install meson``. Version 0.47.1 of meson is
doc/guides/windows_gsg/build_dpdk.rst:Recommended version is either
Meson 0.47.1 (baseline) or the latest release.
  
Dmitry Kozlyuk March 22, 2021, 3:25 p.m. UTC | #3
2021-03-22 09:34 (UTC+0000), Bruce Richardson:
> On Mon, Mar 22, 2021 at 09:38:59AM +0100, Gabriel Ganne wrote:
> > WARNING: Project targetting '>= 0.47.1' but tried to use feature introduced
> >          in '0.48.0': console arg in custom_target
> > 
> > console argument is used within kernel/linux/kni/meson.build
> > 
> > Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> > ---
> >  meson.build | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meson.build b/meson.build
> > index 7778e18200a9..65c46f051365 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -8,7 +8,7 @@ project('DPDK', 'C',
> >  		files('VERSION')).stdout().strip(),
> >  	license: 'BSD',
> >  	default_options: ['buildtype=release', 'default_library=static'],
> > -	meson_version: '>= 0.47.1'
> > +	meson_version: '>= 0.48.0'
> >  )
> >    
> 
> No objection to this on my part. Rather than bumping to just 0.48, I think
> we might as well jump a couple of versions. For example, 0.49 adds support
> for "break" and "continue" keywords which could allow loop simplification.
> Beyond that, it's a matter of how up-to-date we want to be...

FYI, recalling some TODOs and which versions would allow to resolve them.

From https://mails.dpdk.org/archives/dev/2021-January/196000.html:

	A script to extract object files from library is still required.
	Meson has extract_all_objects(), but they can't be passed as inputs
	to custom_target() until 0.52.0 (commit f431cff809).

buildtools/meson.build:

	# TODO: starting from Meson 0.51.0 use
	# 	python3 = import('python').find_installation('python',
	#		modules : python3_required_modules)

config/meson.build:

	# TODO: use cc.get_linker_id() with Meson >= 0.54
	is_ms_linker = is_windows and (cc.get_id() == 'clang')
  
Gabriel Ganne March 23, 2021, 6:22 a.m. UTC | #4
Hi,

Thanks for the review.

I have some reservations about those TODO: they are about
rewriting the same functionality with a newer meson feature.
No functional change is expected. => Why not write a commit that
implements such a TODO and bumps meson version at the same time
independently ?

In any case, I aimed to set meson's required version to the lowest possible
value
so that distributions would have a chance to provide it. I know we can just
install meson using pip, but it might be nice not to need this.
Below are some versions of meson packages as of today:
  pip: 0.57.1
  rhel-8: 0.49.2
  debian-10: 0.49.2
  ubuntu-18.04: 0.45.1
  ubuntu-20.04: 0.53.2

Going over 0.49.2 will cause DPDK to lose some major distribution's stable
release,
at least out-of-the-box through their respective package manager.

I propose to bump to 0.49.2 here, and leave the TODOs to wait a little
longer.
What do you think ?

Best regards,

P.S. get_linker_id() seems to be introduced in 0.53
See:
https://mesonbuild.com/Release-notes-for-0-53-0.html#compilerget_linker_id

On Mon, Mar 22, 2021 at 4:25 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
wrote:

> 2021-03-22 09:34 (UTC+0000), Bruce Richardson:
> > On Mon, Mar 22, 2021 at 09:38:59AM +0100, Gabriel Ganne wrote:
> > > WARNING: Project targetting '>= 0.47.1' but tried to use feature
> introduced
> > >          in '0.48.0': console arg in custom_target
> > >
> > > console argument is used within kernel/linux/kni/meson.build
> > >
> > > Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> > > ---
> > >  meson.build | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meson.build b/meson.build
> > > index 7778e18200a9..65c46f051365 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -8,7 +8,7 @@ project('DPDK', 'C',
> > >             files('VERSION')).stdout().strip(),
> > >     license: 'BSD',
> > >     default_options: ['buildtype=release', 'default_library=static'],
> > > -   meson_version: '>= 0.47.1'
> > > +   meson_version: '>= 0.48.0'
> > >  )
> > >
> >
> > No objection to this on my part. Rather than bumping to just 0.48, I
> think
> > we might as well jump a couple of versions. For example, 0.49 adds
> support
> > for "break" and "continue" keywords which could allow loop
> simplification.
> > Beyond that, it's a matter of how up-to-date we want to be...
>
> FYI, recalling some TODOs and which versions would allow to resolve them.
>
> From https://mails.dpdk.org/archives/dev/2021-January/196000.html:
>
>         A script to extract object files from library is still required.
>         Meson has extract_all_objects(), but they can't be passed as inputs
>         to custom_target() until 0.52.0 (commit f431cff809).
>
> buildtools/meson.build:
>
>         # TODO: starting from Meson 0.51.0 use
>         #       python3 = import('python').find_installation('python',
>         #               modules : python3_required_modules)
>
> config/meson.build:
>
>         # TODO: use cc.get_linker_id() with Meson >= 0.54
>         is_ms_linker = is_windows and (cc.get_id() == 'clang')
>
  
Andrew Rybchenko March 23, 2021, 7:16 a.m. UTC | #5
On 3/23/21 9:22 AM, Gabriel Ganne wrote:
> Hi,
> 
> Thanks for the review.
> 
> I have some reservations about those TODO: they are about
> rewriting the same functionality with a newer meson feature.
> No functional change is expected. => Why not write a commit that
> implements such a TODO and bumps meson version at the same time
> independently ?
> 
> In any case, I aimed to set meson's required version to the lowest possible
> value
> so that distributions would have a chance to provide it. I know we can just
> install meson using pip, but it might be nice not to need this.
> Below are some versions of meson packages as of today:
>   pip: 0.57.1
>   rhel-8: 0.49.2
>   debian-10: 0.49.2
>   ubuntu-18.04: 0.45.1
>   ubuntu-20.04: 0.53.2
> 
> Going over 0.49.2 will cause DPDK to lose some major distribution's stable
> release,
> at least out-of-the-box through their respective package manager.
> 
> I propose to bump to 0.49.2 here, and leave the TODOs to wait a little
> longer.
> What do you think ?

+1

> Best regards,
> 
> P.S. get_linker_id() seems to be introduced in 0.53
> See:
> https://mesonbuild.com/Release-notes-for-0-53-0.html#compilerget_linker_id
> 
> On Mon, Mar 22, 2021 at 4:25 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> wrote:
> 
>> 2021-03-22 09:34 (UTC+0000), Bruce Richardson:
>>> On Mon, Mar 22, 2021 at 09:38:59AM +0100, Gabriel Ganne wrote:
>>>> WARNING: Project targetting '>= 0.47.1' but tried to use feature
>> introduced
>>>>          in '0.48.0': console arg in custom_target
>>>>
>>>> console argument is used within kernel/linux/kni/meson.build
>>>>
>>>> Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
>>>> ---
>>>>  meson.build | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/meson.build b/meson.build
>>>> index 7778e18200a9..65c46f051365 100644
>>>> --- a/meson.build
>>>> +++ b/meson.build
>>>> @@ -8,7 +8,7 @@ project('DPDK', 'C',
>>>>             files('VERSION')).stdout().strip(),
>>>>     license: 'BSD',
>>>>     default_options: ['buildtype=release', 'default_library=static'],
>>>> -   meson_version: '>= 0.47.1'
>>>> +   meson_version: '>= 0.48.0'
>>>>  )
>>>>
>>>
>>> No objection to this on my part. Rather than bumping to just 0.48, I
>> think
>>> we might as well jump a couple of versions. For example, 0.49 adds
>> support
>>> for "break" and "continue" keywords which could allow loop
>> simplification.
>>> Beyond that, it's a matter of how up-to-date we want to be...
>>
>> FYI, recalling some TODOs and which versions would allow to resolve them.
>>
>> From https://mails.dpdk.org/archives/dev/2021-January/196000.html:
>>
>>         A script to extract object files from library is still required.
>>         Meson has extract_all_objects(), but they can't be passed as inputs
>>         to custom_target() until 0.52.0 (commit f431cff809).
>>
>> buildtools/meson.build:
>>
>>         # TODO: starting from Meson 0.51.0 use
>>         #       python3 = import('python').find_installation('python',
>>         #               modules : python3_required_modules)
>>
>> config/meson.build:
>>
>>         # TODO: use cc.get_linker_id() with Meson >= 0.54
>>         is_ms_linker = is_windows and (cc.get_id() == 'clang')
>>
> 
>
  
Dmitry Kozlyuk March 23, 2021, 7:42 a.m. UTC | #6
2021-03-23 07:22 (UTC+0100), Gabriel Ganne:
> Hi,
> 
> Thanks for the review.
> 
> I have some reservations about those TODO: they are about
> rewriting the same functionality with a newer meson feature.
> No functional change is expected. => Why not write a commit that
> implements such a TODO and bumps meson version at the same time
> independently ?
> 
> In any case, I aimed to set meson's required version to the lowest possible
> value
> so that distributions would have a chance to provide it. I know we can just
> install meson using pip, but it might be nice not to need this.
> Below are some versions of meson packages as of today:
>   pip: 0.57.1
>   rhel-8: 0.49.2
>   debian-10: 0.49.2
>   ubuntu-18.04: 0.45.1
>   ubuntu-20.04: 0.53.2
> 
> Going over 0.49.2 will cause DPDK to lose some major distribution's stable
> release,
> at least out-of-the-box through their respective package manager.
> 
> I propose to bump to 0.49.2 here, and leave the TODOs to wait a little
> longer.
> What do you think ?

Yes, sounds practical.
I rather meant to recollect known TODOs then to propose solving all at once.
  
Bruce Richardson March 23, 2021, 9:38 a.m. UTC | #7
On Tue, Mar 23, 2021 at 07:22:00AM +0100, Gabriel Ganne wrote:
>    Hi,
>    Thanks for the review.
>    I have some reservations about those TODO: they are about
>    rewriting the same functionality with a newer meson feature.
>    No functional change is expected. => Why not write a commit that
>    implements such a TODO and bumps meson version at the same time
>    independently ?
>    In any case, I aimed to set meson's required version to the lowest
>    possible value
>    so that distributions would have a chance to provide it. I know we can
>    just
>    install meson using pip, but it might be nice not to need this.
>    Below are some versions of meson packages as of today:
>      pip: 0.57.1
>      rhel-8: 0.49.2
>      debian-10: 0.49.2
>      ubuntu-18.04: 0.45.1
>      ubuntu-20.04: 0.53.2
>    Going over 0.49.2 will cause DPDK to lose some major distribution's
>    stable release,
>    at least out-of-the-box through their respective package manager.
>    I propose to bump to 0.49.2 here, and leave the TODOs to wait a little
>    longer.

+1
However, I don't think we need the ".2" specifically, since new features
don't come in point releases, so I'd suggest just making "0.49" the
minimum.
  
Bruce Richardson April 1, 2021, 11:09 a.m. UTC | #8
On Tue, Mar 23, 2021 at 09:38:25AM +0000, Bruce Richardson wrote:
> On Tue, Mar 23, 2021 at 07:22:00AM +0100, Gabriel Ganne wrote:
> >    Hi,
> >    Thanks for the review.
> >    I have some reservations about those TODO: they are about
> >    rewriting the same functionality with a newer meson feature.
> >    No functional change is expected. => Why not write a commit that
> >    implements such a TODO and bumps meson version at the same time
> >    independently ?
> >    In any case, I aimed to set meson's required version to the lowest
> >    possible value
> >    so that distributions would have a chance to provide it. I know we can
> >    just
> >    install meson using pip, but it might be nice not to need this.
> >    Below are some versions of meson packages as of today:
> >      pip: 0.57.1
> >      rhel-8: 0.49.2
> >      debian-10: 0.49.2
> >      ubuntu-18.04: 0.45.1
> >      ubuntu-20.04: 0.53.2
> >    Going over 0.49.2 will cause DPDK to lose some major distribution's
> >    stable release,
> >    at least out-of-the-box through their respective package manager.
> >    I propose to bump to 0.49.2 here, and leave the TODOs to wait a little
> >    longer.
> 
> +1
> However, I don't think we need the ".2" specifically, since new features
> don't come in point releases, so I'd suggest just making "0.49" the
> minimum.

To partially contradict myself here, there is a bug[1] present in earlier
releases of meson which can affect building OVS and apps using pkg-config
for DPDK. This has been fixed[2] in 0.50 release onwards, but also backported
to meson 0.49.1. Therefore, for sanity, we may indeed want to bump the
version to 0.49.1 (or .2 if you like) rather than 0.49 as I suggested here.

/Bruce

[1] https://github.com/mesonbuild/meson/issues/4091
[2] https://github.com/mesonbuild/meson/commit/261ab9b2140005d4f7e42118ccb6598fa5b7f15d
  

Patch

diff --git a/meson.build b/meson.build
index 7778e18200a9..65c46f051365 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@  project('DPDK', 'C',
 		files('VERSION')).stdout().strip(),
 	license: 'BSD',
 	default_options: ['buildtype=release', 'default_library=static'],
-	meson_version: '>= 0.47.1'
+	meson_version: '>= 0.48.0'
 )
 
 # set up some global vars for compiler, platform, configuration, etc.