[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 03:02:31 EDT 2010
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.
More information about the CMake
mailing list