[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
Jeff Cohen
jeffc at jolt-lang.org
Thu Jan 27 17:16:03 PST 2005
The mapped files weren't being closed at all; they were only being
unmapped. It's now fixed.
Reid Spencer wrote:
>On Thu, 2005-01-27 at 13:16, Henrik Bach wrote:
>
>
>>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.
>>
>>
>
>Here's what's happening in the archiver. It is creating libc.bca. The
>way it does that is to create a temporary file using the
>Path::createTemporaryFile. The file with the -000000 suffix is the
>temporary file that gets renamed as libc.bca when llvm-ar is finished
>build it. So, I think what is going on is that the file is being renamed
>correctly but Win32/Path.inc is throwing an exception anyway (where the
>error message comes from) and llvm-ar returns error code 2 (which means
>an error exception was generated). We just need to find out why
>Win32/Path.inc is throwing an exception on rename. Possibly the
>temporary file has not been closed at the point of the rename.
>
>See the logic in Archive::writeToDisk in
>lib/Bytecode/Archive/ArchiveWriter.cpp for the details. The logic looks
>correct to me. The Archive file is closed and then renamed.
>
>Reid.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>LLVM Developers mailing list
>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
More information about the llvm-dev
mailing list