MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0012957 | CMake | CMake | public | 2012-02-12 09:58 | 2012-09-03 16:02 | ||||||||||
Reporter | Andras Lasso | ||||||||||||||
Assigned To | Brad King | ||||||||||||||
Priority | normal | Severity | major | Reproducibility | random | ||||||||||
Status | closed | Resolution | fixed | ||||||||||||
Platform | OS | OS Version | Win7 (64bit) | ||||||||||||
Product Version | CMake 2.8.7 | ||||||||||||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||||||||||||
Summary | 0012957: Compiler tests randomly fail on Win7 | ||||||||||||||
Description | The compiler tests during configure step randomly fail on Windows7. The problems are reprodusible with older CMake versions (CMake 2.8.6, 2.8.5, and 2.8.4 - I haven't tried with any older). The failure may happen in any phase of the process: => change dir: CMake Error at c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "cl" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/lasso/devel/Slicer4-cmake2873/cmcurl-build/CMakeFiles/CMakeTmp => linking (cannot open the exe or pdb): Microsoft (R) Visual Studio Version 9.0.21022.8. Copyright (C) Microsoft Corp. All rights reserved. 1>------ Build started: Project: cmTryCompileExec, Configuration: Debug Win32 ------ 1>Compiling... 1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 1>Copyright (C) Microsoft Corporation. All rights reserved. 1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\" /Fd"C:\Users\lasso\devel\Slicer4-cmake2873\cmcurl-build\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.pdb" /W3 /c /Zi /TC /Zm1000 1> ".\testCCompiler.c" 1>testCCompiler.c 1>Compiling manifest to resources... 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 1>Copyright (C) Microsoft Corporation. All rights reserved. 1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'C:\Users\lasso\devel\Slicer4-cmake2873\cmcurl-build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe' Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec Although it's not an acceptable workaround, I've turned of the antivirus and file indexing features and it seemed to reduce the occurrence of the error, but it kept happening. It seems that if anything runs in parallel on the computer then it increases the chance of error. It happens on several computers (desktop, laptop), in different institutions (it's not likely to be caused by some specific local software or malware infection; it could still be caused by utilities that are commonly found on developer's computers). I think it's the same issue as the one kstrike155 reported in http://cmake.org/Bug/view.php?id=12410. [^] The problem is particularly severe when building complex projects (with several external projects), such as Slicer, because: -several external projects build run in parallel (therefore the chance of failure is high), -tens of projects are built (therefore it is quite likely that one of them fails), and -if there is an error in configuration phase then even a rebuild of the project doesn't solve the problem (because CMakeCache contains the result of some incorrect compiler test). In a superbuild environment the workaround is quite complex: identiy the failed project, delete the CMakeCache.txt of that project, reconfigure the project with superbuild (not by manually running CMake, because then some CMake variables may not be set correctly), rebuild. | ||||||||||||||
Steps To Reproduce | Repeat the following steps many times: 1. Delete the CMakeCache.txt (del cmakecache.txt) 2. Run a cmake to configure a project ("c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" ../cmcurl) Do some other work in parallel to make the failure happen sooner. If there is intensive work in the background then the failure rate is about 10-20%. | ||||||||||||||
Additional Information | |||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | ![]() https://public.kitware.com/Bug/file/4217/16b1a6e4%2B0001-try_compile-Use-random-executable-file-name-12957.patch ![]() https://public.kitware.com/Bug/file/4223/cmCoreTryCompile-2.8.7-rev02.patch ![]() https://public.kitware.com/Bug/file/4224/0002-try_compile-Use-random-executable-file-name-12957.patch | ||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2012-02-12 09:58 | Andras Lasso | New Issue | |||||||||||||
2012-02-12 10:18 | Andras Lasso | Note Added: 0028563 | |||||||||||||
2012-02-13 08:39 | Bill Hoffman | Note Added: 0028567 | |||||||||||||
2012-02-13 09:06 | Brad King | Note Added: 0028570 | |||||||||||||
2012-02-13 10:07 | Brad King | File Added: 16b1a6e4+0001-try_compile-Use-random-executable-file-name-12957.patch | |||||||||||||
2012-02-13 10:09 | Brad King | Note Added: 0028572 | |||||||||||||
2012-02-13 12:43 | Bill Hoffman | Relationship added | related to 0012410 | ||||||||||||
2012-02-14 00:42 | Andras Lasso | Note Added: 0028582 | |||||||||||||
2012-02-15 16:28 | Andras Lasso | Note Added: 0028597 | |||||||||||||
2012-02-15 16:38 | Andras Lasso | Note Added: 0028598 | |||||||||||||
2012-02-15 16:50 | Brad King | Note Added: 0028599 | |||||||||||||
2012-02-15 17:08 | Andras Lasso | Note Edited: 0028597 | bug_revision_view_page.php?bugnote_id=28597#r540 | ||||||||||||
2012-02-15 17:38 | Andras Lasso | Note Added: 0028600 | |||||||||||||
2012-02-15 19:21 | Andras Lasso | Note Added: 0028601 | |||||||||||||
2012-02-16 09:30 | Andras Lasso | File Added: cmCoreTryCompile-2.8.7-rev02.patch | |||||||||||||
2012-02-16 09:42 | Andras Lasso | Note Added: 0028604 | |||||||||||||
2012-02-16 10:15 | Brad King | File Added: 0002-try_compile-Use-random-executable-file-name-12957.patch | |||||||||||||
2012-02-16 10:17 | Brad King | Note Added: 0028606 | |||||||||||||
2012-02-16 10:47 | Andras Lasso | Note Added: 0028607 | |||||||||||||
2012-02-17 10:10 | Andras Lasso | Note Added: 0028614 | |||||||||||||
2012-02-17 11:57 | Brad King | Assigned To | => Brad King | ||||||||||||
2012-02-17 11:57 | Brad King | Status | new => assigned | ||||||||||||
2012-02-17 11:58 | Brad King | Note Added: 0028618 | |||||||||||||
2012-02-17 11:58 | Brad King | Status | assigned => resolved | ||||||||||||
2012-02-17 11:58 | Brad King | Fixed in Version | => CMake 2.8.8 | ||||||||||||
2012-02-17 11:58 | Brad King | Resolution | open => fixed | ||||||||||||
2012-04-19 15:50 | David Cole | Target Version | => CMake 2.8.8 | ||||||||||||
2012-04-23 10:18 | Brad King | Relationship added | related to 0013160 | ||||||||||||
2012-09-03 16:02 | David Cole | Note Added: 0030894 | |||||||||||||
2012-09-03 16:02 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|