MantisBT - CMake |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0014492 | CMake | CMake | public | 2013-10-17 16:07 | 2014-06-02 08:37 |
|
| Reporter | Nick Hutchinson | |
| Assigned To | Brad King | |
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | |
| Platform | Windows | OS | Windows 7 | OS Version | |
| Product Version | CMake 2.8.12 | |
| Target Version | CMake 2.8.12.1 | Fixed in Version | CMake 2.8.12.1 | |
|
| Summary | 0014492: Visual Studio 2013 breaks parallel command-line builds |
| Description | You get the following error:
fatal error C1041: cannot open program database 'XXXX.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
Adding `add_compile_options(/FS)` to a CMakeLists.txt works around the issue, but CMake should probably add it in by default. Infuriatingly, Microsoft don't appear to have documented this flag on MSDN[1].
1: http://msdn.microsoft.com/en-us/library/vstudio/fwkeyyhe(v=vs.120).aspx [^] |
| Steps To Reproduce | With Ninja and Visual Studio 2013 installed (I tested with the Express edition), open a vcvarsall.bat command prompt, and configure and build any CMake project.
E.g.
> cmake -GNinja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl [PATH_TO_SOURCE_TREE]
> ninja -j2
|
| Additional Information | |
| Tags | No tags attached. |
| Relationships | |
| Attached Files | |
|
| Issue History |
| Date Modified | Username | Field | Change |
| 2013-10-17 16:07 | Nick Hutchinson | New Issue | |
| 2013-10-17 16:14 | Brad King | Note Added: 0034144 | |
| 2013-10-17 16:20 | Brad King | Note Added: 0034145 | |
| 2013-10-17 16:37 | Nick Hutchinson | Note Added: 0034147 | |
| 2013-10-17 16:43 | Brad King | Note Added: 0034148 | |
| 2013-10-18 10:34 | Brad King | Note Added: 0034156 | |
| 2013-10-18 10:34 | Brad King | Assigned To | => Brad King |
| 2013-10-18 10:34 | Brad King | Status | new => assigned |
| 2013-10-18 10:34 | Brad King | Target Version | => CMake 3.0 |
| 2013-10-18 18:05 | Peter Kuemmel | Note Added: 0034169 | |
| 2013-10-21 09:20 | Brad King | Status | assigned => resolved |
| 2013-10-21 09:20 | Brad King | Resolution | open => fixed |
| 2013-10-21 09:20 | Brad King | Fixed in Version | => CMake 3.0 |
| 2013-11-05 07:44 | Brad King | Fixed in Version | CMake 3.0 => CMake 2.8.12.1 |
| 2013-11-05 07:44 | Brad King | Target Version | CMake 3.0 => CMake 2.8.12.1 |
| 2014-06-02 08:37 | Robert Maynard | Note Added: 0036001 | |
| 2014-06-02 08:37 | Robert Maynard | Status | resolved => closed |
|
Notes |
|
|
(0034144)
|
|
Brad King
|
|
2013-10-17 16:14
|
|
According to "cl /?":
/FS force to use MSPDBSRV.EXE |
|
|
|
(0034145)
|
|
Brad King
|
|
2013-10-17 16:20
|
|
|
Is there a "/Fd<something>" option in the generated compile command lines? Does it refer to a directory? |
|
|
|
(0034147)
|
|
Nick Hutchinson
|
|
2013-10-17 16:37
|
|
There is, and it does. Sample error:
FAILED: "C:/opt/cmake/bin/cmcldeps.exe" C y:\the_silver_searcher\third_party\pthread-win32\attr.c "CMakeFiles/pthreadsC2.dir/attr.c.obj.d" CMakeFiles\pthreadsC2.dir\attr.c.obj "Note: including file: " "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe" C:\PROGRA~2\MICROS~2.0\VC\bin\X86_AM~1\cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -Iy:\the_silver_searcher\third_party\pthread-win32\. -DHAVE_PTW32_CONFIG_H -DPTW32_ARCH=\"x64\" -DPTW32_RC_MSC -DPTW32_STATIC_LIB /FoCMakeFiles\pthreadsC2.dir\attr.c.obj /FdCMakeFiles\pthreadsC2.dir/ -c y:\the_silver_searcher\third_party\pthread-win32\attr.c
y:\the_silver_searcher\third_party\pthread-win32\attr.c : fatal error C1041: cannot open program database 'c:\dev\ag-ninja\third_party\build\vendor_pthreads_win32\cmakefiles\pthreadsc2.dir\vc120.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS |
|
|
|
(0034148)
|
|
Brad King
|
|
2013-10-17 16:43
|
|
Thanks.
Interestingly the IDE project files never seem to build /FS even when using /MP, so it must be that "cl /MP" handles the PDB access itself somehow. It is only when some outside party starts multiple "cl" processes with the same /Fd that this happens (i.e. for sources in the same lib or exe). |
|
|
|
(0034156)
|
|
Brad King
|
|
2013-10-18 10:34
|
|
|
|
|
(0034169)
|
|
Peter Kuemmel
|
|
2013-10-18 18:05
|
|
|
|
|
(0036001)
|
|
Robert Maynard
|
|
2014-06-02 08:37
|
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|