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

SP 5.38.2 fails on GitHub Actions at pl2bat #174

Closed
mohawk2 opened this issue Mar 26, 2024 · 12 comments
Closed

SP 5.38.2 fails on GitHub Actions at pl2bat #174

mohawk2 opened this issue Mar 26, 2024 · 12 comments
Labels
upstream module Issue is due to an upstream module

Comments

@mohawk2
Copy link

mohawk2 commented Mar 26, 2024

Excerpt from build of PDL-NDBin just now:

  "C:\hostedtoolcache\windows\strawberry-perl\5.38.2\x64\perl\bin\perl.exe" -MExtUtils::Command -e cp -- pptemplate ..\..\blib\script\pptemplate
  pl2bat.bat ..\..\blib\script\pptemplate
  Can't execute /c/hostedtoolcache/windows/strawberry-perl/5.38.2/x64/perl/bin/pl2bat.bat.
  gmake[2]: *** [Makefile:433: ..\..\blib\script\pptemplate] Error 29
  gmake[2]: Leaving directory 'C:/Users/RUNNER~1/.cpanm/work/1711465690.4852/PDL-2.085_02/Basic/Gen'
  gmake[1]: *** [Makefile:511: subdirs] Error 2
  gmake[1]: Leaving directory 'C:/Users/RUNNER~1/.cpanm/work/1711465690.4852/PDL-2.085_02/Basic'
  gmake.EXE: *** [makefile:524: subdirs] Error 2
  -> FAIL Installing PDL::Basic failed. See C:\Users\RUNNER~1\.cpanm\work\1711465690.4852\build.log for details. Retry with --force to force install it.

When I switch that CI instead to 5.32, it doesn't have that error.

@shawnlaffan
Copy link
Contributor

shawnlaffan commented Mar 26, 2024

I cannot reproduce this locally using 5.38.2.2.

Which version of 5.38 is being used under CI?

Also, what specific flags are you passing to the build? It's possible the issue is related to parallel builds (I ran without any parallel flags).

Update:

Run from commit:

commit bf88db3ec6228c4afb4ef81e1bd1688167728b28 (HEAD -> master, tag: 2.085_02, origin/master, origin/HEAD)
Author: Ed J mohawk2@users.noreply.github.com
Date: Mon Mar 25 20:31:24 2024 +0000

2.085_02

@mohawk2
Copy link
Author

mohawk2 commented Mar 26, 2024

The log I excerpted shows 5.38.2. The above was not run from PDL, but PDL-NDBin, so I don't know why you're putting anything about PDL?

@shawnlaffan
Copy link
Contributor

I assumed it was part of the main PDL distro. Will test with PDL-NDBin when I get a chance later today.

Can you note the make flags used? e.g. number of parallel runs requested.

1 similar comment
@shawnlaffan
Copy link
Contributor

I assumed it was part of the main PDL distro. Will test with PDL-NDBin when I get a chance later today.

Can you note the make flags used? e.g. number of parallel runs requested.

@mohawk2
Copy link
Author

mohawk2 commented Mar 26, 2024

The CI config is on https://github.com/ebaudrez/PDL-NDBin/blob/master/.github/workflows/ci.yml

The action it's using is in PDLPorters/devops, at https://github.com/PDLPorters/devops/blob/master/github-actions/ci-dist/action.yml#L162-L167 which shows the relevant part - it is indeed doing parallel build. I can't see how that would cause a "failure to execute pl2bat"?

@shawnlaffan
Copy link
Contributor

Thanks for the details.

The parallel mode might not be relevant, but it's good to be able to eliminate issues, even if unlikely.

@sisyphus
Copy link

sisyphus commented Mar 26, 2024

FWIW, it builds fine for me on Windows 11 (with -j8).
Is it possible that /c/hostedtoolcache/windows/strawberry-perl/5.38.2/x64/perl/bin/pl2bat.bat is being interpreted as (edited):

C:/c/hostedtoolcache/windows/strawberry-perl/5.38.2/x64/perl/bin/pl2bat.bat

instead of as:

C:/hostedtoolcache/windows/strawberry-perl/5.38.2/x64/perl/bin/pl2bat.bat

@shawnlaffan
Copy link
Contributor

Thanks Rob.

It also builds fine for me on Win11, using both SP 5.38.2.2 and 5.38.0.1.

@mohawk2
Copy link
Author

mohawk2 commented Mar 27, 2024

If you wanted to have a go at reproducing this in the reported environment, you could fork PDL-NDBin, revert the commit where I version-pinned SP, and then cause the CI to do debugging stuff?

@shawnlaffan
Copy link
Contributor

Just looping back to this.

This does not appear to be an issue with Strawberry Perl. So far as I can tell it is either with PDL or ExtUtils::MakeMaker, caused by something like an interaction with MSYS2 paths in a windows shell.

The error logs in the first comment are related to a PDL build. The Makefile that errors is under .../PDL-2.085_02/Basic/Gen.

When I build PDL locally and check the generated Basic/Gen/Makefile the line specifying pl2bat does not provide a full path (L245). This means it is looked for in the path and thus any windows/MSYS2 style differences can have an impact if they are not handled by the shell the command is called from.

FIXIN = pl2bat.bat

All other paths are fully specified. For example L84-L87 contains:

PERLPREFIX = C:\perls\5.40.0.1_PDL_xx\perl
SITEPREFIX = C:\perls\5.40.0.1_PDL_xx\perl\site
VENDORPREFIX = C:\perls\5.40.0.1_PDL_xx\perl\vendor
INSTALLPRIVLIB = C:\perls\5.40.0.1_PDL_xx\perl\lib

This part of ExtUtils::MakeMaker might be the place to update things:
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blob/5b79f2e55bfa308a282f5abbd1733cfd1d7862db/lib/ExtUtils/MM_Win32.pm#L145-L147

@mohawk2
Copy link
Author

mohawk2 commented Aug 16, 2024

I think you're right! Do you mind opening an EUMM issue? This is definitely not something that PDL has any knowing effect on.

@shawnlaffan
Copy link
Contributor

I'll close this issue now. Further discussion is best done on the upstream issue (Perl-Toolchain-Gang/ExtUtils-MakeMaker#459) or PR (Perl-Toolchain-Gang/ExtUtils-MakeMaker#460).

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

No branches or pull requests

3 participants