[CMake] CMake 2.8.2 with WindRiver diab compiler dcc.exe/dplus.exe on WinXP: CMake Error: Could not COPY_FILE. while detecting compiler ABI
Molsen, Hannes
Hannes.Molsen at draeger.com
Thu Sep 16 08:11:52 EDT 2010
Hi David,
Thanks for your quick reply and the idea. Unfortunately this does not seem to be the reason. I am and have always been logged on as an Administrator. But nevertheless I thought about the permissions idea. Here's what I tried after your reply:
I copied the complete Project structure locally, so ClearCase and whatever system might prohibit access to files is out of reach. The result was the same.
Unfortunately (or fortunately for you, as it's a huge project :-)) the source code is strictly closed. But then I tried to run my tool chain with a fairly simple - what LaTeX users would call it - minimal example as follows in a completely new folder and file path as admin without logging on or off in between:
main.cpp
#include "main.h"
int main(void) {
int result;
result = OUTPUT - 12;
return result;
}
//---EOF
main.h
#ifndef __MAIN_H_
#define __MAIN_H_
#define OUTPUT 12
#endif
//---EOF
I still get the same Error, so I guess it has nothing to do with the source code and with file permissions.
Additionally I ran
attrib -R -A -S -H D:\CCView /S /D
to clear all potentially "dangerous" attributes, without success...
Anyone anymore ideas?
Maybe an explanation what exactly happens during this "FILE_COPY" process?
I think it would be easier to debug if I knew what file fails to be copied from where to where.
Thank you,
Hannes Molsen
________________________________________
From: David Cole [mailto:david.cole at kitware.com]
Sent: Donnerstag, 16. September 2010 13:04
To: Molsen, Hannes
Cc: cmake at cmake.org
Subject: Re: [CMake] CMake 2.8.2 with WindRiver diab compiler dcc.exe/dplus.exe on WinXP: CMake Error: Could not COPY_FILE. while detecting compiler ABI
On Thu, Sep 16, 2010 at 3:02 AM, Molsen, Hannes <Hannes.Molsen at draeger.com> wrote:
Hello everyone,
Currently I am trying to compile a Software for a PowerPC PPC603 running VxWorks. For that I use the Diab-Compilers with mingw32-make on MS Windows XP. The makefiles should be created by CMake MinGW Makefile generator (I use Version 2.8.2).
Therefore I started with reading the reading and acting as described in the cross-compiler section of the wiki-doc (http://www.paraview.org/Wiki/CMake_Cross_Compiling), now having a toolchain file (TC_diab.cmake) and a platform-file (Generic-DCC-PPC603.cmake) which seem to be processed correctly.
I already found out how CMake detects the diab compiler correctly (http://www.mail-archive.com/cmake@cmake.org/msg20240.html) and added the proposed changes to the files CMakeCXXCompilerId.cpp.in and CMakeCCompilerId.c.in. This worked well and the corresponding output is
-- The C compiler identification is Diab
-- The CXX compiler identification is Diab
-- Check for working C compiler: D:/CCView/tools/tornado/host/diab/WIN32/bin/dcc.exe
-- Check for working C compiler: D:/CCView/tools/tornado/host/diab/WIN32/bin/dcc.exe -- works
Same for the CXX compiler.
The problem comes in the next step, where CMake tries to find detect the compiler ABI. In this step CMake seems to try to copy something but does not find it. The output is as follows (CXX resp.):
-- Detecting C compiler ABI info
CMake Error: Could not COPY_FILE.
OutputFile: ''
copyFile: 'D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeDetermineCompilerABI_C.bin'
Unable to find executable for try_compile: tried "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/cmTryCompileExec" and "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec" and "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/Development/cmTryCompileExec".
-- Detecting C compiler ABI info - done
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
file STRINGS file
"D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeDetermineCompilerABI_C.bin"
cannot be read.
Call Stack (most recent call first):
C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:8 (PROJECT)
As I read (http://www.cmake.org/pipermail/cmake/2010-May/037118.html) the problem can be "solved" by adding --debug-trycompile as parameter. This seems to not delete the temporary files and somehow the problem goes away.
So I wrote myself a batch-file that contains the following lines:
cd /D "%TOOLS_SNAPSHOT_DIR_UX%\binaries\PPC603diab\rat\%SUBDIR%"
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%\TC_diab.cmake" "%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%""C:\Program Files\CMake 2.8\bin\cmake.exe" -G "MinGW Makefiles" - DCMAKE_TOOLCHAIN_FILE="%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%\TC_diab.cmake" "%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%"
echo = Fixing copy error bug...
cmake --debug-trycompile "%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%"
after that the output is
[...]
-- Configuring incomplete, errors occurred!
Fixing copy error bug...
debug trycompile on
-- Configuring done
-- Generating done
-- Build files have been written to: D:/CCView/binaries/PPC603diab/rat/Framework
[...]
So now my real questions:
What causes CMake to fail at the COPY_FILE stage?
How can I fix this without having to run CMake a second time with --debug-trycompile?
What am I doing wrong?
I hope and think this problem is not caused by and/or related to the toolchain and platform files, if I'm wrong I can surely provide them.
Thanks in advance
Hannes Molsen
---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.
Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den Absender zurück und löschen Sie die E-mail aus Ihrem System.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Is it possibly a mixed-admin/non-admin file writing / permissions issue...? Did you ever create any of the directory structure as admin, and then write some files into it, but then later come back and do it as non-admin....?
If so, simply delete "%TOOLS_SNAPSHOT_DIR_UX%\binaries\PPC603diab\rat\%SUBDIR%" and try again.
If not, I'm not sure what the problem might be. Is your source code / project available for inspection? Can you point us to it?
More information about the CMake
mailing list