Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-08-26 19:19:50

   Hi all.

   This is a reproducible minimal test case that fails when building it
with more than one parallel job, i.e. with option -j2 or higher.

   Just place the the files in some folder and run bjam -j2 to start it.

   The build action for the installed library target (dist) should be
run before the build action for its source (library.dll) completes its

   When you run the build the first time it will fail for sure. On
repeated attempts if you do not clear the previous results it may appear
to pass because it will actually copy the old library.dll instead of the
new one. That should be easy to test by comparing the two files.

   If anyone goes ahead and debugs this - please keep everyone updated
using this thread.

   Hints for anyone debugging this:
     * -d+12 bjam option may be used to get bjam's dependency tree.
     * bjam models its build engine state machine in its make1.c file.
     * it calls the execcmd() function to run an actual command.
     * it calls the execwait() function to wait for the next command to
finish executing.
     * when a command finishes executing the make_closure() function is
     * Boost Build's state machine uses the TARGET structure to model
each built target and uses its asynccnt member to count its dependencies
that are in the process of being built so it does not execute a target's
build action before all of its dependants get built (which obviously
does not work very well :-))

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

int main() {}

lib library : library.cpp : <link>shared ;
explicit library ;

exe executable
#explicit executable ;

install dist
#explicit dist ;

__declspec(dllexport) void f() {}

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at