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

Magic-Check-0.001: Build tends to succeed the second time under Strawberry Perl #1

Open
twata1 opened this issue Aug 27, 2023 · 1 comment

Comments

@twata1
Copy link

twata1 commented Aug 27, 2023

Hello,

Recently, The XS module builds tend to succeed the second time, as shown below.
It may be my environment, such as antivirus software.

Strawberry Perl 5.28.2 on Windows 8.1:

C:\home\gardenseat>cpan LEONT/Magic-Check-0.001.tar.gz
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Sun, 27 Aug 2023 13:25:23 GMT
CPAN: Digest::SHA loaded ok (v6.04)
CPAN: Compress::Zlib loaded ok (v2.206)
Checksum for C:\Strawberry\cpan\sources\authors\id\L\LE\LEONT\Magic-Check-0.001.tar.gz ok
CPAN: Archive::Tar loaded ok (v3.02)
CPAN: YAML::XS loaded ok (v0.88)
CPAN: CPAN::Meta::Requirements loaded ok (v2.141)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190420)
Configuring L/LE/LEONT/Magic-Check-0.001.tar.gz with Build.PL
CPAN: CPAN::Reporter loaded ok (v1.2019)
Creating new 'Build' script for 'Magic-Check' version '0.001'
(C:\Strawberry\perl\bin\perl.exe Build.PL exited with 0)
CPAN::Reporter: Build.PL result is 'pass', No errors.
  LEONT/Magic-Check-0.001.tar.gz
  C:\Strawberry\perl\bin\perl.exe Build.PL -- OK
Running Build for L/LE/LEONT/Magic-Check-0.001.tar.gz
cp lib/Magic/Check.pm blib\lib\Magic\Check.pm
gcc -c -I"." -I"include" -I"src" -I"lib\Magic" -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 "-DVERSION=\"0.001\"" "-DXS_VERSION=\"0.001\"" -I"C:\Strawberry\perl\lib\CORE" -I"C:\Strawberry\c\include" -o "temp\Check.o" "temp\Check.c"
Generating script 'temp\Check.lds'
dlltool --def "temp\Check.def" --output-exp "temp\Check.exp"
g++ -o "blib\arch\auto\Magic\Check\Check.xs.dll" -Wl,--base-file,"temp\Check.base" -Wl,--enable-auto-image-base -mdll -s -L"C:\Strawberry\perl\lib\CORE" -L"C:\Strawberry\c\lib" "temp\Check.lds" "temp\Check.exp"
dlltool --def "temp\Check.def" --output-exp "temp\Check.exp" --base-file "temp\Check.base"
g++ -o "blib\arch\auto\Magic\Check\Check.xs.dll" -Wl,--enable-auto-image-base -mdll -s -L"C:\Strawberry\perl\lib\CORE" -L"C:\Strawberry\c\lib" "temp\Check.lds" "temp\Check.exp"
C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file blib\arch\auto\Magic\Check\Check.xs.dll: Permission denied
collect2.exe: error: ld returned 1 exit status
(C:\Strawberry\perl\bin\perl.exe ./Build exited with 0)
CPAN::Reporter: Build result is 'pass', No errors.
  LEONT/Magic-Check-0.001.tar.gz
  C:\Strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test for LEONT/Magic-Check-0.001.tar.gz

#   Failed test 'Magic/Check.pm loaded ok'
#   at t/00-compile.t line 43.
#          got: '65280'
#     expected: '0'
Can't locate loadable object for module Magic::Check in @INC (@INC contains: C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\arch C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\lib C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\arch
 C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\lib C:\home\gardenseat\perl5\lib\perl5/MSWin32-x64-multi-thread C:\home\gardenseat\perl5\lib\perl5 C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at -e
line 1.
Compilation failed in require at -e line 1.
# Looks like you failed 1 test of 1.
t/00-compile.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Can't locate loadable object for module Magic::Check in @INC (@INC contains: C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\arch C:\Strawberry\cpan\build\Magic-Check-0.001-1\blib\lib C:\home\gardenseat\perl5\lib\perl5/MSWin32-x64-multi-thread C:\home\gardenseat\perl5\lib\perl5 C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at t/basic.t line 9.
Compilation failed in require at t/basic.t line 9.
BEGIN failed--compilation aborted at t/basic.t line 9.
t/basic.t .......
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run

Test Summary Report
-------------------
t/00-compile.t (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/basic.t     (Wstat: 512 (exited 2) Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=2, Tests=1,  1 wallclock secs ( 0.08 usr +  0.00 sys =  0.08 CPU)
Result: FAIL
(C:\Strawberry\perl\bin\perl.exe ./Build test exited with 256)


(snip)


C:\home\gardenseat>cpan LEONT/Magic-Check-0.001.tar.gz
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Sun, 27 Aug 2023 13:25:23 GMT
CPAN: Digest::SHA loaded ok (v6.04)
CPAN: Compress::Zlib loaded ok (v2.206)
Checksum for C:\Strawberry\cpan\sources\authors\id\L\LE\LEONT\Magic-Check-0.001.tar.gz ok
CPAN: Archive::Tar loaded ok (v3.02)
CPAN: YAML::XS loaded ok (v0.88)
CPAN: CPAN::Meta::Requirements loaded ok (v2.141)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190420)
Configuring L/LE/LEONT/Magic-Check-0.001.tar.gz with Build.PL
CPAN: CPAN::Reporter loaded ok (v1.2019)
Creating new 'Build' script for 'Magic-Check' version '0.001'
(C:\Strawberry\perl\bin\perl.exe Build.PL exited with 0)
CPAN::Reporter: Build.PL result is 'pass', No errors.
  LEONT/Magic-Check-0.001.tar.gz
  C:\Strawberry\perl\bin\perl.exe Build.PL -- OK
Running Build for L/LE/LEONT/Magic-Check-0.001.tar.gz
cp lib/Magic/Check.pm blib\lib\Magic\Check.pm
gcc -c -I"." -I"include" -I"src" -I"lib\Magic" -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 "-DVERSION=\"0.001\"" "-DXS_VERSION=\"0.001\"" -I"C:\Strawberry\perl\lib\CORE" -I"C:\Strawberry\c\include" -o "temp\Check.o" "temp\Check.c"
Generating script 'temp\Check.lds'
dlltool --def "temp\Check.def" --output-exp "temp\Check.exp"
g++ -o "blib\arch\auto\Magic\Check\Check.xs.dll" -Wl,--base-file,"temp\Check.base" -Wl,--enable-auto-image-base -mdll -s -L"C:\Strawberry\perl\lib\CORE" -L"C:\Strawberry\c\lib" "temp\Check.lds" "temp\Check.exp"
dlltool --def "temp\Check.def" --output-exp "temp\Check.exp" --base-file "temp\Check.base"
g++ -o "blib\arch\auto\Magic\Check\Check.xs.dll" -Wl,--enable-auto-image-base -mdll -s -L"C:\Strawberry\perl\lib\CORE" -L"C:\Strawberry\c\lib" "temp\Check.lds" "temp\Check.exp"
(C:\Strawberry\perl\bin\perl.exe ./Build exited with 0)
CPAN::Reporter: Build result is 'pass', No errors.
  LEONT/Magic-Check-0.001.tar.gz
  C:\Strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test for LEONT/Magic-Check-0.001.tar.gz
t/00-compile.t .. ok
t/basic.t ....... ok
All tests successful.
Files=2, Tests=7,  1 wallclock secs ( 0.03 usr +  0.03 sys =  0.06 CPU)
Result: PASS
(C:\Strawberry\perl\bin\perl.exe ./Build test exited with 0)

(snip)

Thank you,

@Leont
Copy link
Owner

Leont commented Aug 27, 2023

I have seen this kind of thing happen in other modules, and I don't fully understand it. The crucial line here is

C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file blib\arch\auto\Magic\Check\Check.xs.dll: Permission denied

It may be my environment, such as antivirus software.

That is actually a fairly likely sort of explanation.

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

No branches or pull requests

2 participants