On Thu, Sep 16, 2010 at 3:02 AM, Molsen, Hannes <span dir="ltr"><<a href="mailto:Hannes.Molsen@draeger.com">Hannes.Molsen@draeger.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello everyone,<br>
<br>
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).<br>
<br>
Therefore I started with reading the reading and acting as described in the cross-compiler section of the wiki-doc (<a href="http://www.paraview.org/Wiki/CMake_Cross_Compiling" target="_blank">http://www.paraview.org/Wiki/CMake_Cross_Compiling</a>), now having a toolchain file (TC_diab.cmake) and a platform-file (Generic-DCC-PPC603.cmake) which seem to be processed correctly.<br>
I already found out how CMake detects the diab compiler correctly (<a href="http://www.mail-archive.com/cmake@cmake.org/msg20240.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg20240.html</a>) and added the proposed changes to the files <a href="http://CMakeCXXCompilerId.cpp.in" target="_blank">CMakeCXXCompilerId.cpp.in</a> and <a href="http://CMakeCCompilerId.c.in" target="_blank">CMakeCCompilerId.c.in</a>. This worked well and the corresponding output is<br>
<br>
-- The C compiler identification is Diab<br>
-- The CXX compiler identification is Diab<br>
-- Check for working C compiler: D:/CCView/tools/tornado/host/diab/WIN32/bin/dcc.exe<br>
-- Check for working C compiler: D:/CCView/tools/tornado/host/diab/WIN32/bin/dcc.exe -- works<br>
<br>
Same for the CXX compiler.<br>
<br>
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.):<br>
<br>
-- Detecting C compiler ABI info<br>
CMake Error: Could not COPY_FILE.<br>
OutputFile: ''<br>
copyFile: 'D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeDetermineCompilerABI_C.bin'<br>
<br>
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".<br>
<br>
-- Detecting C compiler ABI info - done<br>
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):<br>
file STRINGS file<br>
"D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeDetermineCompilerABI_C.bin"<br>
cannot be read.<br>
Call Stack (most recent call first):<br>
C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71 (CMAKE_DETERMINE_COMPILER_ABI)<br>
CMakeLists.txt:8 (PROJECT)<br>
<br>
As I read (<a href="http://www.cmake.org/pipermail/cmake/2010-May/037118.html" target="_blank">http://www.cmake.org/pipermail/cmake/2010-May/037118.html</a>) 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.<br>
So I wrote myself a batch-file that contains the following lines:<br>
<br>
cd /D "%TOOLS_SNAPSHOT_DIR_UX%\binaries\PPC603diab\rat\%SUBDIR%"<br>
<br>
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%"<br>
<br>
echo = Fixing copy error bug...<br>
cmake --debug-trycompile "%TOOLS_SNAPSHOT_DIR_UX%\rat\%SUBDIR%"<br>
<br>
after that the output is<br>
<br>
[...]<br>
-- Configuring incomplete, errors occurred!<br>
<br>
Fixing copy error bug...<br>
debug trycompile on<br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to: D:/CCView/binaries/PPC603diab/rat/Framework<br>
[...]<br>
<br>
So now my real questions:<br>
<br>
What causes CMake to fail at the COPY_FILE stage?<br>
How can I fix this without having to run CMake a second time with --debug-trycompile?<br>
What am I doing wrong?<br>
<br>
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.<br>
<br>
Thanks in advance<br>
<br>
Hannes Molsen<br>
---<br>
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.<br>
<br>
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.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br><div><br></div><div>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....?</div>
<div><br></div><div>If so, simply delete "<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">%TOOLS_SNAPSHOT_DIR_UX%\binaries\PPC603diab\rat\%SUBDIR%</span>" and try again.</div>
<div><br></div><div>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?</div><div><br></div>