From 5f0a8a4c1f9bea3df3f205005b7eb766bf1c6aaf Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 19 Feb 2026 10:51:11 -0700 Subject: [PATCH] Updated Perl plugin Meson logic to gracefully disable the plugin (instead of failing the whole configure) when ExtUtils::Embed cflags/ldflags cannot be retrieved. This is now handled with warnings plus subdir_done(). Added explicit check: false to both run_command() calls, resolving the Meson deprecation warning about implicit boolean check behavior in future Meson versions. Changed the Perl compile/link suitability probe failure from fatal error() to non-fatal warning + plugin disable, so unsupported host Perl setups do not abort the build entirely. --- plugins/perl/meson.build | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/perl/meson.build b/plugins/perl/meson.build index 1e7b301e..e0091ff0 100644 --- a/plugins/perl/meson.build +++ b/plugins/perl/meson.build @@ -27,9 +27,10 @@ endif perl = find_program(get_option('with-perl')) -ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts']) +ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts'], check: false) if ret.returncode() != 0 - error('perl: Failed to get cflags') + warning('Perl development files not found, disabling Perl plugin') + subdir_done() endif foreach flag : ret.stdout().strip().split(' ') if flag.startswith('-I') or flag.startswith('-D') @@ -37,9 +38,10 @@ foreach flag : ret.stdout().strip().split(' ') endif endforeach -ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts']) +ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts'], check: false) if ret.returncode() != 0 - error('perl: Failed to get ldflags') + warning('Perl development files not found, disabling Perl plugin') + subdir_done() endif perl_ldflags = [] perl_rpath = '' @@ -73,7 +75,8 @@ int main(void) { return 0; } ''', args: perl_cflags + perl_ldflags) - error('found perl not suitable for plugin') + warning('Found perl is not suitable for plugin, disabling Perl plugin') + subdir_done() endif perl_dep = declare_dependency(