View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011584 | CMake | CMake | public | 2010-12-08 12:31 | 2010-12-10 11:29 | ||||
Reporter | Petr Petrov | ||||||||
Assigned To | David Cole | ||||||||
Priority | urgent | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | ||||||
Summary | 0011584: Temporary files overlap in VS2010 generator | ||||||||
Description | I have a big project which works fine with CMake on VS2005, VS2008 and Unix generators. It consists more than 100 executables & dynamic link libraries. It contains a lot of small examples, such as ADD_EXECUTABLE(Example1 main.cpp). In VS2010 I have the following error in the different small examples, such as: CMake does not need to re-run because D:\ProjectName\examples\ReportExample\CMakeFiles\generate.stamp is up-to-date. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: The "CustomBuild" task failed unexpectedly. [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: System.IO.IOException: The process cannot access the file 'C:\Users\petr\AppData\Local\Temp\7bf85b669bd34561b56a1267d38c2645.cmd' because it is being used by another process. [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at System.IO.File.Delete(String path) [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at Microsoft.Build.Utilities.ToolTask.Execute() [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute() [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj] Please note that I am using /m:1 switch for msbuild.exe utility, so, I am using 1 core for building this project. I think that previous or some other project (as part of my big project) used the temporary cmd file (i.e. Temp\7bf85b669bd34561b56a1267d38c2645.cmd) for compiling and the current project is trying to use the exactly same name. Is any work-around for this problem? | ||||||||
Steps To Reproduce | I can not figure-out a small example to reproduce, sorry | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0023803) David Cole (manager) 2010-12-08 13:24 |
A similar issue with multiple custom commands trying to write output to the same log file simultaneuosly was fixed with this commit: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed37fc3ea398b03bbba175ae337f14b6af58daee [^] That change should be in the CMake 2.8.3 release. Since you cannot provide a small reproducible example, can you give us access to your project instead? (Or is it private?) Seems like any large project trying to build in parallel would hit this sort of issue. Do you have targets with same name, but in different directories? Maybe VS10 uses the target name as the base name for its generated *.cmd files, and parallel stuff just won't work with multiple targets having the same name...? |
(0023850) Petr Petrov (reporter) 2010-12-09 13:14 |
Sorry, it is a private project. So, I can not share. >Do you have targets with same name, but in different directories? Maybe VS10 >uses the target name as the base name for its generated *.cmd files, and >parallel stuff just won't work with multiple targets having the same name...? No, all targets are unique. >Seems like any large project trying to build in parallel would hit this sort of issue. I am using msbuild /m:1 option. It specifies that 1 core should be used for compilation. Will be parallel compilation used? |
(0023852) Petr Petrov (reporter) 2010-12-09 14:18 |
Thank you for the advise another strange thing - main project is being compiled twice. |
(0023870) Petr Petrov (reporter) 2010-12-10 11:23 |
I think that I have found a reason of such behavior. I terminated my previous build (by control-c sequence). And the temporary files are from previous build. |
(0023871) David Cole (manager) 2010-12-10 11:29 |
Closing bug. If the only problem here is that Visual Studio leaves junk around when the user hits Ctrl+C to cancel a build... then it is not a problem that CMake can actually solve. Thanks for the udpate. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-12-08 12:31 | Petr Petrov | New Issue | |
2010-12-08 13:24 | David Cole | Note Added: 0023803 | |
2010-12-09 13:14 | Petr Petrov | Note Added: 0023850 | |
2010-12-09 14:18 | Petr Petrov | Note Added: 0023852 | |
2010-12-10 11:23 | Petr Petrov | Note Added: 0023870 | |
2010-12-10 11:28 | David Cole | Assigned To | => David Cole |
2010-12-10 11:28 | David Cole | Status | new => assigned |
2010-12-10 11:29 | David Cole | Note Added: 0023871 | |
2010-12-10 11:29 | David Cole | Status | assigned => closed |
2010-12-10 11:29 | David Cole | Resolution | open => no change required |
2010-12-10 11:29 | David Cole | Fixed in Version | => CMake 2.8.4 |
2010-12-10 11:29 | David Cole | Target Version | => CMake 2.8.4 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |