[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
Henrik Bach
henrik_bach_llvm at hotmail.com
Thu Jan 27 13:16:59 PST 2005
>From: Jeff Cohen Date: Wed, 26 Jan 2005 19:47:44 -0800
>
>Fixed.
Yes, now it isn't the path.
I've recorded this trace:
-------------------------
llvm[3]: Building Debug Bytecode Archive libc.bca
/bin/rm -f /C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca
/C/projects/build/MinGW/llvm-4-1/Debug/bin/llvm-ar rcsf
/C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca
/C/projects/build/MinGW/llvm-4-1/runtime/GCCLibraries/libc/Debug/atox.bc
/C/projects/build/MinGW/llvm-4-1/runtime/GCCLibraries/libc/Debug/io.bc
/C/projects/build/MinGW/llvm-4-1/runtime/GCCLibraries/libc/Debug/memory.bc
/C/projects/build/MinGW/llvm-4-1/runtime/GCCLibraries/libc/Debug/qsort.bc
/C/projects/build/MinGW/llvm-4-1/runtime/GCCLibraries/libc/Debug/string.bc
c:\projects\build\MinGW\llvm-4-1\Debug\bin\llvm-ar.exe:
c:/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca-000000: Can't destroy
file (hb:2): The process cannot access the file because it is being used by
another process.
make[3]: *** [/C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca] Error 2
-------------------------
Like before, the temporary file libc.bca-000000 doesn't exist when finished.
But libc.bca exists.
I've put debugging text into:
-------------------------
bool
Path::destroyFile() const {
if (!isFile()) return false;
DWORD attr = GetFileAttributes(path.c_str());
// If it doesn't exist, we're done.
if (attr == INVALID_FILE_ATTRIBUTES)
return true;
// Read-only files cannot be deleted on Windows. Must remove the
read-only
// attribute first.
if (attr & FILE_ATTRIBUTE_READONLY) {
if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY))
ThrowError(path + ": Can't destroy file (hb:1): ");
}
if (!DeleteFile(path.c_str()))
ThrowError(path + ": Can't destroy file (hb:2): ");
return true;
}
-------------------------
I've also attached a complete trace for this run.
Any suggestions?
Henrik.
_________________________________________________________________
Del din verden med MSN Spaces http://spaces.msn.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_make_tools-only.zip
Type: application/x-zip-compressed
Size: 4878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050127/8b6e4034/attachment.bin>
More information about the llvm-dev
mailing list