Discussion:
[Scons-users] Want to Make SCons builder thread-safe
V***@continental-corporation.com
2018-03-15 06:34:43 UTC
Permalink
Hi,

I am having problem with my builder, it call some cross compiler. When I
am calling SCons with single thread thing work fine, but if I open
multi-thread I am getting internal compiler error.
I have multi job(cross compiler) do with SCons, how can I make a builder
thread safe but not the other.

Thanks & Best Regards,
Vishal

Vishal Kumar Singh
Architecture and Integration,
BU Advanced Driver Assistance Systems,
Technical Centre India,
Continental Automotive Components(India) Pvt Ltd.,
9th Floor, Gold Hill Supreme Software Park,
Plot No 21,22,27 & 28, Shantipura Road,
Electronic City, Phase 2, Hosur Road,
Bangalore-560100, INDIA

Office: +91-80-6679-1326
Mobile : +91-9611374420
E-Mail: ***@continental-corporation.com
Hill, Steve (FP COM)
2018-03-15 09:10:46 UTC
Permalink
Hi Vishal,



It sounds as though your issue could be with having multiple instances of the compiler running at the same time. The build system that I maintain has multiple tool chains and we have come across this with a couple of them. We have used two different solutions:



1) Where the tool (a linker in this case) was not invoked a large number of times, we added a SideEffect to the invocation so that SCons will not run multiple instance in parallel but will find other jobs to run instead

2) Where the tool (this time a compiler) was invoked a lot, we had to investigate the root cause and we discovered that the issue was actually with some temporary files created and used by the compiler. These were written to a default directory, so multiple invocations running at the same time would trample on each other. We found the command-line options to explicitly set the directory to use for these files and set that to a different directory for each invocation. This worked around the problem and parallel builds then worked reliably.



HTH,



Steve.



From: Scons-users [mailto:scons-users-***@scons.org] On Behalf Of ***@continental-corporation.com
Sent: 15 March 2018 06:35
To: scons-***@scons.org
Subject: [Scons-users] Want to Make SCons builder thread-safe



Hi,

I am having problem with my builder, it call some cross compiler. When I am calling SCons with single thread thing work fine, but if I open multi-thread I am getting internal compiler error.
I have multi job(cross compiler) do with SCons, how can I make a builder thread safe but not the other.

Thanks & Best Regards,
Vishal

Vishal Kumar Singh
Architecture and Integration,
BU Advanced Driver Assistance Systems,
Technical Centre India,
Continental Automotive Components(India) Pvt Ltd.,
9th Floor, Gold Hill Supreme Software Park,
Plot No 21,22,27 & 28, Shantipura Road,
Electronic City, Phase 2, Hosur Road,
Bangalore-560100, INDIA

Office: +91-80-6679-1326
Mobile : +91-9611374420
E-Mail: ***@continental-corporation.com

Loading...