|
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)
_______________________________________________ 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 |
|
I have just installed cmake 2.8.7 on ubuntu 11.10 amd64 via a build from source. I am having exactly the same issue. When I ran "make test" there were 4 failures as follows:
25:FindPackageTest 73:Simple_EclipseGenerator 74:Simple_CodeBlocksGenerator 75:Simple_KDevelop3Generator I ran "cmake ." from the FindPackageTest directory and got: Package EnvB should have been [EnvB_DIR-NOTFOUND] but was [/home/MYHOME/cmake-2.8.7/Tests/FindPackageTest/lib/zot-3.1] This was done today. Martin. |
|
In reply to this post by Eduardo Sánchez Muñoz
2011/5/15 Eduardo Sánchez Muñoz <[hidden email]>:
> 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++) which for your case should be something like: SET(CMAKE_RC_COMPILER i486-mingw32-windres) The attached toolchain file may be easier to tailor to you need on several host, just comment/set the appropriate value for "COMPILER_PREFIX" and USER_ROOT_PATH. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- 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 |
|
Thanks very much for the quick reply. I was under the seemingly mistaken
impression that the CMakeRCInformation.cmake module should automatically take care of this. I will try your toolchain file with the suggested ammendments. Cheers, Martin. On Tuesday 17 January 2012 16:14:39 Eric Noulard wrote: > 2011/5/15 Eduardo Sánchez Muñoz <[hidden email]>: > > 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++) > > you lack the definition of CMAKE_RC_COMPILER > which for your case should be something like: > > SET(CMAKE_RC_COMPILER i486-mingw32-windres) > > The attached toolchain file may be easier to tailor to you need on several > host, just comment/set the appropriate value for "COMPILER_PREFIX" > and USER_ROOT_PATH. |
| Powered by Nabble | Edit this page |
