“…/auto/List/Util/Util.so: undefined symbol: PL_stack_sp at …/XSLoader.pm” only when running test suite with CGI::Test _and_ on Travis CI

♀尐吖头ヾ 提交于 2019-12-08 02:56:42

问题


I have a Perl module called CGI::Github::Webhook whose test suite works fine on Travis CI so far on the branch master. But since it's a module for writing CGI scripts, I wanted to test it with CGI::Test as this would be closer to real-life scenarios.

But every Travis CI run in the branch cgi-test failed so far. Except for the runs with Perl 5.24 and above, every failed run contained these lines, just with different Perl version numbers in the paths:

Attempt to reload List/Util.pm aborted.
Compilation failed in require at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Sub/Exporter/Progressive.pm line 9.
BEGIN failed--compilation aborted at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Sub/Exporter/Progressive.pm line 9.
Compilation failed in require at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Devel/GlobalDestruction.pm line 11.
BEGIN failed--compilation aborted at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Devel/GlobalDestruction.pm line 11.
Compilation failed in require at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Moo/_Utils.pm line 21.
BEGIN failed--compilation aborted at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Moo/_Utils.pm line 21.
Compilation failed in require at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Moo.pm line 4.
BEGIN failed--compilation aborted at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/Moo.pm line 4.
Compilation failed in require at /home/travis/build/xtaran/CGI-Github-Webhook/build_dir/lib/CGI/Github/Webhook.pm line 11.
BEGIN failed--compilation aborted at /home/travis/build/xtaran/CGI-Github-Webhook/build_dir/lib/CGI/Github/Webhook.pm line 11.
Compilation failed in require at ./cgitest.pl line 10.
BEGIN failed--compilation aborted at ./cgitest.pl line 10.
script /cgi-bin/cgitest.pl generated no valid headers at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/CGI/Test.pm line 468.
Use of uninitialized value $in_fname in unlink at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/CGI/Test.pm line 469.
Use of uninitialized value $in_fname in concatenation (.) or string at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/CGI/Test.pm line 469.
can't unlink : No such file or directory at /home/travis/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/CGI/Test.pm line 469.

Example taken from currently latest run under Perl 5.22. The symptoms on Perl 5.24 are more or less the same, just the initial error message seems differently phrased.

Anyone an idea what's going wrong here? Do I even have a chance to fix this? Looks like a bug to me. But in which module? I've found no matching bug reports against CGI-Test, Scalar-List-Utils or XSLoader, but would have expected that such an issue is already reported since it doesn't seem to be new. (First noticed several months ago.)

It though does not fail if I run that test suite with the system-provided Perl and Perl Modules on Debian Unstable (currently Perl version 5.22), so I can't really reproduce the issue locally.


回答1:


Found it myself: It were the #!/usr/bin/perl shebang lines in my example CGI scripts in the test suite (and/or maybe also the same shebang line in t/cgi-test.t).

Changing them to #!/usr/bin/env perl fixed the issue, i.e. the tested CGI scripts were running with the system perl instead of the perlbrew-installed one.



来源:https://stackoverflow.com/questions/37505516/auto-list-util-util-so-undefined-symbol-pl-stack-sp-at-xsloader-pm-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!