Skip to contentSkip to conversation

meson: remove build warnings

PATCH Superseded Jerin Jacob Kollanukkaran 5 participants 8 messages Mar 18, 2019 – Mar 27, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: remove build warnings

From: Jerin Jacob <[email protected]>

Remove the following meson build warnings

1) WARNING: Project specifies a minimum meson_version '>= 0.47.1' but uses features which were added in newer versions:
* 0.48.0: {'console arg in custom_target'}

2) config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

---
 config/arm/meson.build | 4 ++--
 meson.build            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output = cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0], ['generic'])
+		if machine[0] == 'generic'
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
meson.build +1 -1
index 69833de82..f1abf1e59 100644
@@ -5,7 +5,7 @@ project('DPDK', 'C',
 	version: '19.05.0-rc0',
 	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.
Signature · 1 line
2.20.1
#1 lore raw
Quoted 48 lines · Jerin Jacob Kollanukkaran

From: Jerin Jacob <[email protected]>

Remove the following meson build warnings

1) WARNING: Project specifies a minimum meson_version '>= 0.47.1' but uses features which were added in newer versions:
* 0.48.0: {'console arg in custom_target'}

2) config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

---
 config/arm/meson.build | 4 ++--
 meson.build            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output =
 cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0],
 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0],
 ['generic'])
+		if machine[0] == 'generic'
config/arm/meson.build +0 -0
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
meson.build +1 -1
index 69833de82..f1abf1e59 100644
@@ -5,7 +5,7 @@ project('DPDK', 'C',
 	version: '19.05.0-rc0',
 	license: 'BSD',
 	default_options: ['buildtype=release',
 'default_library=static'],
-	meson_version: '>= 0.47.1'
+	meson_version: '>= 0.48.0'
 )
 
Quoted 2 lines
 # set up some global vars for compiler, platform, configuration,
etc.

Bumping minimum dependency requirements needs an approval from the tech board. Incidentally we just got it, and the bump to 0.47.1 just happened.

You can remove this and ignore the warning about the console arg - it's harmless if ran on a previous version which does not support it.

Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw
Quoted 56 lines · Luca Boccassi
Quoted 48 lines · Jerin Jacob Kollanukkaran

From: Jerin Jacob <[email protected]>

Remove the following meson build warnings

1) WARNING: Project specifies a minimum meson_version '>= 0.47.1' but uses features which were added in newer versions:
* 0.48.0: {'console arg in custom_target'}

2) config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

---
 config/arm/meson.build | 4 ++--
 meson.build            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output =
 cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0],
 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0],
 ['generic'])
+		if machine[0] == 'generic'
config/arm/meson.build +0 -0
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
meson.build +1 -1
index 69833de82..f1abf1e59 100644
@@ -5,7 +5,7 @@ project('DPDK', 'C',
 	version: '19.05.0-rc0',
 	license: 'BSD',
 	default_options: ['buildtype=release',
 'default_library=static'],
-	meson_version: '>= 0.47.1'
+	meson_version: '>= 0.48.0'
 )
 
Quoted 2 lines
 # set up some global vars for compiler, platform, configuration,
etc.

Bumping minimum dependency requirements needs an approval from the tech board. Incidentally we just got it, and the bump to 0.47.1 just happened.

Quoted 3 lines

You can remove this and ignore the warning about the console arg - it's harmless if ran on a previous version which does not support it.

+1 to this. The first fix is good though - perhaps do a V2 with just that.

Sadly meson warnings for versions have too many false positives right now - the devs are aware of it, but don't have any good fixes for it yet, as far as I know. For our case, we will continue to have meson warnings, most of which are false positives like this one.

Regards,
/Bruce

#3 lore raw
Quoted 61 lines · Bruce Richardson
Quoted 56 lines · Luca Boccassi
Quoted 48 lines · Jerin Jacob Kollanukkaran

From: Jerin Jacob <[email protected]>

Remove the following meson build warnings

1) WARNING: Project specifies a minimum meson_version '>= 0.47.1' but uses features which were added in newer versions:
* 0.48.0: {'console arg in custom_target'}

2) config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

---
 config/arm/meson.build | 4 ++--
 meson.build            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output =
 cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0],
 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0],
 ['generic'])
+		if machine[0] == 'generic'
config/arm/meson.build +0 -0
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
meson.build +1 -1
index 69833de82..f1abf1e59 100644
@@ -5,7 +5,7 @@ project('DPDK', 'C',
 	version: '19.05.0-rc0',
 	license: 'BSD',
 	default_options: ['buildtype=release',
 'default_library=static'],
-	meson_version: '>= 0.47.1'
+	meson_version: '>= 0.48.0'
 )
 
Quoted 2 lines
 # set up some global vars for compiler, platform, configuration,
etc.

Bumping minimum dependency requirements needs an approval from the tech board. Incidentally we just got it, and the bump to 0.47.1 just happened.

Quoted 3 lines

You can remove this and ignore the warning about the console arg - it's harmless if ran on a previous version which does not support it.

Quoted 6 lines

+1 to this. The first fix is good though - perhaps do a V2 with just that.

Sadly meson warnings for versions have too many false positives right now - the devs are aware of it, but don't have any good fixes for it yet, as far as I know. For our case, we will continue to have meson warnings, most of which are false positives like this one.

In this case, though, the warning isn't a false positive. Here are the release notes for 0.48.0 that relate to the argument in question:

https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.48.0.md#new-kwarg-console-for-custom_target

I probably missed something.

<rant>
Incidentally, I've dropped my own patch related to this from a series I was developing to run tests on travis. I think it's a bit annoying that we need the techboard to decide for cases like these, but I guess that's just a fact of life.
</rant>

Quoted 2 lines

Regards,
/Bruce

#4 lore raw
Quoted 95 lines · Aaron Conole

Bruce Richardson <
[email protected]

Quoted 76 lines

writes:

Quoted 65 lines · Luca Boccassi
Quoted 54 lines · Jerin Jacob Kollanukkaran

From: Jerin Jacob <
[email protected]

Quoted 1 line

Remove the following meson build warnings

1) WARNING: Project specifies a minimum meson_version '>= 0.47.1'
but uses features which were added in newer versions:
* 0.48.0: {'console arg in custom_target'}

2) config/arm/meson.build:153: WARNING: Trying to compare values of
different types (list, str) using ==.

Signed-off-by: Jerin Jacob <
[email protected]

Quoted 1 line
---
 config/arm/meson.build | 4 ++--
 meson.build            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output =
 cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0],
 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0],
 ['generic'])
+		if machine[0] == 'generic'
config/arm/meson.build +0 -0
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
meson.build +1 -1
index 69833de82..f1abf1e59 100644
@@ -5,7 +5,7 @@ project('DPDK', 'C',
 	version: '19.05.0-rc0',
 	license: 'BSD',
 	default_options: ['buildtype=release',
 'default_library=static'],
-	meson_version: '>= 0.47.1'
+	meson_version: '>= 0.48.0'
 )
 
Quoted 3 lines
 # set up some global vars for compiler, platform,
configuration,
etc.

Bumping minimum dependency requirements needs an approval from the tech
board. Incidentally we just got it, and the bump to 0.47.1 just happened.

Quoted 4 lines

You can remove this and ignore the warning about the console arg
- it's
harmless if ran on a previous version which does not support it.

+1 to this. The first fix is good though - perhaps do a V2 with just that.

Quoted 7 lines

Sadly meson warnings for versions have too many false positives right now -
the devs are aware of it, but don't have any good fixes for it yet, as far
as I know. For our case, we will continue to have meson warnings, most of
which are false positives like this one.

In this case, though, the warning isn't a false positive. Here are the
release notes for 0.48.0 that relate to the argument in question:

https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.48.0.md#new-kwarg-console-for-custom_target

I probably missed something.

Quoted 9 lines

<rant>
Incidentally, I've dropped my own patch related to this from a series I
was developing to run tests on travis. I think it's a bit annoying that
we need the techboard to decide for cases like these, but I guess that's
just a fact of life.
</rant>

The warning is correct, but it is harmless - simply the feature won't be available - I forget exactly what is was for, something to do with verbose console prints. Functionally speaking there's no difference.

Signature · 2 lines
Kind regards,
Luca Boccassi
#5 lore raw

PATCH v2 1/1 meson: remove build warnings

In reply to Jerin Jacob Kollanukkaran

From: Jerin Jacob <[email protected]>

Remove the following warning by comparing string to string.

config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

Fixes c6e536e38437 ("build: add more implementers IDs and PNs for ARM")

---

v2: Remove meson version related warning as bumbing the version needs techboard approval.

---
 config/arm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output = cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0], ['generic'])
+		if machine[0] == 'generic'
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
Signature · 1 line
2.21.0
Acked-by on v2 1/1
#6 lore raw
Quoted 36 lines · Jerin Jacob Kollanukkaran

From: Jerin Jacob <[email protected]>

Remove the following warning by comparing string to string.

config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

Fixes c6e536e38437 ("build: add more implementers IDs and PNs for

ARM")
Cc: [email protected]

---

v2: Remove meson version related warning as bumbing the version needs techboard approval.

---
 config/arm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
config/arm/meson.build +2 -2
index 8e892fa77..170a4981a 100644
@@ -116,8 +116,8 @@ else
 			cmd_output =
 cmd.stdout().to_lower().strip().split(' ')
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0],
 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0],
 ['generic'])
+		if machine[0] == 'generic'

config/arm/meson.build else · line 123

Quoted 3 lines
config/arm/meson.build +0 -0
 			machine = impl_generic
 			cmd_output = cmd_generic
 		endif
Signature · 2 lines
Kind regards,
Luca Boccassi
#7 lore raw

19/03/2019 18:36, Luca Boccassi:

Quoted 8 lines · Jerin Jacob Kollanukkaran
Quoted 7 lines

From: Jerin Jacob <[email protected]>

Remove the following warning by comparing string to string.

config/arm/meson.build:153: WARNING: Trying to compare values of different types (list, str) using ==.

Quoted 7 lines
Quoted 5 lines
Fixes c6e536e38437 ("build: add more implementers IDs and PNs for

ARM")
Cc: [email protected]

Applied, thanks