Re: Getopt::Long::Descriptive fails to load with "undefined symbol: Perl_xs_version_bootcheck"

[email protected] (David Cantrell)
Newsgroups perl.cpan.testers.discuss
Message-ID <[email protected]>
On 07/08/2023 06:13, Bodo Hugo Barwich wrote:
> Dear CPAN-Testers,
> 
> Test Scenario "*Process-SubProcess-2.1.3 5.18.2 GNU/Linux*" fails when 
> trying to load "/Getopt::Long::Descriptive/" as seen on:
> https://www.cpantesters.org/cpan/report/a62cd144-3498-11ee-98b0-b3c3213a625c <https://www.cpantesters.org/cpan/report/a62cd144-3498-11ee-98b0-b3c3213a625c>
> "
> Can't load 
> '/home/cpan/pit/jail/cm2baDMkN6/lib/perl5/x86_64-linux-thread-multi-ld/auto/Params/Util/Util.so' for module Params::Util: /home/cpan/pit/jail/cm2baDMkN6/lib/perl5/x86_64-linux-thread-multi-ld/auto/Params/Util/Util.so: undefined symbol: Perl_xs_version_bootcheck at /home/cpan/pit/jail/cm2baDMkN6/lib/perl5/x86_64-linux-thread-multi-ld/XSLoader.pm line 96.

FWIW I see dependency problems with it on 5.18.4 on my tester as well, 
but in my case it's because Module::CPANfile (a dependency of 
ExtUtils::MakeMaker::CPANfile) fails its tests. So I recommend not using 
that :-)

When I get rid of that by putting your deps in the Makefile.PL, I see 
the same errors in the tests. They're because while dependencies have 
been installed in the tester's build of perl 5.18, you're running some 
of your tests against whatever random version of perl is at 
/usr/bin/perl, which is not compatible. XS modules need to be built for 
a particular version of perl.

Specifically, the problem is that t/test_runner.t shells out to 
bin/run_subprocess.pl, which is executable and has /usr/bin/perl on the 
shebang line. Instead you should `use Config` and shell out to 
`$Config{perlpath} ../bin/run_subprocess.pl` to make sure that your 
tests use the right build of perl.

NB that this isn't just a "testers are weird" problem. This will affect 
any user who doesn't use the system-provided build of perl, such as 
anyone I've worked for in the last decade and a half.

Hope that helps!

-- 
David Cantrell
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.