Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of 5.6 support #525

Open
pmqs opened this issue Dec 18, 2020 · 19 comments · Fixed by #559
Open

Status of 5.6 support #525

pmqs opened this issue Dec 18, 2020 · 19 comments · Fixed by #559

Comments

@pmqs
Copy link

pmqs commented Dec 18, 2020

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.

@shogo82148
Copy link
Owner

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

@pmqs
Copy link
Author

pmqs commented Dec 20, 2020

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
Copy link
Author

pmqs commented Dec 20, 2020

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
Copy link
Author

pmqs commented Jan 10, 2021

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.

@tobyink
Copy link
Sponsor

tobyink commented Jan 11, 2021

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

@shogo82148 shogo82148 reopened this Jan 11, 2021
@shogo82148
Copy link
Owner

@tobyink can you show me your logs?

@tobyink
Copy link
Sponsor

tobyink commented Jan 11, 2021

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
Copy link
Sponsor

tobyink commented Jan 11, 2021

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
Copy link
Sponsor

tobyink commented Jan 12, 2021

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.

@shogo82148
Copy link
Owner

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.

@tobyink
Copy link
Sponsor

tobyink commented Jan 12, 2021

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.

@pmqs
Copy link
Author

pmqs commented Jan 16, 2021

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
Copy link
Author

pmqs commented Jan 17, 2021

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

@shogo82148
Copy link
Owner

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.

@pmqs
Copy link
Author

pmqs commented Jan 17, 2021

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.

@tobyink
Copy link
Sponsor

tobyink commented Jan 17, 2021

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
Copy link
Sponsor

tobyink commented Jan 17, 2021

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

@shogo82148
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants