StrawberryPerl / Perl-Dist-Strawberry

Tooling to build and package releases for Perl on Windows.
https://strawberryperl.com
Other
289 stars 49 forks source link

LWP::Protocol::https fails to install and strawberry perl cannot be compiled #170

Closed sergiotarxz closed 5 months ago

sergiotarxz commented 8 months ago

When I run:

perl perl\site\bin\perldist_strawberry -job "<dist_sharedir>/64bit-5.38.0.1.pp" -restorepoints -notest_modules -verbosity=5

LWP::Protocol::https fails and it refuses to compile strawberry perl.

This is my debug zip. 1709591885_debug_dir.zip

I am in the latest commit of Perl-Dist-Strawberry.

shawnlaffan commented 8 months ago

Thanks for testing this.

The errors appear to be related to your system given that most of the build logs are failures. (Look for files matching mod_install_.+_FAIL_\d+.log.txt).

The env vars in the failing logs indicate the cpanm utility is not being grabbed from the build tree. It is instead under C:/Users/Docker/Desktop/straw/perl/site/lib/auto/share/dist/Perl-Dist-Strawberry/utils/cpanm. So it is probably grabbing settings from a different perl.

The script I have used for the recent 64-bit 5.38 releases is at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/blob/build_local/devel.utils/_build-5.38_local.bat

That's on a branch so I've opened PR #171 to get it onto the master branch.

One thing those scripts do is ensure the repo's Perl-Dist-Strawberry blib dir is at the front of the module search path. That in turn needs the package to have been built first (run perl Build.pl && .\Build at the top level of the repo).

I also build on a system with no perls in the path by default so there are no path conflicts.

sergiotarxz commented 8 months ago

I am testing with that script following your instructions. (I have to comment that I removed the MSI Output from the pp because only disabling it did not delete the dependency on WiX, maybe that should be other issue)

shawnlaffan commented 8 months ago

Thanks. Hopefully it works this time.

Removing the need for WiX when not building an MSI can be a separate issue.

sergiotarxz commented 8 months ago

I will open it.

sergiotarxz commented 8 months ago

LWP::Protocol::https installed sucessfully this time I think it is going to work.

shawnlaffan commented 8 months ago

The InstallModules step in the 64bit-5.38.2.2.pp config file has also been broken up into several smaller groups. This means it stops earlier if there is a failure. It is also easier to restart since not as many packages need to be built given all the previous steps have been completed and are in the build tree.

sergiotarxz commented 8 months ago

DBD::mysql fails now, I removed it from the script since I do not need it, trying again.

shawnlaffan commented 8 months ago

DBD::mysql is disabled in the 5.38.2.2 config. https://github.com/StrawberryPerl/Perl-Dist-Strawberry/blob/09bf10cae2e7ccb9d6d6442fa2a5702bf7ee0cee/share/64bit-5.38.2.2.pp#L269

Which config file are you using?

sergiotarxz commented 8 months ago

I am using 5.38.0.1 the master's one.

shawnlaffan commented 8 months ago

See how it goes, but it is probably better to build the most recent Perl. That config file is on the build_local branch (and also part of PR #171).

sergiotarxz commented 8 months ago

I will try to see how the 5.38.0 goes just because I already advanced too much, but when it is ready or it fails in a way I cannot fix I will try also your branch. I cannot tell how thankful I am, I really need to compile strawberry perl and I have been all the day trying. (For a hobby project)

shawnlaffan commented 8 months ago

Not a problem. The more eyes we have on the code the better,

sergiotarxz commented 8 months ago

1709648337_debug_dir.zip Just another fresh error with HTTP-Server-Simple in 5.38.2.

shawnlaffan commented 8 months ago

This looks like an issue with the HTTP::Server::Simple tests (see below). The test expects upper case while the response is lower case.

It would be good to report this upstream: https://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Server-Simple

In the meantime you can skip these tests. Look for other examples in the pp file containing HARNESS_SKIP where individual test files are skipped.


#   Failed test 'method - url'
#   at t/04cgi.t line 70.
#                   'HTTP/1.0 200 OK
# Content-Type: text/html
# Content-Length: 33
# 
# url: http://dockerw-c0rss1k:45113'
#     doesn't match '/url: http://DOCKERW-C0RSS1K:45113/'

#   Failed test 'method (absolute URL) - url'
#   at t/04cgi.t line 96.
#                   'HTTP/1.0 200 OK
# Content-Type: text/html
# Content-Length: 33
# 
# url: http://dockerw-c0rss1k:45113'
#     doesn't match '/url: http://DOCKERW-C0RSS1K:45113/'

#   Failed test 'method (absolute URL) - url'
#   at t/04cgi.t line 96.
#                   'HTTP/1.0 200 OK
# Content-Type: text/html
# Content-Length: 33
# 
# url: http://dockerw-c0rss1k:45113'
#     doesn't match '/url: http://DOCKERW-C0RSS1K:45113/'
# Looks like you failed 3 tests of 62.
t/04cgi.t .......... 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/62 subtests 

Test Summary Report
-------------------
t/04cgi.t        (Wstat: 768 (exited 3) Tests: 62 Failed: 3)
  Failed tests:  14, 30, 46
  Non-zero exit status: 3
Files=5, Tests=104, 21 wallclock secs ( 0.03 usr +  0.01 sys =  0.05 CPU)
Result: FAIL
Failed 1/5 test programs. 3/104 subtests failed.
gmake: *** [makefile:784: test_dynamic] Error 3
! Installing HTTP::Server::Simple failed. See C:\strawberry_build\env\AppDataRoaming\.cpanm\work\1709648186.8068\build.log for details. Retry with --force to force install it.
FAIL
shawnlaffan commented 5 months ago

The issue with LWP::Protocol::https seems to have been resolved so I think this is now closable. I will do so in a few days, or when I next do a sweep of the open issues.

@sergiotarxz - If this is not the case then please advise.