On Thursday 16 September 2010, Molsen, Hannes 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/CMakeDetermineCompi >lerABI_C.bin' > > Unable to find executable for try_compile: tried > > "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/cmTryComp >ileExec" and > > "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/Debug/cmT >ryCompileExec" and > > "D:/CCView/binaries/PPC603diab/rat/Framework/CMakeFiles/CMakeTmp/Developme >nt/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/CMakeDetermineCompi >lerABI_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?
This comes from Sources/cmCoreTryCompile.cxx, there FindOutputFile() apparently was not successful in finding the linked executable. The value of CMAKE_EXECUTABLE_SUFFIX is used there. You need a valid setpu for creating executable, i.e. the suffix must be set and also the CMAKE_C/CXX_LINK_EXECUTABLE variables must be set properly. Can you please post the CMakeOutput.log and CMakeError.log from when that happens ? You may also dig into the code and check what's going wrong :-) Alex _______________________________________________ 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