View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011503CMake(No Category)public2010-11-24 07:562011-01-12 07:53
Reporterblaudden 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityrandom
StatusclosedResolutionfixed 
PlatformX86_64OSWindowsOS Version7 64bit
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011503: cmake fails to remove non existent file
Descriptioncmake spuriously fails to remove files which it has produced during "try compile" with error "No such file or directory". Since the file does not exist anymore, I think this should be reported as a success to remove the file.
Steps To Reproducecmake -G "Visual Studio 9 2008 Win64"
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected 64-bit platform.
<snip>
-- Looking for sys/types.h
CMake Error: Remove failed on file: C:/club/bzr_mysql-5.1-telco-7.0/1019/mysql-5.1.51-ndb-7.0.21-pb1019/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe: System Error: No such file or directory
Additional InformationLooking in Source/cmCoreTryCompile.cc I see a retry loop which retries the RemoveFile() 5 time with half a second delay. Would suggest that the loop is extended to also check if file still exists.

Maybe something like below?

cmake-2.8.3$ diff -u Source/cmCoreTryCompile.cxx Source/cmCoreTryCompile.cxx.orig
--- Source/cmCoreTryCompile.cxx 2010-11-24 09:55:33.000000000 +0100
+++ Source/cmCoreTryCompile.cxx.orig 2010-11-24 09:54:38.000000000 +0100
@@ -408,7 +408,7 @@
               cmSystemTools::Delay(500);
               if(cmSystemTools::RemoveFile(fullPath.c_str()))
                 {
- removed = FileExists(fullPath.c_str());
+ removed = true;
                 }
               numAttempts++;
               }


TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0024187)
Brad King (manager)
2010-12-15 15:04

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=097294e6 [^]

 Issue History
Date Modified Username Field Change
2010-11-24 07:56 blaudden New Issue
2010-12-15 12:19 David Cole Assigned To => David Cole
2010-12-15 12:19 David Cole Status new => assigned
2010-12-15 15:04 Brad King Assigned To David Cole => Brad King
2010-12-15 15:04 Brad King Note Added: 0024187
2010-12-15 15:04 Brad King Status assigned => closed
2010-12-15 15:04 Brad King Resolution open => fixed
2011-01-12 07:53 David Cole Fixed in Version => CMake 2.8.4
2011-01-12 07:53 David Cole Target Version => CMake 2.8.4
2011-01-12 07:53 David Cole Steps to Reproduce Updated


Copyright © 2000 - 2018 MantisBT Team