[Scons-users] Problems with SCons parallel build
Evan Driscoll
driscoll at cs.wisc.edu
Fri Mar 21 17:56:46 EDT 2014
On 2014-03-21 16:50, Brady Johnson wrote:
> I commented out all the cd's from the Command() builders, and its
> still failing.
>
> Something else that I just considered: I build several RPMs by
> calling os.system('rpmbuild...') directly instead of calling the
> SCons rpm builder. I wonder if rpmbuild changes directories,
> subsequently changing it for the SCons process. Anybody know if this
> could cause problems?
A child process can't change the directory of the parent (or, maybe
there's a way if you try really hard and jump through hoops or
something). That shouldn't be the cause.
One thought you could try: change env['ENV']['PATH'] so that
x86_64-dx-linux-gnu-g++ is a script you write that outputs the current
directory before running. Would at least tell you if this is a wild
goose chase. :-)
Evan
>
> Thanks,
>
> Brady
>
> On Fri, Mar 21, 2014 at 10:30 PM, Brady Johnson
> <bradyallenjohnson at gmail.com> wrote:
>
>> The only cd in the entire project is in the aforementioned call to
>> Command(), chdir isn't used anywhere, neither via os nor via
>> builders.
>>
>> Regards,
>>
>> Brady
>>
>> On Mar 21, 2014 10:26 PM, "Evan Driscoll" <driscoll at cs.wisc.edu>
>> wrote:
>> On 2014-03-21 16:04, Gary Oberbrunner wrote:
>> "cd" in a command is OK, since that runs in a subprocess. But a
>> python chdir() would be very bad, since the whole process has only
>> one
>> current dir, so you're changing it for all threads if you do that.
>>
>> Don't forget chdir arguments to builders too.
>>
>> In other words, when using a parallel build:
>>
>> 1) Command("cd blah && whatever") is OK
>> 2) AnyBuilder(..., chdir=1) or AnyBuilder(..., chdir='blah') is NOT
>> 3) os.chdir() from a Python function called by a builder is NOT
>>
>> Evan
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users [1]
>
>
>
> Links:
> ------
> [1] http://four.pairlist.net/mailman/listinfo/scons-users
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list