"…/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
<p>I have a Perl module called <a href="https://github.com/xtaran/CGI-Github-Webhook" rel="nofollow">CGI::Github::Webhook</a> whose test suite <a href="https://travis-ci.org/xtaran/CGI-Github-Webhook/branches" rel="nofollow">works fine on Travis CI so far on the branch master</a>. But since it's a module for writing CGI scripts, I wanted to test it with <a href="https://metacpan.org/pod/CGI::Test" rel="nofollow">CGI::Test</a> as this would be closer to real-life scenarios.</p>

<p>But <a href="https://travis-ci.org/xtaran/CGI-Github-Webhook/branches" rel="nofollow">every Travis CI run in the branch <code>cgi-test</code> failed so far</a>. 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:</p>

<pre><code>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.
</code></pre>

<p>Example taken from <a href="https://travis-ci.org/xtaran/CGI-Github-Webhook/jobs/133666035#L311" rel="nofollow">currently latest run under Perl 5.22</a>. The symptoms on Perl 5.24 are more or less the same, just the initial error message seems differently phrased.</p>

<p>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 <a href="https://github.com/nohuhu/CGI-Test/issues" rel="nofollow">against CGI-Test</a>, <a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils" rel="nofollow">Scalar-List-Utils</a> or <a href="https://rt.perl.org/Public/Search/Results.html?Query=Queue=%27perl5%27%20AND%20Content%20LIKE%20%27module=XSLoader%27%20AND%20%28Status=%27open%27%20OR%20Status=%27new%27%20OR%20Status=%27stalled%27%29" rel="nofollow">XSLoader</a>, but would have expected that such an issue is already reported since it doesn't seem to be new. (First noticed several months ago.)</p>

<p>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.</p>