[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fix make -j for SWIG bindings

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-12-17 17:43:12 CET

Max Bowsher <maxb1@ukf.net> writes:

> David James wrote:
>> On 12/15/05, Philip Martin <philip@codematters.co.uk> wrote:
>>
>>>A more annoying problem is that the 'make -j4 swig-py' parallel build
>>>is broken, it sometimes fails with
>>>
>>
>> Philip, does the attached patch solve the issue with make -j?

I haven't tried the patch.

>> [[[
>>
>> * build/generator/gen_make.py
>> Ensure that external_runtime.py is only called once. This fixes
>> "make -j", which crashes when multiple instances of
>> external_runtime.py try to create the same files.
>>
>> Found by: philip
>>
>> ]]]
>>
> Ouch! That's kind of inelegant. -0.9
>
> Exactly what is going on here?

external_runtime.py gets invoked three times with exactly the same
arguments because build-outputs.mk has three targets that invoke it
(swig_python_external_runtime.swg, swig_perl_external_runtime.swg,
swig_ruby_external_runtime.swg) and the swig-headers target depends on
all three.

That's a bit odd, and changing the timing by only invoking it once may
make the problem go away (or it may make the problem worse :), but I
don't think it's the real cause of the problem.

> Surely it is a bug in 'make -j' if it executes the same make stages in
> multiple threads of control?

Usually 'make -j' bugs are caused by missing dependencies. In this
case I suspect that the svn_client.c generated by swig from
svn_client.i should have a dependency on swig-headers.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 17 17:44:31 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.