Tue Jul 01 04:27:36 2014: Request 85336 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: Fails often when tested in parallel
Broken in: 0.53
Severity: (no value)
Owner: Nobody
Requestors: [email protected], [email protected]
Status: resolved
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85336 >
Re-opening because of the following patch that was applied to Inline-0.55 as
part of this ticket:
####################################
Subject: [PATCH 4/5] MSWin32: disable BUILD_NOISY redirects on MSWin32 with
cmd.exe
also print exitcode with failed commands
diff --git C/C.pm C/C.pm
index f76e34b..21f7dfe 100644
--- C/C.pm
+++ C/C.pm
@@ -804,6 +804,7 @@ sub makefile_pl {
-f ($perl = $Config::Config{perlpath})
or ($perl = $^X)
or croak "Can't locate your perl binary";
+ $perl = qq{"$perl"} if $perl =~ m/\s/;
$o->system_call("$perl Makefile.PL", 'out.Makefile_PL');
$o->fix_make;
}
@@ -841,6 +842,7 @@ sub system_call {
defined $ENV{PERL_INLINE_BUILD_NOISY}
? $ENV{PERL_INLINE_BUILD_NOISY}
: $o->{CONFIG}{BUILD_NOISY};
+ $build_noisy = undef if $build_noisy and $^O eq 'MSWin32' and
$Config::Config{sh} =~ /^cmd/;
if (not $build_noisy) {
$cmd = "$cmd > $output_file 2>&1";
}
@@ -861,11 +863,12 @@ sub build_error_message {
close OUTPUT;
}
+ my $errcode = $? >> 8;
return $output . <<END;
A problem was encountered while attempting to compile and install your Inline
$o->{API}{language} code. The command that failed was:
- $cmd
+ \"$cmd\" with error code $errcode
The build directory was:
$build_dir
####################################
I wondered at the time (and still wonder) what that was about - but I applied
it anyway, as it didn't break any tests.
However, it does break BUILD_NOISY on Win32 - to the extent that the
compiler/linker commands/warnings of a successful build are not seen.
simply removing the line:
$build_noisy = undef if $build_noisy and $^O eq 'MSWin32' and
$Config::Config{sh} =~ /^cmd/;
from the patched (0.55) C.pm is sufficient to regain correct functioning of
BUILD_NOISY on Windows.
However, doing that probably also destroys whatever it was that the patch was
designed to fix.
This episode exposes a need for a test script that examines the output of a
BUILD_NOISY build to detect that this output is present.
It would be hard to check that the entire output is as it should be, but we
should at least be able to check for the presence of certain key elements like
- eg that the output matches the string "perl", that it matches the
(interpolated)"$Config{LD}" and that it matches the name of any Inline-C
function whose compilation is expected to emit a warning.
I think this breakage of BUILD_NOISY needs to be fixed for the next stable
release.
Attached is a try.pl that demonstrates the problem. It shows the expected
output of the script, and the actual output I get on one of my Win32 perls
using Inline-0.55.
Cheers,
Rob
use strict;
use warnings;
use Inline C => Config =>
BUILD_NOISY => 1,
;
use Inline C => <<'EOC';
void inline_warner() {
int *x;
x = 2;
}
EOC
print "DONE";
__END__
Should output (for me on Windows):
#############################################
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Writing Makefile for try_pl_534c
Writing MYMETA.yml
Finished "perl Makefile.PL" Stage
Starting "make" Stage
C:\perl514_M\bin\perl.exe C:\perl514_M\lib\ExtUtils\xsubpp -typemap "C:\perl514_M\lib\ExtUtils\typemap" -typemap "C:\_32\pscrpt\inline\typemap" try_pl_534c.xs > try_pl_534c.xsc && C:\perl514_M\bin\perl.exe -MExtUtils::Command -e "mv" -- try_pl_534c.xsc try_pl_534c.c
gcc -c -I"C:/_32/pscrpt/inline" -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-IC:\perl514_M\lib\CORE" try_pl_534c.c
try_pl_534c.xs: In function `inline_warner':
try_pl_534c.xs:8: warning: assignment makes pointer from integer without a cast
Running Mkbootstrap for try_pl_534c ()
C:\perl514_M\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 try_pl_534c.bs
C:\perl514_M\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"try_pl_534c\", 'DLBASE' => 'try_pl_534c', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
dlltool --def try_pl_534c.def --output-exp dll.exp
g++ -o blib\arch\auto\try_pl_534c\try_pl_534c.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"c:\perl514_M\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib" try_pl_534c.o C:\perl514_M\lib\CORE\libperl514.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
dlltool --def try_pl_534c.def --base-file dll.base --output-exp dll.exp
g++ -o blib\arch\auto\try_pl_534c\try_pl_534c.dll -mdll -s -L"c:\perl514_M\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib" try_pl_534c.o C:\perl514_M\lib\CORE\libperl514.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
C:\perl514_M\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib\arch\auto\try_pl_534c\try_pl_534c.dll
C:\perl514_M\bin\perl.exe -MExtUtils::Command -e "cp" -- try_pl_534c.bs blib\arch\auto\try_pl_534c\try_pl_534c.bs
C:\perl514_M\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib\arch\auto\try_pl_534c\try_pl_534c.bs
dmake: Warning: -- Target [blibdirs] was made but the time stamp has not been updated.
Finished "make" Stage
Starting "make install" Stage
Files found in blib\arch: installing files in blib\lib into architecture dependent library tree
Installing C:\_32\pscrpt\inline\_Inline\lib\auto\try_pl_534c\try_pl_534c.dll
Installing C:\_32\pscrpt\inline\_Inline\lib\auto\try_pl_534c\try_pl_534c.bs
Finished "make install" Stage
Starting Cleaning Up Stage
Finished Cleaning Up Stage
Finished Build Compile Stage
DONE
#######################################
But, with Inline-0.55 outputs:
#######################################
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Finished "perl Makefile.PL" Stage
Starting "make" Stage
Finished "make" Stage
Starting "make install" Stage
Finished "make install" Stage
Starting Cleaning Up Stage
Finished Cleaning Up Stage
Finished Build Compile Stage
DONE
#######################################