Fri Apr 04 14:02:09 2014: Request 85336 was acted upon. Transaction: Correspondence added by rur...@x-ray.at Queue: Inline Subject: Fails often when tested in parallel Broken in: 0.53 Severity: (no value) Owner: Nobody Requestors: a...@cpan.org, ken...@cpan.org Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85336 >
Patches for the next release attached
>From ddb07b21a81466fe21ab92440edfdee5dc521100 Mon Sep 17 00:00:00 2001 From: Reini Urban <rur...@cpanel.net> Date: Fri, 4 Apr 2014 12:37:08 -0500 Subject: [PATCH 4/5] MSWin32: disable BUILD_NOISY redirects on MSWin32 with cmd.exe also print exitcode with failed commands --- C/C.pm | 5 ++++- Changes | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 diff --git Changes Changes index eed0437..641e8ba 100644 --- Changes +++ Changes @@ -1,5 +1,12 @@ # Revision history for Perl extension Inline. +--- version 0.54_01 +date 2014-04-04 12:22:37 + import Fcntl constants for flock (rurban) + flock only on supported platforms, would die on VMS,riscos,VOS (rurban) + print exitcode with failed commands + disable BUILD_NOISY redirects on MSWin32 with cmd.exe + --- version 0.54 date Sat 29 Mar 2014 Update version number to 0.54 -- 1.9.1
>From 96f009221620e148c55d1a50f7aa6d06f9940ad9 Mon Sep 17 00:00:00 2001 From: Reini Urban <rur...@cpanel.net> Date: Fri, 4 Apr 2014 11:31:33 -0500 Subject: [PATCH 2/5] 0.54_01: import Fcntl constants for flock Bareword "LOCK_EX" not allowed while "strict subs" in use at ../blib/lib/Inline.pm line 861 --- C/Makefile.PL | 4 ++-- Inline.pm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git C/Makefile.PL C/Makefile.PL index 03306ee..214b7bd 100644 --- C/Makefile.PL +++ C/Makefile.PL @@ -36,8 +36,8 @@ Inline::C is packaged with Inline.pm because it is the most commonly used Inline Language Support Module (ILSM). See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), ::CPR, - ::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, ::TT, - ::Tcl and ::WebChat. + ::Filters, ::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, + ::TT, ::Tcl and ::WebChat. Config.pm indicates that your version of Perl was built with this C compiler: diff --git Inline.pm Inline.pm index 062b29f..dc0d504 100644 --- Inline.pm +++ Inline.pm @@ -2,7 +2,7 @@ package Inline; use strict; require 5.006; -$Inline::VERSION = '0.54'; +$Inline::VERSION = '0.54_01'; $Inline::VERSION = eval $Inline::VERSION; use AutoLoader 'AUTOLOAD'; @@ -12,6 +12,7 @@ use Carp; use Cwd qw(abs_path cwd); use File::Spec; use File::Spec::Unix; +use Fcntl qw(LOCK_EX LOCK_UN); my %CONFIG = (); my @DATA_OBJS = (); -- 1.9.1
>From 2ce1aed6d8980ae341cd3499d8efc36ce9b2ac5d Mon Sep 17 00:00:00 2001 From: Reini Urban <rur...@cpanel.net> Date: Fri, 4 Apr 2014 12:59:31 -0500 Subject: [PATCH 5/5] C: fix make -jn test, parallel tests (Ticket #85336) strip make jobserver-fds from MAKEFLAGS print MAKE* ENV values with failed make command --- C/C.pm | 10 +++++++++- C/Changes | 6 ++++++ Changes | 3 +-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git C/C.pm C/C.pm index 21f7dfe..0dfa73b 100644 --- C/C.pm +++ C/C.pm @@ -812,12 +812,14 @@ sub make { my ($o) = @_; my $make = $o->{ILSM}{MAKE} || $Config::Config{make} or croak "Can't locate your make binary"; + local $ENV{MAKEFLAGS} = $ENV{MAKEFLAGS} =~ s/(--jobserver-fds=[\d,]+)//; $o->system_call("$make", 'out.make'); } sub make_install { my ($o) = @_; my $make = $o->{ILSM}{MAKE} || $Config::Config{make} or croak "Can't locate your make binary"; + local $ENV{MAKEFLAGS} = $ENV{MAKEFLAGS} =~ s/(--jobserver-fds=[\d,]+)//; $o->system_call("$make pure_install", 'out.make_install'); } sub cleanup { @@ -864,7 +866,7 @@ sub build_error_message { } my $errcode = $? >> 8; - return $output . <<END; + $output .= <<END; A problem was encountered while attempting to compile and install your Inline $o->{API}{language} code. The command that failed was: @@ -876,6 +878,12 @@ $build_dir To debug the problem, cd to the build directory, and inspect the output files. END + if ($cmd =~ /^make >/) { + for (sort keys %ENV) { + $output .= "$_ = $ENV{$_}\n" if /^MAKE/; + } + } + return $output; } #============================================================================== diff --git C/Changes C/Changes index f3406ac..0019ec6 100644 --- C/Changes +++ C/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension Inline::C. +--- version 0.54_01 +date 2014-04-04 + fix make -jn test, parallel tests (Ticket #85336) (rurban) + disable BUILD_NOISY redirects on MSWin32 with cmd.exe (rurban) + print exitcode with failed commands and MAKE* ENV values (rurban) + 0.54 Sat 29 mar 2014 Update version number to 0.54 Release version 0.54 to CPAN diff --git Changes Changes index 641e8ba..c128032 100644 --- Changes +++ Changes @@ -1,11 +1,10 @@ # Revision history for Perl extension Inline. --- version 0.54_01 -date 2014-04-04 12:22:37 +date 2014-04-04 import Fcntl constants for flock (rurban) flock only on supported platforms, would die on VMS,riscos,VOS (rurban) print exitcode with failed commands - disable BUILD_NOISY redirects on MSWin32 with cmd.exe --- version 0.54 date Sat 29 Mar 2014 -- 1.9.1
>From f195ee259a0247f382b961fa38cdd20f41c25c54 Mon Sep 17 00:00:00 2001 From: Reini Urban <rur...@cpanel.net> Date: Fri, 4 Apr 2014 10:31:41 -0500 Subject: [PATCH 1/5] Makefile.PL: simplify 5.6 PREREQ_PM handling --- Makefile.PL | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git Makefile.PL Makefile.PL index 8ea8cfb..158bafa 100644 --- Makefile.PL +++ Makefile.PL @@ -40,22 +40,14 @@ unless($md5_check) { my $twv = $] > 5.013 ? 0.23 : 0.21; -my $prereq_pm = $] > 5.007 ? - { - Data::Dumper => 2.09, - Digest::MD5 => 2.09, - Parse::RecDescent => 1.80, - File::Spec => 0.8, - Test::Warn => $twv, - } - - : - { - Data::Dumper => 2.09, - Digest::MD5 => 2.09, - Parse::RecDescent => 1.80, - File::Spec => 0.8, - }; +my $prereq_pm = { + Data::Dumper => 2.09, + Digest::MD5 => 2.09, + Parse::RecDescent => 1.80, + File::Spec => 0.8, + Test::Warn => $twv, +}; +delete $prereq_pm->{'Test::Warn'} if $] <= 5.007; WriteMakefile( NAME => 'Inline', -- 1.9.1
>From 8c217ba881b2e72b622aacacfcffab525125b6f3 Mon Sep 17 00:00:00 2001 From: Reini Urban <rur...@cpanel.net> Date: Fri, 4 Apr 2014 12:22:17 -0500 Subject: [PATCH 3/5] flock only on supported platforms see perldoc perlport --- Inline.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git Inline.pm Inline.pm index dc0d504..760f4f0 100644 --- Inline.pm +++ Inline.pm @@ -859,7 +859,7 @@ sub create_config_file { my $file = File::Spec->catfile($ARGV[0], $configuration_file); open CONFIG, "> $file" or croak M24_open_for_output_failed($file); - flock(CONFIG, LOCK_EX); + flock(CONFIG, LOCK_EX) if $^O !~ /^VMS|riscos|VOS$/; print CONFIG Inline::denter->new() ->indent(*version => $Inline::VERSION, *languages => \%languages, @@ -867,7 +867,7 @@ sub create_config_file { *modules => \%modules, *suffixes => \%suffixes, ); - flock(CONFIG, LOCK_UN); + flock(CONFIG, LOCK_UN) if $^O !~ /^VMS|riscos|VOS$/; close CONFIG; exit 0; } -- 1.9.1