“…/ auto / List / Util / Util.so:未定义的符号:... / XSLoader.pm处的PL_stack_sp”仅在Travis CI上使用CGI :: Test _and_运行测试套件时 [英] "…/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

查看:274
本文介绍了“…/ auto / List / Util / Util.so:未定义的符号:... / XSLoader.pm处的PL_stack_sp”仅在Travis CI上使用CGI :: Test _and_运行测试套件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为 CGI :: Github :: Webhook 的Perl模块,其测试套件到目前为止,在Travis CI上的分支主机上都可以正常运行。但是由于它是用于编写CGI脚本的模块,所以我想使用 CGI :: Test 对其进行测试。

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.

但是在分支 cgi-test 中运行的每个Travis CI到目前为止都失败了。除了使用Perl 5.24及更高版本的运行之外,每个失败的运行都包含以下行,但路径中具有不同的Perl版本号:

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.

示例取自当前最新版本是在Perl 5.22下运行的。。 Perl 5.24的症状大致相同,只是初始错误消息的措辞似乎有所不同。

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.

有人知道这里出了什么问题吗?我什至有机会解决这个问题?在我看来像个虫子。但是在哪个模块中?我没有找到匹配的错误报告反对CGI测试 Scalar-List-Utils XSLoader ,但由于它似乎不是新问题,因此可以预期已经报告了此问题。 (几个月前首次注意到。)

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.)

如果我在Debian Unstable(当前为Perl版本)上使用系统提供的Perl和Perl模块运行该测试套件,它不会失败5.22),所以我无法真正在本地重现该问题。

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.

推荐答案

我自己找到了:那是#!/ usr / bin / perl 我在测试套件中的示例CGI脚本中的shebang行(和/或 t / cgi-test中的相同shebang行.t )。

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).

将它们更改为#!/ usr / bin / env perl 修复了该问题,即经过测试的CGI脚本与系统 perl ,而不是安装了perlbrew的系统。

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.

这篇关于“…/ auto / List / Util / Util.so:未定义的符号:... / XSLoader.pm处的PL_stack_sp”仅在Travis CI上使用CGI :: Test _and_运行测试套件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆