Opened 10 years ago
#231 new defect
Dependencies dropped during concurrent builds
Reported by: | Md Abdur Rahim | Owned by: | somebody |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | component1 | Version: | |
Keywords: | Cc: |
Description
I have attached a sample project that builds properly for -j1 but when using -j8 fails to properly generate a header that is needed to build. I confirmed that this problem still exists in svn 86460.
Single thread builds properly:
boost-build/bin/bjam ...found 25 targets... ...updating 16 targets... common.mkdir bin common.mkdir bin\msvc-11.0 common.mkdir bin\msvc-11.0\debug common.mkdir bin\msvc-11.0\debug\link-static compile-c-c++ bin\msvc-11.0\debug\link-static\iop_xfil_reg_intf.obj iop_xfil_reg_intf.c registry.reg_gen bin\msvc-11.0\debug\link-static\reg_pub_prj_gen.h compile-c-c++ bin\msvc-11.0\debug\link-static\utl_c_type_dbg_axf.obj utl_c_type_dbg_axf.c msvc.link bin\msvc-11.0\debug\link-static\utl_.exe msvc.manifest bin\msvc-11.0\debug\link-static\utl_.exe elf_utl.gen_ctype bin\msvc-11.0\debug\link-static\utl_c_type_data_prj_gen.c verify_limits.gen_files bin\msvc-11.0\debug\link-static\app_pub_verify_gen.h compile-c-c++ bin\msvc-11.0\debug\link-static\reg_intf_prj.obj reg_intf_prj.c msvc.archive bin\msvc-11.0\debug\link-static\libtest.lib ...updated 17 targets...
Multiple threads fails to build the autogenerated header:
boost-build/bin/bjam -j8
...found 25 targets... ...updating 16 targets... common.mkdir bin common.mkdir bin\msvc-11.0 common.mkdir bin\msvc-11.0\debug common.mkdir bin\msvc-11.0\debug\link-static registry.reg_gen bin\msvc-11.0\debug\link-static\reg_pub_prj_gen.h compile-c-c++ bin\msvc-11.0\debug\link-static\iop_xfil_reg_intf.obj iop_xfil_reg_intf.c compile-c-c++ bin\msvc-11.0\debug\link-static\utl_c_type_dbg_axf.obj utl_c_type_dbg_axf.c msvc.link bin\msvc-11.0\debug\link-static\utl_.exe msvc.manifest bin\msvc-11.0\debug\link-static\utl_.exe elf_utl.gen_ctype bin\msvc-11.0\debug\link-static\utl_c_type_data_prj_gen.c compile-c-c++ bin\msvc-11.0\debug\link-static\reg_intf_prj.obj reg_intf_prj.c D:\temp\test\bin\msvc-11.0\debug\link-static\reg_prv_intf_prj_gen.h(1) : fatal error C1083: Cannot open include file: 'app_pub_verify_gen.h': No such file or directory
call "C:\Program Files (x86)\microsoft visual studio 11.0\vc\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin\msvc-11.0\debug\link-static\reg_intf_prj.obj.rsp"
...failed compile-c-c++ bin\msvc-11.0\debug\link-static\reg_intf_prj.obj... ...skipped <pbin\msvc-11.0\debug\link-static>libtest.lib for lack of <pbin\msvc-11.0\debug\link-static>reg_intf_prj.obj... ...failed updating 1 target... ...skipped 1 target... ...updated 11 targets...
The attached project is a sample instance of what we are doing on a larger scale in our code base. I have also seen other instances of this manifest themselves when building many variants at the same time with concurrency enabled. What happens in this case, is that the dependency is properly reported in the -d+12 output but for some reason the header needed is sometimes not generated until after the file that depends on it is compiled. Unfortunately, it is hard to provide example of these failures with our entire code base.
Sample project failure