Skip Menu |

This queue is for tickets about the Serge CPAN distribution.

Report information
The Basics
Id: 130062
Status: resolved
Priority: 0/
Queue: Serge

People
Owner: AFAN [...] cpan.org
Requestors: jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Serge: t/compile.5 fails against perl-5.31.0 on FreeBSD-12
As per subject line. Excerpt from cpanm build.log: ##### $ dumpjson AFAN.Serge-v1.3.2.log.json { author => "AFAN", dist => "Serge", distname => "Serge-v1.3.2", distversion => "v1.3.2", grade => "FAIL", prereqs => undef, test_output => [ "Building and testing Serge-v1.3.2", "Building Serge", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/clear_merge_flags.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/copy_db.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/dump_inconsistencies.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/dump_translations.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/export_to_ttx.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/guess_transformation.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/import_from_ttx.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/normalize_database_whitespace.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../bin/tools/generate-cldr-plurals-package/generate-cldr-plurals-package.pl syntax check'", "# at t/compile.t line 33.", "", "# Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/./engine.t syntax check'", "# at t/compile.t line 33.", "# Looks like you failed 10 tests of 104.", "t/compile.t .. ", "Dubious, test returned 10 (wstat 2560, 0xa00)", "Failed 10/104 subtests ", "Wide character in print at /usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../lib/Serge/Engine/Plugin/parse_pot.pm line 191.", "Wide character in print at /usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../lib/Serge/Engine/Plugin/parse_pot.pm line 191.", "Wide character in print at /usr/home/jkeenan/var/tad/testing/perl-5.31.0/.cpanm/work/1562787494.14114/Serge-v1.3.2/t/../lib/Serge/Engine/Plugin/parse_pot.pm line 191.", "t/engine.t ... ok", "", "Test Summary Report", "-------------------", "t/compile.t (Wstat: 2560 Tests: 104 Failed: 10)", " Failed tests: 1-9, 100", " Non-zero exit status: 10", "Files=2, Tests=171, 6 wallclock secs ( 0.16 usr 0.19 sys + 3.66 cusr 1.48 csys = 5.49 CPU)", "Result: FAIL", ], via => "App::cpanminus::reporter 0.17 (1.7044)", } ##### Can you investigate? Thank you very much. Jim Keenan
Jim, thanks for raising this issue! I tried to debug the issue, and for that I installed a clean FeeBSD 12 VM, Perl (default was 5.28) and ran `cpan Serge`. Turns out, default FreeBSD installation doesn't have Expat library, so installation of XML::Parser fails (the error says that 'expat.h' can't be found), and because of that, other modules fail to install, including Serge. If I install Expat by running `pkg install expat-2.2.6_1`, then `cpan Serge` installs missing dependencies and itself just fine. Can you check that this indeed is the source of the problem? I'm not sure if there's anything I can do from the Perl installer side; looks like the build machine needs to be configured to have Expat installed in the first place.
On Sun Jul 21 00:00:31 2019, AFAN wrote: Show quoted text
> Jim, thanks for raising this issue! > > I tried to debug the issue, and for that I installed a clean FeeBSD 12 > VM, Perl (default was 5.28) and ran `cpan Serge`. > > Turns out, default FreeBSD installation doesn't have Expat library, so > installation of XML::Parser fails (the error says that 'expat.h' can't > be found), and because of that, other modules fail to install, > including Serge. > > If I install Expat by running `pkg install expat-2.2.6_1`, then `cpan > Serge` installs missing dependencies and itself just fine. > > Can you check that this indeed is the source of the problem? I'm not > sure if there's anything I can do from the Perl installer side; looks > like the build machine needs to be configured to have Expat installed > in the first place.
I had the expat library installed, and XML-Parser got a PASS in this run of the CPAN-River-3000. ##### $ pkg info --all | grep -i expat expat-2.2.6_1 XML 1.0 parser written in C p5-XML-Parser-2.44 Perl extension interface to James Clark's XML parser, expat ##### So I investigated further by running the failing test file through a 'prove' build against the perl-5.31 being tested. I got these two unit failures: ##### not ok 6 - /usr/home/jkeenan/var/tad/testing/perl-5.31.1/.cpanm/work/1563027864.26470/Serge-v1.3.2/t/../bin/tools/guess_transformation.pl syntax check # Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.1/.cpanm/work/1563027864.26470/Serge-v1.3.2/t/../bin/tools/guess_transformation.pl syntax check' # at t/compile.t line 33. not ok 100 - /usr/home/jkeenan/var/tad/testing/perl-5.31.1/.cpanm/work/1563027864.26470/Serge-v1.3.2/t/./engine.t syntax check # Failed test '/usr/home/jkeenan/var/tad/testing/perl-5.31.1/.cpanm/work/1563027864.26470/Serge-v1.3.2/t/./engine.t syntax check' # at t/compile.t line 33. ##### The problem, it turns out, is in your test file. At line 31 of t/compile.t you are shelling out to a call to 'perl'. That means you are running your "everyday perl" -- whichever perl is returned by `which perl`. But what you want to be shelling out to there is "the perl which invoked this test file", namely, $^X. In other words, your hard-coding of 'perl' is the problem. Please consider the patch attached. (Bonus point for releasing a new version to CPAN today! perl-5.31.2 was released within the next 24 hours, so I expect the cron job which runs the CPAN-River-3000 program to kick off at approx. 6:00 am EDT Monday July 22.) Thank you very much. Jim Keenan
Subject: serge-v1.3.2-rtc-130062-t-compile-t.patch
--- t/compile.t.old 2019-07-21 08:13:08.565246000 -0400 +++ t/compile.t 2019-07-21 08:14:38.785409000 -0400 @@ -28,10 +28,10 @@ eval { $output = do $_ }; ok(!$@ && $output, "'do' $_"); } else { - $output = `perl -I "$libpath" -c $_ 2>&1`; + $output = `$^X -I "$libpath" -c $_ 2>&1`; my $ok = ($? >> 8 == 0); ok($ok, "$_ syntax check"); } } -done_testing(); \ No newline at end of file +done_testing();
Show quoted text
> The problem, it turns out, is in your test file. At line 31 of > t/compile.t you are shelling out to a call to 'perl'. That means you > are running your "everyday perl" -- whichever perl is returned by > `which perl`. But what you want to be shelling out to there is "the > perl which invoked this test file", namely, $^X. In other words, your > hard-coding of 'perl' is the problem.
Thanks for reminding me of that! I actually had it reported by someone else some time ago, and had it fixed already as of https://github.com/evernote/serge/commit/327f2b379d57b9f7bc0a1ef7fe6a4a780e5b46d1, but forgot that Serge 1.3 still uses the old code without this patch. So this will be fixed in Serge 1.4 which I'm preparing for the release. I wonder if you can grab the version from master (https://github.com/evernote/serge) and run tests against it?
Version 1.4 is out. Let's see how tests go, and feel free to reopen if there is still an issue with the wrong Perl interpreter being invoked.