View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011460 | CMake | CMake | public | 2010-11-14 08:09 | 2011-04-04 12:00 | ||||
Reporter | Robert Lenhardt | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | CMake 2.8.4 | Fixed in Version | |||||||
Summary | 0011460: VS2010 Generator does not add preprocessor defintions to resource compiler | ||||||||
Description | The VS2010 Generator does not add pp defs to Rescources, unlike the previous VS Generators. This breaks projects which parametrize rc files with the preprocessor. I added a patch which takes the pp defs for the current config and adds them to the rc compiler. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | rcpp.patch [^] (691 bytes) 2010-11-14 08:09 [Show Content]
VSResource.zip [^] (987 bytes) 2010-11-15 15:49 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0023255) David Cole (manager) 2010-11-15 08:12 |
Here's another case where a lack of a test is a contributing factor to the bug going unobserved by CMake developers. If there were a test that added an *.rc file, and the rc file depended on definitions being correct, then the test would fail on Visual Studio 2010 dashboard submissions. |
(0023269) Robert Lenhardt (reporter) 2010-11-15 15:51 |
I added a test which includes an rc file which #errors if definitions are not passed to rc compiler. You can add ADD_TEST(VSResource ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/VSResource" "${CMake_BINARY_DIR}/Tests/VSResource" --build-two-config --build-generator ${CMAKE_TEST_GENERATOR} --build-project VSResource --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --test-command VSResource) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSResource") to Tests/CMakeLists.txt to include it in the Cmake Test Suite. |
(0024303) Bill Hoffman (manager) 2010-12-20 17:31 |
OK, so the test passes with VS2010, however, with VS9 it crashes the linker: 65: 2>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 65: 2>Copyright (C) Microsoft Corporation. All rights reserved. 65: 2>Linking... 65: 2>LINK : C:\Users\hoffman\Work\My Builds\CMake-vside\Tests\VSResource\Debug\VSResource.exe not found or not built by the last incremental link; performing full link 65: 2>Embedding manifest... 65: 2>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 65: 2>Copyright (C) Microsoft Corporation. All rights reserved. 65: 2>LINK : fatal error LNK1000: Internal error during IncrBuildImage 65: 2> Version 9.00.21022.08 65: 2> ExceptionCode = C0000005 65: 2> ExceptionFlags = 00000000 65: 2> ExceptionAddress = 0041FCF7 (003A0000) "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\link.exe" 65: 2> NumberParameters = 00000002 65: 2> ExceptionInformation[ 0] = 00000000 65: 2> ExceptionInformation[ 1] = 00FFD670 65: 2>CONTEXT: 65: 2> Eax = 4003779C Esp = 005FEBFC 65: 2> Ebx = 40008178 Ebp = 005FEC24 65: 2> Ecx = 00FFD670 Esi = 40037624 65: 2> Edx = 005FEC14 Edi = 003AD6C0 65: 2> Eip = 0041FCF7 EFlags = 00010246 65: 2> SegCs = 00000023 SegDs = 0000002B 65: 2> SegSs = 0000002B SegEs = 0000002B 65: 2> SegFs = 00000053 SegGs = 0000002B 65: 2> Dr0 = 00000000 Dr3 = 00000000 65: 2> Dr1 = 00000000 Dr6 = 00000000 65: 2> Dr2 = 00000000 Dr7 = 00000000 65: 2>Build log was saved at "file://c:\Users\hoffman\Work\My [^] Builds\CMake-vside\Tests\VSResource\VSResource.dir\Debug\BuildLog.htm" 65: 2>VSResource - 1 error(s), 0 warning(s) 65: ========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== 1/1 Test 0000065: VSResource .......................***Failed 2.84 sec 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 2.90 sec The following tests FAILED: 65 - VSResource (Failed) Errors while running CTest |
(0024306) Robert Lenhardt (reporter) 2010-12-21 05:02 edited on: 2010-12-21 05:06 |
This is a known (and very annoying) bug in the VS2008 linker with an existing hotix, see http://code.msdn.microsoft.com/KB948127 [^] . You can also try to link again after the crash -- the linker should switch to nonincremental linking. I think the crash has nothing to do with resources or with cmake -- it did show up on a VS2008 installation in a virtual machine in my case, another installation did not show the linker bug. |
(0024308) Bill Hoffman (manager) 2010-12-21 08:34 |
Yes, but I can not go installing the hot fix on all the machines that run cmake dashboards, and anyone that happens to build and run make test. Is there some code way around this problem? It seems hard to believe that any project with a resource will causes the linker to crash if incremental linking is on... |
(0024309) David Cole (manager) 2010-12-21 09:19 |
So if this is a VS9 only crash, then we simply don't run this test on VS9 dashboards. We have plenty of coverage on other versions of VS already. If that's the only thing holding this up, just make the test conditional. |
(0024310) Bill Hoffman (manager) 2010-12-21 09:25 |
It is a good test, and I don't want it to be specific to one vs version. If we had this test from the start this bug would not exist because it would have been implemented the first time. I would really like to add the test with the fix and have it work over all generators. |
(0024317) Robert Lenhardt (reporter) 2010-12-21 18:16 |
I just googled around for VS2008 error LNK1000, it does seem to happen - only on Win 7 64bit versions - only when rebuilding solutions It has nothing to do with resources or cmake. For details see http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/801ba6d7-a284-4b5d-a75b-3652138d6dff [^] . So i think disabling incremental linking for VS2008 on Win7 64bit should be ok for the test. |
(0024318) David Cole (manager) 2010-12-21 18:49 |
Simply unconditionally disabling incremental linking for this one test sounds like the best way forward. As a test, it will always be a clean build anyhow, so incremental linking is somewhat pointless. |
(0024319) Bill Hoffman (manager) 2010-12-21 21:02 |
Sure, I can try that. However, something smells bad about this... I just have a hard time believing that VS 9 is that broken. I have built lots and lots of code with resources and without, and have never seen this.... It is not even re-linking... This is a crash on the first link. |
(0024323) Bill Hoffman (manager) 2010-12-22 15:48 |
OK, I disabled incremental linking for this test and pushed the branch to next. Thanks for the patch and test! |
(0026076) David Cole (manager) 2011-04-04 12:00 |
Closing resolved issues that have not been updated in more than 3 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-11-14 08:09 | Robert Lenhardt | New Issue | |
2010-11-14 08:09 | Robert Lenhardt | File Added: rcpp.patch | |
2010-11-15 08:12 | David Cole | Note Added: 0023255 | |
2010-11-15 15:49 | Robert Lenhardt | File Added: VSResource.zip | |
2010-11-15 15:51 | Robert Lenhardt | Note Added: 0023269 | |
2010-11-15 18:00 | David Cole | Assigned To | => David Cole |
2010-11-15 18:00 | David Cole | Status | new => assigned |
2010-11-15 18:00 | David Cole | Target Version | => CMake 2.8.4 |
2010-12-08 15:30 | Bill Hoffman | Assigned To | David Cole => Bill Hoffman |
2010-12-20 17:31 | Bill Hoffman | Note Added: 0024303 | |
2010-12-21 05:02 | Robert Lenhardt | Note Added: 0024306 | |
2010-12-21 05:06 | Robert Lenhardt | Note Edited: 0024306 | |
2010-12-21 08:34 | Bill Hoffman | Note Added: 0024308 | |
2010-12-21 09:19 | David Cole | Note Added: 0024309 | |
2010-12-21 09:25 | Bill Hoffman | Note Added: 0024310 | |
2010-12-21 18:16 | Robert Lenhardt | Note Added: 0024317 | |
2010-12-21 18:49 | David Cole | Note Added: 0024318 | |
2010-12-21 21:02 | Bill Hoffman | Note Added: 0024319 | |
2010-12-22 15:48 | Bill Hoffman | Note Added: 0024323 | |
2010-12-22 15:48 | Bill Hoffman | Status | assigned => resolved |
2010-12-22 15:48 | Bill Hoffman | Resolution | open => fixed |
2011-01-17 14:33 | David Cole | Relationship added | has duplicate 0011324 |
2011-04-04 12:00 | David Cole | Note Added: 0026076 | |
2011-04-04 12:00 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |