actions-setup-perl icon indicating copy to clipboard operation
actions-setup-perl copied to clipboard

Status of 5.6 support

Open pmqs opened this issue 3 years ago • 19 comments

Is the intention of #501 to add general support for building with Perl 5.6?

Tried it out with the Linux workflow file for Archive-Zip-SimpleZip but it didn't work -- see here for the build failure

The call to cpanm --quiet --installdeps --notest . in .linux.yml didn't install any of the expected dependencies.

pmqs avatar Dec 18 '20 15:12 pmqs

building perl 5.6 binaries is succeeded, but not tested widely. test reports are welcome.

shogo82148 avatar Dec 20 '20 02:12 shogo82148

building perl 5.6 binaries is succeeded, but not tested widely.

ok

test reports are welcome.

Tried Compress-Raw-Zlib which doesn't need cpanm to fetch any dependencies and it worked fine with 5.6

pmqs avatar Dec 20 '20 08:12 pmqs

Spoke too soon. Windoes failure here https://github.com/pmqs/Compress-Raw-Zlib/runs/1584217933?check_suite_focus=true

  cpanm --quiet --installdeps --notest .
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
Can't locate Win32.pm in @INC (@INC contains: FatPacked::38807136=HASH(0x%I64x) D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib C:/hostedtoolcache/windows/perl/5.6.2-thr/x64/lib C:/hostedtoolcache/windows/perl/5.6.2-thr/x64/site/lib .) at D:\a\_actions\shogo82148\actions-setup-perl\v1\bin\cpanm line %I64d.
Error: Process completed with exit code 1.

pmqs avatar Dec 20 '20 12:12 pmqs

Tried rebuilding with the updated action (see https://github.com/pmqs/Compress-Raw-Zlib/runs/1676339060?check_suite_focus=true). I'm still seeing the error -- Can't locate Win32.pm

Run cpanm --quiet --installdeps --notest .
  cpanm --quiet --installdeps --notest .
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
Can't call method "new" on an undefined value at D:\a\_actions\shogo82148\actions-setup-perl\v1\bin\cpanm line %I64d.
Error: Process completed with exit code 1.

pmqs avatar Jan 10 '21 10:01 pmqs

I still don't have working cpanm for Perl 5.6 on ubuntu-latest.

tobyink avatar Jan 11 '21 00:01 tobyink

@tobyink can you show me your logs?

shogo82148 avatar Jan 11 '21 22:01 shogo82148

https://github.com/tobyink/p5-type-tiny/runs/1676870339 — the "Install dependencies" step — cpanm seems to say No MYMETA file is found after configure. Your toolchain is too old?

tobyink avatar Jan 11 '21 22:01 tobyink

Hmmm. That may be unrelated though. I think this is my issue. gha-prove seems to be calling the system perl instead of your Perl.

tobyink avatar Jan 11 '21 22:01 tobyink

So I guess the solution will be to ensure Test::Harness 2.40+ is installed That ensures the prove script will be in Perl's bin, and the system Perl's prove won't be found instead.

tobyink avatar Jan 12 '21 14:01 tobyink

Ah... I see. prove script is available from perl v5.10.1

$ corelist App::Prove

Data for 2020-06-20
App::Prove was first released with perl v5.10.1

I will install latest Test::Harness.

shogo82148 avatar Jan 12 '21 15:01 shogo82148

Thee prove script has been in core since Perl 5.8.3, but from 5.10.1, most of the script was moved into a module, so that's why the module was added to core then.

tobyink avatar Jan 12 '21 15:01 tobyink

Retried my failing build(see here). Still failing, but now with this error

Run cpanm --quiet --installdeps --notest .
  cpanm --quiet --installdeps --notest .
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
The filename, directory name, or volume label syntax is incorrect.
! Configuring . failed. See C:\Users\RUNNER~1\.cpanm\work\1610800717.3700\build.log for details.
Error: Process completed with exit code 1.

pmqs avatar Jan 16 '21 12:01 pmqs

I released https://github.com/shogo82148/actions-setup-perl/releases/tag/v1.9.5 it works https://github.com/shogo82148/Compress-Raw-Zlib/runs/1716607477?check_suite_focus=true 🎉

shogo82148 avatar Jan 17 '21 12:01 shogo82148

I released https://github.com/shogo82148/actions-setup-perl/releases/tag/v1.9.5

Excellent!

it works https://github.com/shogo82148/Compress-Raw-Zlib/runs/1716607477?check_suite_focus=true 🎉

Almost there, but not quite. I see that most of the .t file are outputting this

'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,

I don't think that is coming from my tests.

This is output from your test run (I got the same thing when I tried it).

Run make test
  make test
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t\000prereq.t t\01version.t t\02zlib.t t\07bufsize.t t\09limitoutput.t t\18lvalue.t t\19nonpv.t t\99pod.t t\meta-json.t t\meta-yaml.t
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
# Running Perl version  5.006002
t\000prereq.t ...... ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\01version.t ...... ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\02zlib.t ......... ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\07bufsize.t ...... skipped: Lengthy Tests Disabled
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\09limitoutput.t .. ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\18lvalue.t ....... ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\19nonpv.t ........ ok
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\99pod.t .......... skipped: Test::Pod 1.00 required for testing POD
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\meta-json.t ...... skipped: Test::CPAN::Meta::JSON required for testing META.json
'C:\hostedtoolcache\windows\perl\5.6.2-thr\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.
t\meta-yaml.t ...... skipped: Test::CPAN::Meta required for testing META.yml
All tests successful.
Files=10, Tests=507,  1 wallclock secs ( 0.05 usr +  0.06 sys =  0.11 CPU)
Result: PASS

pmqs avatar Jan 17 '21 13:01 pmqs

It is a bug of perl 5.6. the system function on windows doesn't handle its arguments correctly.

# test.pl
my $perl = $^X;
print `"$perl" -e "print join qq[\\n], \@INC, q[]"`;
PS > C:\Users\Administrator\Desktop\actions-setup-perl\scripts\windows\tmp\perl\5.6.2\x64\bin\perl.exe .\test.pl
'C:\Users\Administrator\Desktop\actions-setup-perl\scripts\windows\tmp\perl\5.6.2\x64\bin\perl.exe" -e "print' is not recognized as an internal or external command,
operable program or batch file.

The test comes from here: https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/94e8ba4c942a0f4e4eb0a483a8a8c3ee9bd9ff61/lib/Test/Harness.pm#L305-L307

I will not patch the perl code to fix it because I don't want to break the existing behavior. It is best to fix Test::Harness.

shogo82148 avatar Jan 17 '21 18:01 shogo82148

It is a bug of perl 5.6. the system function on windows doesn't handle its arguments correctly.

Looks like it is ok to close this issue then.

I will not patch the perl code to fix it because I don't want to break the existing behavior. It is best to fix Test::Harness.

Agree.

Thanks for taking the time to fix this issue.

pmqs avatar Jan 17 '21 21:01 pmqs

I'm re-running some tests with v1.9.5 now and will let you know how it goes. https://github.com/tobyink/p5-type-tiny/actions/runs/490571463

tobyink avatar Jan 17 '21 22:01 tobyink

I've been getting "No MYMETA file is found after configure. Your toolchain is too old?" running cpanm on Perl 5.6.1, 5.6.2, and 5.8.0. (5.8.1+ is fine.)

tobyink avatar Jan 17 '21 22:01 tobyink

because CPAN::Meta is too old to generate MYMETA. CPAN::Meta v2.112150 is required.

https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blob/1daf00cbc42538a4cda7c6bc5671abab9c30159a/lib/ExtUtils/MM_Any.pm#L1108-L1115

and the latest version of CPAN::Meta requires perl v5.8.1 or later https://metacpan.org/pod/release/DAGOLDEN/CPAN-Meta-2.150010/lib/CPAN/Meta.pm

shogo82148 avatar Jan 18 '21 04:01 shogo82148