-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows, msvc-14.1] debug-store=database: build fails #269
Comments
AMDG
What problems do you get with /FS? I can replicate
the problem without /FS, but adding cxxflags=/FS
was enough to make it work for me in simple cases.
In Christ,
Steven Watanabe
|
I was packaging up a complete boost install, so if you apply this same logic on a full build of boost you should see the same behavior I described. Adding /FS did not allow me to complete a full boost build with the debug-store=database option. The command line I used is in the description. |
I got a similar issue with both msvc-14.1 and 14.2 (latest versions of Visual Studio 2017 and 2019, Community Edition) and boost 1.70.0 on Windows 10. My first try;
Result: half the boost libraries won't build and you'll get lots of errors:
Next try: add "cflags=/FS" to the arguments of b2 , which gives you
Naturally, I add pch=off to see what happens:
After that the build just stops in the middle of the process. No further diagnostics. I guess all of this should be fairly easy to reproduce but I'd be happy to provide further information if it is of any help. It would be great to have some support for PDBs in boost because the binaries with debug information generated with boost's default /Z7 are insanely large. |
I can reproduce @thebrandre 's issue locally with msvc-14.2, the problem is basically that Boost.Build uses a different pdb name for each .obj that it builds - this includes when building the pch. This seems to "magically" just work in the absence of pch's, but when pch's are present the compiler basically expects you to use the same pdb file for both the pch build, and each obj build which uses it. At least that's what happens if you construct an IDE project using pch's. Looking at the docs, it looks like you could fix this by specifying a directory but not a filename for the pdb - that assumes that each top level target gets it's own directory? As noted above, this breaks building the Math lib with debug-store=database.
It looks like you've hit "windows command line hell" - the command has become too long for the shell to cope with, try building with the |
Good guess! The option "--hash" did the job. So did building directly in D:. To summarize:
|
Thank you for your contributions. Main development of B2 has moved to https://github.com/bfgroup/b2 |
Found: 1.66.0_b1
Adding /FS to cxxflags and linkflags does NOT fix the issue entirely.
{noformat}
c:\Temp\boost\src\boost_1_66_0>b2 toolset=msvc-14.1 address-model=64 link=static threading=multi variant=debug --build-dir=c:\temp\boost\build\static\debug --prefix=c:\temp\boost\install\static\debug --layout=system debug-store=database -q -j5 install
...
compile-c-c++ c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\thread_clock.obj
thread_clock.cpp
libs\chrono\src\thread_clock.cpp: fatal error C1041: cannot open program database 'c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\libboost_chrono.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
cl /Zm800 -nologo @"c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\thread_clock.obj.rsp"
...failed compile-c-c++ c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\thread_clock.obj...
compile-c-c++ c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\process_cpu_clocks.obj
process_cpu_clocks.cpp
libs\chrono\src\process_cpu_clocks.cpp: fatal error C1041: cannot open program database 'c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\libboost_chrono.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
cl /Zm800 -nologo @"c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\process_cpu_clocks.obj.rsp"
...failed compile-c-c++ c:\temp\boost\build\static\debug\boost\bin.v2\libs\chrono\build\msvc-14.1\debug\address-model-64\debug-store-database\link-static\threadapi-win32\threading-multi\process_cpu_clocks.obj...
{noformat}
The build fails as a result.
The text was updated successfully, but these errors were encountered: