[CMake] CMake fails to use a toolchain to cross-compile
Eduardo Sánchez Muñoz
eduardosanchezmunoz at gmail.com
Sun May 15 09:59:58 EDT 2011
I get the following error when I use a toolchain file to cross-compile with
mingw32:
$ cmake -DCMAKE_TOOLCHAIN_FILE=~/Documentos/mingw32.cmake
-DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32 .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found.
Please set CMAKE_RC_COMPILER to a valid compiler path or name.
-- Check for working C compiler: /usr/bin/i486-mingw32-gcc
CMake Error at /usr/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22
(GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:59
(enable_language)
/usr/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
/usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE)
CMakeLists.txt:2 (PROJECT)
CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: /usr/bin/i486-mingw32-gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52
(MESSAGE):
The C compiler "/usr/bin/i486-mingw32-gcc" is not able to compile a simple
test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (PROJECT)
-- Configuring incomplete, errors occurred!
My toolchain file is:
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER i486-mingw32-gcc)
set(CMAKE_CXX_COMPILER i486-mingw32-g++)
set(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110515/71a5ddb6/attachment.htm>
More information about the CMake
mailing list