On Fri, Jan 16, 2009 at 02:17:41PM -0500, Jerry D. Hedden wrote:
> make_patchnum.pl must be run before configpm is run so that
> the lib/Config_git.pl is available.

I've adopted a different approach

On Mon, Jan 19, 2009 at 08:43:33AM +0100, H.Merijn Brand wrote:
> On Mon, 19 Jan 2009 06:12 +0100, "H.Merijn Brand" <h.m.br...@xs4all.nl>
> wrote:
> 
> > Automated smoke report for 5.11.0 patch 
> > ca05901bcdb87a77829693dd8030b3269443fe33 2009-01-18.19:00:08
> > x1: Intel(R) Itanium 2 processor/1600 MHz (ia64/2 cpu)
> >     on        HP-UX - B.11.23/64
> >     using     cc version B3910B
> >     smoketime 7 hours 27 minutes (average 55 minutes 56 seconds)
> > 
> > Summary: FAIL(m)
> > 
> > O = OK  F = Failure(s), extended report at the bottom
> > X = Failure(s) under TEST but not under harness
> > ? = still running or test results not (yet) available
> > Build failures during:       - = unknown or N/A
> > c = Configure, m = make, M = make (after miniperl), t = make test-prep
> > 
> > 2009-01-18.19:00:08  Configuration (common) none
> > ----------- ---------------------------------------------------------
> > m - - O O O
> 
>         CCCMD =  gcc -DPERL_CORE -c -milp32 -DPERL_DONT_CREATE_GVSV 
> -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/pro/local/include 
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O -Wall -W -Wextra 
> -Wdeclaration-after-statement -Wendif-labels -Wc++-compat 
> ld: I/O error, file "miniperl": Text file busy
> Fatal error.
> collect2: ld returned 1 exit status
> 
>     'makeopt'         => '-j2',

I've been hitting errors like this on Solaris, and execvp failures on Linux.

The existing logic is fundamentally flawed when it comes to parallel makes -
we can't have two rules running in parallel:

        $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_patchnum.pl || 
$(MAKE) miniperl

        $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib configpm

where the '$(MAKE) miniperl' will delete ./miniperl, and if the race is lost
manages to do it at exactly the time the other rule tries to run
./miniperl -Ilib configpm


I've committed changes bf799c6455f928b1043103098647499d1b2e96ff and
486cd780047ff22471c5cbe417911a042ae23962

The former adds a perlmini.o (and perlmini.c) akin to opmini.o and opmini.c

The latter amends patchlevel.h so that git_version.h is only #include""ed for
perl. miniperl builds with canned data equivalent to stock_git_version.h.
git_version.h becomes an explicit dependency for perl.o, make_patchnum.pl is
explicitly run to create it, and no sub-makes are spawned with their inherent
race conditions and consequent strange build failures.

There's now no race. (On Unix)

I don't know how to make the equivalent change to the logic on Win32 and VMS.

As I understand it Win32 already builds all the object files twice, once with
a canned config for miniperl, once with the user's config for perl. Hence
Win32 would need to define PERL_IS_MINIPERL for the former, to make the new
logic work.

VMS appears not to build anything twice, even for op.c. So I think that this
is going to need to be added.


I can't think of a simpler way to do this which doesn't actually end up with
race conditions.

Nicholas Clark

Reply via email to