Subject: Re: [Boost-build] Issue running bjam with multiple jobs and custom code generator
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-11-07 14:11:15
On 11/04/2016 10:27 AM, Christophe B. wrote:
> I developed a protoc.jam (see attachment) allowing to invoke an external
> code generator tool (protoc from protobuf library). The tool generates
> c++ unit files X.pb.h X.pb.cc from a source X.proto.
> When I run bjam -j1 from scratch everything works like a charm.
> When I run bjam -j6 from scratch, I get compilation issues complaining
> that the generated X.pb.h file is missing, because the compiler compiles
> other cpp units in parallel before protoc has fully finished.
> Why it does work correctly with one job and not with multiple jobs
> remains a mystery to me. I would expect that bjam detects the
> dependencies of cpp units with the generated X.pb.h file and waits for
> its generation before starting compilation of depending cpp units.
Are you using an up-to-date bjam? I just remembered
that in the past there were some bugs with actions
that create multiple targets which would cause some
targets to be updated prematurely.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk