PerlAlien / Alien-MSYS

Tools required for autogen scripts in Windows
1 stars 3 forks source link

Failed t/alien_msys.t when setting PERL_ALIEN_MSYS_BIN to msys2 bin dir #24

Open hakonhagland opened 1 month ago

hakonhagland commented 1 month ago

I am trying to install this module using the MSYS2 binaries (i.e. avoid downloading MSYS) by setting the environment variable PERL_ALIEN_MSYS_BIN (Windows 11 from PowerShell):

> $env:PERL_ALIEN_MSYS_BIN = "C:\msys2\usr\bin"
> perl Makefile.PL
> gmake
> gmake test
"C:\Strawberry\perl\bin\perl.exe" -MAlien::Build::MM=cmd -e test
Alien::Build::Auto::X0::Alienfile> Windows major version 10 ok.
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00_diag.t ..... #
t/00_diag.t ..... 1/? #
#
# HARNESS_ACTIVE=1
# HARNESS_VERSION=3.44
# PERL5LIB=C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib;C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\arch
# PERL_ALIEN_MSYS_BIN=C:\msys2\usr\bin
# PERL_USE_UNSAFE_INC=1
#
#
#
# PERL5LIB path
# C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib
# C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\arch
#
#
#
# perl                                      5.038000 MSWin32 MSWin32-x64-multi-thread
# Alien::Base                               2.80
# Alien::Build                              2.80
# Alien::Build::MM                          2.80
# Alien::Build::Plugin::Decode::SourceForge 0.02
# Env                                       1.06
# ExtUtils::MakeMaker                       7.70
# File::Glob                                1.40
# File::chdir                               0.1011
# Path::Tiny                                0.144
# Test2::V0                                 0.000155
# Test::Alien::Build                        2.80
#
#
#
# locaton C:\msys2\usr\bin
# method  PERL_ALIEN_MSYS_BIN
#
#
#
t/00_diag.t ..... ok
t/alien_msys.t .. dir: cannot access '/s': No such file or directory
    # Failed test 'alien builds okay'
    # at t/alien_msys.t line 41.
    # Alien::Build> single file, assuming archive
    # Alien::Build::CommandSequence> + path
    # PATH=C:\msys2\usr\bin;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Rakudo\bin;C:\Rakudo\share\perl6\site\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Users\hakon\.pyenv\pyenv-win\bin;C:\Users\hakon\.pyenv\pyenv-win\shims;C:\Users\hakon\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\hakon\AppData\Local\Programs\Python\Python310\;C:\Users\hakon\AppData\Local\Microsoft\WindowsApps;C:\Users\hakon\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\hakon\OneDrive\Batch-scripts;C:\Users\hakon\AppData\Local\Programs\MiKTeX\miktex\bin\x64\;C:\Users\hakon\NASM;C:\Users\hakon\libtcod;C:\Users\hakon\libtcod\include;C:\Users\hakon\AppData\Roaming\Python\Scripts;C:\TreeTagger\bin;C:\Users\hakon\AppData\Local\GitHubDesktop\bin
    # Alien::Build::CommandSequence> + touch file3
    # Alien::Build::CommandSequence> + mv file3 C:/Users/hakon/AppData/Local/Temp/bykgCVPb8D/stage/file3
    # Alien::Build::CommandSequence> + sh C:/Users/hakon/perl/cpan-modules/Alien-MSYS-0.17/corpus/config.guess
    # Alien::Build::CommandSequence> [output consumed by Alien::Build recipe]
    # build threw exception: external command failed at C:/Strawberry/perl/vendor/lib/Alien/Build/CommandSequence.pm line 159.
    #
t/alien_msys.t .. 1/?     #
    #
    # bin_dir  = C:\msys2\usr\bin
    # dist_dir = C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib\auto\share\dist\Alien-MSYS
    #
    #
    # cd C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib\auto\share\dist\Alien-MSYS
    # +dir /s
    #  Volume in drive C is OS
    #  Volume Serial Number is 0A36-53BF
    #
    #  Directory of C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib\auto\share\dist\Alien-MSYS
    #
    # 18/07/2024  20:51    <DIR>          .
    # 18/07/2024  20:51    <DIR>          ..
    # 18/07/2024  20:51    <DIR>          _alien
    #                0 File(s)              0 bytes
    #
    #  Directory of C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\blib\lib\auto\share\dist\Alien-MSYS\_alien
    #
    # 18/07/2024  20:51    <DIR>          .
    # 18/07/2024  20:51    <DIR>          ..
    # 18/07/2024  20:51               452 alien.json
    # 26/09/2022  02:08             6,605 alienfile
    #                2 File(s)          7,057 bytes
    #
    #      Total Files Listed:
    #                2 File(s)          7,057 bytes
    #                5 Dir(s)  60,396,679,168 bytes free
    # cd C:\msys2\usr\bin
    # +dir /s
    #
    # REM Alien::MSYS::msys( ... )
    # +path
    # PATH=C:\msys2\usr\bin;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Rakudo\bin;C:\Rakudo\share\perl6\site\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Users\hakon\.pyenv\pyenv-win\bin;C:\Users\hakon\.pyenv\pyenv-win\shims;C:\Users\hakon\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\hakon\AppData\Local\Programs\Python\Python310\;C:\Users\hakon\AppData\Local\Microsoft\WindowsApps;C:\Users\hakon\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\hakon\OneDrive\Batch-scripts;C:\Users\hakon\AppData\Local\Programs\MiKTeX\miktex\bin\x64\;C:\Users\hakon\NASM;C:\Users\hakon\libtcod;C:\Users\hakon\libtcod\include;C:\Users\hakon\AppData\Roaming\Python\Scripts;C:\TreeTagger\bin;C:\Users\hakon\AppData\Local\GitHubDesktop\bin
    #
    #

# Failed test 'basic'
# at t/alien_msys.t line 97.
t/alien_msys.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

Test Summary Report
-------------------
t/alien_msys.t (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=2, Tests=2,  3 wallclock secs ( 0.03 usr +  0.02 sys =  0.05 CPU)
Result: FAIL
Failed 1/2 test programs. 1/2 subtests failed.
gmake: *** [makefile:917: test_dynamic] Error 1
hakonhagland commented 1 month ago

# build threw exception: external command failed at C:/Strawberry/perl/vendor/lib/Alien/Build/CommandSequence.pm line 159.

I think I can run that external command manually like this:

C:\msys2\usr\bin> .\sh.exe C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\corpus\config.guess
C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\corpus\config.guess: unable to guess system type

This script, last modified 2013-11-29, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (C:\Users\hakon\perl\cpan-modules\Alien-MSYS-0.17\corpus\config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2013-11-29

uname -m = x86_64
uname -r = 3.4.7.x86_64
uname -s = MSYS_NT-10.0-22631
uname -v = 2023-07-14 16:57 UTC

/usr/bin/uname -p = unknown
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = x86_64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = x86_64
UNAME_RELEASE = 3.4.7.x86_64
UNAME_SYSTEM  = MSYS_NT-10.0-22631
UNAME_VERSION = 2023-07-14 16:57 UTC

Notice the message "unable to guess system type" maybe that is a clue why this test fails?