gpt4 book ai didi

perl - "…/auto/List/Util/Util.so: undefined symbol: PL_stack_sp at …/XSLoader.pm"仅当在 Travis CI 上使用 CGI::Test _and_ 运行测试套件时

转载 作者:行者123 更新时间:2023-12-01 23:13:56 24 4
gpt4 key购买 nike

我有一个名为 CGI::Github::Webhook 的 Perl 模块谁的测试套件works fine on Travis CI so far on the branch master .但是因为它是一个用于编写 CGI 脚本的模块,所以我想用 CGI::Test 来测试它。因为这会更接近现实生活场景。

但是every Travis CI run in the branch cgi-test failed so far .除了使用 Perl 5.24 及更高版本运行外,每次失败的运行都包含这些行,只是路径中的 Perl 版本号不同:

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.

示例取自 currently latest run under Perl 5.22 . Perl 5.24 上的症状或多或少是相同的,只是初始错误消息的措辞似乎有所不同。

有人知道这里出了什么问题吗?我什至有机会解决这个问题吗?对我来说看起来像个错误。但是在哪个模块中?我没有找到匹配的错误报告 against CGI-Test , Scalar-List-UtilsXSLoader ,但会预料到已经报告了这样的问题,因为它似乎不是新问题。 (几个月前第一次注意到。)

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

最佳答案

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

Changing them to #!/usr/bin/env perl fixed the issue ,即测试的 CGI 脚本使用系统 perl 而不是安装了 perlbrew 的系统运行。

关于perl - "…/auto/List/Util/Util.so: undefined symbol: PL_stack_sp at …/XSLoader.pm"仅当在 Travis CI 上使用 CGI::Test _and_ 运行测试套件时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37505516/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com