MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0008258 | CMake | CMake | public | 2008-12-08 13:59 | 2016-06-10 14:30 |
| Reporter | James Bigler | ||||
| Assigned To | Bill Hoffman | ||||
| Priority | normal | Severity | minor | Reproducibility | random |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | CMake-2-6 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0008258: Race condition in certain parallel builds in VS | ||||
| Description | 2.6.3R5 behaving a little strangely on one of my test projects. I have a program that generates cpp files from some input file. My program also outputs a dependency file which I parse into a CMake readable format. The basic setup creates a cmake script using configure_file with all the commands to build my cpp and dependency files. A custom target executes the cmake script during build. Also during configuration the dependency file that was generated by the build tool is included into CMake to define source level dependencies. I'm using VS 2005 32/64 on WinXP 64. VS is set to build projects in parallel. In 2.6.2, this problem doesn't appear. In 2.6.3R5, if I hit rebuild some of the tools would start to complain about missing files as CMake starts to regenerate stuff in the middle of the build (or end of the project compilation). This only happens sometimes. If I do a clean followed by a build it works just fine. This is output from a project that completed successfully: Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.tx CMake is re-running because build system is out-of-date. -- Configuring done -- Generating done -- Build files have been written to: C:/code/CMake-cuda-staging/build-64 Compiling... Output from a project that failed Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt CMake is re-running because build system is out-of-date. CMake Error: Could not open file for write in copy operation C:/code/CMake-cuda-staging/build-64/src/cuda/test_generated_test_bin.cu.cpp.cmake.tmp CMake Error: : System Error: Invalid argument CMake Error at CMake/cuda/FindCUDA.cmake:609 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMake/cuda/FindCUDA.cmake:685 (CUDA_add_custom_commands) src/CMakeLists.txt:21 (CUDA_ADD_EXECUTABLE) CMake Error: Could not open file for write in copy operation C:/code/CMake-cuda-staging/build-64/src/cuda/cuda_compile_generated_test_bin.cu.cpp.cmake.tmp CMake Error: : System Error: Invalid argument CMake Error at CMake/cuda/FindCUDA.cmake:609 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMake/cuda/FindCUDA.cmake:709 (CUDA_add_custom_commands) src/CMakeLists.txt:44 (CUDA_COMPILE) -- Configuring incomplete, errors occurred! Project : error PRJ0019: A tool returned an error code from "Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt" Another: Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt CMake is re-running because build system is out-of-date. -- Configuring done CMake Error: Unable to open check cache file for write. C:/code/CMake-cuda-staging/build-64/CMakeFiles/cmake.check_cache Project : error PRJ0019: A tool returned an error code from "Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt" Another: Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt CMake is re-running because build system is out-of-date. -- Configuring done -- Generating done CMake Error: Cannot open file for write: C:/code/CMake-cuda-staging/build-64/Cuda-project.sln.tmp CMake Error: : System Error: Invalid argument -- Build files have been written to: C:/code/CMake-cuda-staging/build-64 Project : error PRJ0019: A tool returned an error code from "Building Custom Rule C:/code/CMake-cuda-staging/src/CMakeLists.txt" I'm guessing there is a race condition involving the cmake state that wasn't there with the last release. Also, I'm guessing that VS executes clean along the way (instead of upfront with a clean command followed by a build) while building and causes problems. I can share the project I'm working on, but you would need a NVIDIA card that supports CUDA and the CUDA toolkit. | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/1908/diffs.tar.gz | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2008-12-08 13:59 | James Bigler | New Issue | |||
| 2008-12-08 14:54 | Bill Hoffman | Note Added: 0014308 | |||
| 2008-12-08 15:52 | James Bigler | Note Added: 0014310 | |||
| 2008-12-08 15:57 | Bill Hoffman | Note Added: 0014311 | |||
| 2008-12-08 15:57 | Bill Hoffman | Status | new => assigned | ||
| 2008-12-08 15:57 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
| 2008-12-08 16:45 | James Bigler | File Added: diffs.tar.gz | |||
| 2008-12-08 16:46 | James Bigler | Note Added: 0014312 | |||
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041477 | |||
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||