MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014577 | CMake | CMake | public | 2013-11-18 03:32 | 2014-10-06 10:32 |
|
Reporter | Soeren Textor | |
Assigned To | Brad King | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | PC | OS | Windows | OS Version | 7 x64 |
Product Version | CMake 2.8.12 | |
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | |
|
Summary | 0014577: Need to map /Fd to ProgramDataBaseFileName in VS 7,8,9 |
Description | Since 2.8.12.0 there is no more
<ProgramDataBaseFileName>/MyBinPath/dev/$(Configuration)/MtuX.pdb</ProgramDataBaseFileName>
inside
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
in the generated visual studio files.
Thus it falls back to the default what is
$(IntDir)vc$(PlatformToolsetVersion).pdb
for VS 2012 and it's not the same... |
Steps To Reproduce | Just build a VS2012 project and open the vcxproj file.
You won't find any and <ProgramDataBaseFileName>.
We added the /Zi compilerflag before (for vs projects) |
Additional Information | - |
Tags | No tags attached. |
Relationships | related to | 0011899 | closed | Brad King | Put compiler's program database files into intermediate directory rather than output one for VS 2005 | related to | 0014062 | closed | Brad King | Setting Compiler and Linker PDB to the same path in Visual Studio is unsupported. | related to | 0014600 | closed | Brad King | Document PDB behavior w.r.t. static libraries | related to | 0014763 | closed | Brad King | Add target properties to specify MS compiler PDB files |
|
Attached Files | 0001-VS-Map-Fd-to-ProgramDataBaseFileName-for-VS-7-8-9-14.patch (1,329) 2013-11-18 11:49 https://public.kitware.com/Bug/file/4953/0001-VS-Map-Fd-to-ProgramDataBaseFileName-for-VS-7-8-9-14.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2013-11-18 03:32 | Soeren Textor | New Issue | |
2013-11-18 08:35 | Brad King | Relationship added | related to 0011899 |
2013-11-18 08:35 | Brad King | Relationship added | related to 0014062 |
2013-11-18 08:36 | Brad King | Note Added: 0034458 | |
2013-11-18 10:37 | Mats Fors | Note Added: 0034464 | |
2013-11-18 10:46 | Mats Fors | Note Edited: 0034464 | bug_revision_view_page.php?bugnote_id=34464#r1316 |
2013-11-18 10:47 | Brad King | Note Added: 0034466 | |
2013-11-18 10:53 | Brad King | Note Added: 0034467 | |
2013-11-18 10:57 | Mats Fors | Note Added: 0034468 | |
2013-11-18 11:28 | Brad King | Note Added: 0034470 | |
2013-11-18 11:49 | Brad King | File Added: 0001-VS-Map-Fd-to-ProgramDataBaseFileName-for-VS-7-8-9-14.patch | |
2013-11-18 11:50 | Brad King | Note Added: 0034473 | |
2013-11-19 04:03 | Soeren Textor | Note Added: 0034476 | |
2013-11-19 08:53 | Brad King | Note Added: 0034478 | |
2013-11-19 08:54 | Brad King | Assigned To | => Brad King |
2013-11-19 08:54 | Brad King | Status | new => resolved |
2013-11-19 08:54 | Brad King | Resolution | open => fixed |
2013-11-19 08:54 | Brad King | Fixed in Version | => CMake 3.0 |
2013-11-19 08:54 | Brad King | Target Version | => CMake 3.0 |
2013-11-19 08:54 | Brad King | Summary | <ProgramDataBaseFileName> tag is missing in VS XXXX vc(x)proj files since 2.8.12.x => Need to map /Fd to ProgramDataBaseFileName in VS 7,8,9 |
2013-11-27 10:31 | Brad King | Relationship added | related to 0014600 |
2014-02-18 09:59 | Brad King | Relationship added | related to 0014763 |
2014-02-26 09:44 | Brad King | Note Added: 0035209 | |
2014-10-06 10:32 | Robert Maynard | Note Added: 0036917 | |
2014-10-06 10:32 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0034458)
|
Brad King
|
2013-11-18 08:36
|
|
|
|
(0034464)
|
Mats Fors
|
2013-11-18 10:37
(edited on: 2013-11-18 10:46) |
|
A use case that has been missed in the discussion about pdb files is that they can be used to contain debug info for a static library. That succinctly is linked into an executable later on. The linker will then use the debug info from the pdb file for the library to build a pdb file for the executable.
Each object file in the library contains an absolute path to its pdb file. The linker will search that path and use that pdb file, if found. Else, if not found, it will look if there is a pdb file, with the name used in the absolute path, in the directory the library resides in.
This worked in cmake until the ProgramDataBaseFileName got decopuled. A remedy would be to allow the compiler /Fd option to set it.
|
|
|
(0034466)
|
Brad King
|
2013-11-18 10:47
|
|
Re 0014577:0034464: I brought static libraries up in 0014062:0032761 and the response was 0014062:0032762. The interaction of pdb files and static libraries has been a source of disagreement and confusion for everyone. The two issues I linked from here are not the only ones. You can follow the issue relationships back further from those linked here. The reporter of 0008060:0014062 was the first to cite actual MS documentation on the issue (and a response from MS), so I went with that recommendation.
If "Each object file in the library contains an absolute path to its pdb file" then why can't the linker collect debug symbols from wherever cl puts them? |
|
|
(0034467)
|
Brad King
|
2013-11-18 10:53
|
|
|
|
(0034468)
|
Mats Fors
|
2013-11-18 10:57
|
|
The absolute path to the pdb file in the object file doesn't necessarily point to the pdb file. Not, if the linkage of the executable is on another host that has another directory structure.
I tried 2.8.12.1 with the studio 2009 generator and I didn't get it to generate the ProgramDataBaseFileName from the /Fd compiler option. Will try one more time tomorrow. |
|
|
(0034470)
|
Brad King
|
2013-11-18 11:28
|
|
Re 0014577:0034468: The /Fd mapping may only work for VS >= 10 (2010). It can be added for older versions if it does not work already. |
|
|
(0034473)
|
Brad King
|
2013-11-18 11:50
|
|
Re 0014577:0034470: Try attached 0001-VS-Map-Fd-to-ProgramDataBaseFileName-for-VS-7-8-9-14.patch to enable the mapping on VS 7, 8, and 9. |
|
|
(0034476)
|
Soeren Textor
|
2013-11-19 04:03
|
|
Thanks @all. The Link explaining the difference between linker and compiler pdb helps a lot. We just switched and are using the linker pdb only. That works fine for us... |
|
|
(0034478)
|
Brad King
|
2013-11-19 08:53
|
|
|
|
(0035209)
|
Brad King
|
2014-02-26 09:44
|
|
See 0014763:0035208 for addition of support for COMPILE_PDB_NAME and COMPILE_PDB_OUTPUT_DIRECTORY properties to configure /Fd. |
|
|
(0036917)
|
Robert Maynard
|
2014-10-06 10:32
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|