Skip to content

Conversation

ailin-nemui
Copy link
Contributor

broken by meson 0.60.0

broken by meson 0.60.0
@ailin-nemui ailin-nemui merged commit 07aa061 into irssi:master Jun 12, 2022
@ailin-nemui ailin-nemui deleted the meson branch June 12, 2022 03:33
@eli-schwartz
Copy link

For context, the issue that this PR fixes only happens when meson.get_cross_property() finds an existing value.

In all such cases, versions of Meson before 0.60.0 would print the following warning:

meson.build:338: WARNING: Trying to compare values of different types (list, bool) using ==.
The result of this is undefined and will become a hard error in a future Meson release.
Compiler for C supports arguments -fPIC: YES 
meson.build:352: WARNING: Trying to compare values of different types (list, bool) using ==.
The result of this is undefined and will become a hard error in a future Meson release.

Tested with the following cross file:

[binaries]
c = 'gcc'
cpp = 'g++'
pkgconfig = 'pkg-config'

[properties]
perl_ccopts = ['-D_REENTRANT', '-D_GNU_SOURCE', '-fwrapv', '-fno-strict-aliasing', '-pipe', '-fstack-protector-strong', '-I/usr/local/include', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_FORTIFY_SOURCE=2', '-I/usr/lib/perl5/5.34/core_perl/CORE']
perl_ldopts = ['-Wl,-E', '-Wl,-rpath,/usr/lib/perl5/5.34/core_perl/CORE', '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now', '-fstack-protector-strong', '-L/usr/local/lib', '-L/usr/lib/perl5/5.34/core_perl/CORE', '-lperl', '-lpthread', '-ldl', '-lm', '-lcrypt', '-lutil', '-lc']

Note: the warning has been there since 0.44.0, and as I pointed out in IRC:

  • the intended goal of this sentinel value was to check if a cross property is defined, but it was wrong if someone decided to define it in their cross file as perl_ccopts = false
  • Meson 0.58 deprecates get_cross_property and replaces it with get_external_property... which comes with a has_external_property that does what you actually want.

Rather than bumping the minimum version of Meson to 0.58, it may be practical to wrap this in meson.version().version_compare() to use the new mechanism (the old mechanism can use whichever sentinel value it likes, since false will just be a Meson warning).

@eli-schwartz
Copy link

Also relevant :(
Perl/perl5#14030

ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Jun 13, 2022
fix yet another meson regression

(cherry picked from commit 07aa061)
ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Jun 13, 2022
fix yet another meson regression

(cherry picked from commit 07aa061)
ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Jul 2, 2022
fix yet another meson regression

(cherry picked from commit 07aa061)
@ailin-nemui ailin-nemui added this to the 1.4.2 milestone Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants