[Scons-users] Parallel builds sometimes fails
Russel Winder
russel at winder.org.uk
Fri May 25 11:03:18 EDT 2018
On Fri, 2018-05-25 at 14:48 +0000, mingqian Han wrote:
> Hi all,
>
> I am trying to implement a building infrastructure based on
> Scons. Currently it works nicely when doing a non-parallel build (-
> j1)
> However when I run a parallel build, sometimes it fails.
> The build is mostly C source files, and some of them include a
> specific header file, for example, #include "myheader.h"
> But myheader.h is a generated file from some configuration
> files. I have created a custom SCons builder, put under scons_tools,
> and it generates this file when Scons runs.
> However in parallel build, sometimes some source files get to
> compile before myheader.h is generated, which results in error:
> myheader.h not found.
Sounds to me like some of the source files that depend on this
generated file are not marked in the SCons scripts as being dependent
on it. It sounds like the sequential build is working due to a bit of
luck.
> And sometimes, when my custom SCons builder gets running, it
> reports error, saying that it is unable to access this file because
> other process is using it. In such case, myheader.h is only partially
> generated.
> I know SCons reads all the SConscripts first then decides the
> order of building itself. So is there any way to make the parallel
> build success?
> Thanks all.
>
> Regards,
>
> Rafael
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
--
Russel.
===========================================
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180525/5f78b722/attachment.sig>
More information about the Scons-users
mailing list