cmake -DCMAKE_TOOLCHAIN_FILE=build_files/tolchain-mingw.cmake -DSDL_LIBRARY=/usr/i686-w64-mingw32/lib/libSDL2.dll.a -DSDL_INCLUDE_DIR=/usr/i686-w64-mingw32/include/SDL2 -DSDLMAIN_LIBRARY=/usr/i686-w64-mingw32/lib/libSDL2main.a -DSDLMIXER_INCLUDE_DIR=/usr/i686-w64-mingw32/include/SDL2 -DSDLMIXER_LIBRARY=/usr/i686-w64-mingw32/lib/libSDL2_mixer.dll.a -DWITH_MOVIES=Off -DWITH_FREETYPE2=Off -DWITH_LUAJIT=On -DLUA_INCLUDE_DIR=/usr/i686-w64-mingw32/includ
e/luajit-2.0 -DLUA_LIBRARY=/usr/i686-w64-mingw32/lib/libluajit.a
-- The C compiler identification is GNU 4.9.1-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/i686-w64-mingw32-gcc" is not able to compile a
simple test program.
It fails with the following output:
Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec1141899754/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1141899754.dir/build.make
CMakeFiles/cmTryCompileExec1141899754.dir/build
make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o
/usr/bin/i686-w64-mingw32-gcc -o
CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o -c
/root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec1141899754
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec1141899754.dir/link.txt --verbose=1
/usr/bin/i686-w64-mingw32-gcc
CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o -o
cmTryCompileExec1141899754 -rdynamic
i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic'
CMakeFiles/cmTryCompileExec1141899754.dir/build.make:91: recipe for target
'cmTryCompileExec1141899754' failed
make[1]: *** [cmTryCompileExec1141899754] Error 1
make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec1141899754/fast' failed
make: *** [cmTryCompileExec1141899754/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:16 (PROJECT)
-- Configuring incomplete, errors occurred!
See also "/root/CorsixTH/CMakeFiles/CMakeOutput.log".
See also "/root/CorsixTH/CMakeFiles/CMakeError.log".
CMakeError.log:
Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec959506174/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec959506174.dir/build.make CMakeFiles/cmTryCompileExec959506174.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec959506174.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec959506174.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec959506174 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec959506174.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec959506174.dir/testCCompiler.c.o -o cmTryCompileExec959506174 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec959506174.dir/build.make:91: recipe for target 'cmTryCompileExec959506174' failed make[1]: *** [cmTryCompileExec959506174] Error 1 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec959506174/fast' failed make: *** [cmTryCompileExec959506174/fast] Error 2 Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec3694010872/fast" make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTryCompileExec3694010872.dir/build.make CMakeFiles/cmTryCompileExec3694010872.dir/build make[2]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3694010872.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec3694010872.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec3694010872 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3694010872.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec3694010872.dir/testCCompiler.c.o -o cmTryCompileExec3694010872 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec3694010872.dir/build.make:91: recipe for target 'cmTryCompileExec3694010872' failed make[2]: *** [cmTryCompileExec3694010872] Error 1 make[2]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec3694010872/fast' failed make[1]: *** [cmTryCompileExec3694010872/fast] Error 2 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec3513947514/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec3513947514.dir/build.make CMakeFiles/cmTryCompileExec3513947514.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3513947514.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec3513947514.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec3513947514 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3513947514.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec3513947514.dir/testCCompiler.c.o -o cmTryCompileExec3513947514 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec3513947514.dir/build.make:91: recipe for target 'cmTryCompileExec3513947514' failed make[1]: *** [cmTryCompileExec3513947514] Error 1 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec3513947514/fast' failed make: *** [cmTryCompileExec3513947514/fast] Error 2 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/i686-w64-mingw32-g++ Build flags: Id flags: The output was: No such file or directory Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/i686-w64-mingw32-g++ Build flags: Id flags: -c The output was: No such file or directory Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec177171381/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec177171381.dir/build.make CMakeFiles/cmTryCompileExec177171381.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec177171381.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec177171381.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec177171381 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec177171381.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec177171381.dir/testCCompiler.c.o -o cmTryCompileExec177171381 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec177171381.dir/build.make:91: recipe for target 'cmTryCompileExec177171381' failed make[1]: *** [cmTryCompileExec177171381] Error 1 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec177171381/fast' failed make: *** [cmTryCompileExec177171381/fast] Error 2 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/i686-w64-mingw32-g++ Build flags: Id flags: The output was: No such file or directory Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/i686-w64-mingw32-g++ Build flags: Id flags: -c The output was: No such file or directory Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec712858266/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec712858266.dir/build.make CMakeFiles/cmTryCompileExec712858266.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec712858266.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec712858266.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec712858266 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec712858266.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec712858266.dir/testCCompiler.c.o -o cmTryCompileExec712858266 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec712858266.dir/build.make:91: recipe for target 'cmTryCompileExec712858266' failed make[1]: *** [cmTryCompileExec712858266] Error 1 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec712858266/fast' failed make: *** [cmTryCompileExec712858266/fast] Error 2 Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec1333037816/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec1333037816.dir/build.make CMakeFiles/cmTryCompileExec1333037816.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1333037816.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec1333037816.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec1333037816 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1333037816.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec1333037816.dir/testCCompiler.c.o -o cmTryCompileExec1333037816 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec1333037816.dir/build.make:91: recipe for target 'cmTryCompileExec1333037816' failed make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' make[1]: *** [cmTryCompileExec1333037816] Error 1 Makefile:117: recipe for target 'cmTryCompileExec1333037816/fast' failed make: *** [cmTryCompileExec1333037816/fast] Error 2 Determining if the C compiler works failed with the following output: Change Dir: /root/CorsixTH/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec1141899754/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec1141899754.dir/build.make CMakeFiles/cmTryCompileExec1141899754.dir/build make[1]: Entering directory '/root/CorsixTH/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/CorsixTH/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -o CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o -c /root/CorsixTH/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec1141899754 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1141899754.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc CMakeFiles/cmTryCompileExec1141899754.dir/testCCompiler.c.o -o cmTryCompileExec1141899754 -rdynamic i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic' CMakeFiles/cmTryCompileExec1141899754.dir/build.make:91: recipe for target 'cmTryCompileExec1141899754' failed make[1]: *** [cmTryCompileExec1141899754] Error 1 make[1]: Leaving directory '/root/CorsixTH/CMakeFiles/CMakeTmp' Makefile:117: recipe for target 'cmTryCompileExec1141899754/fast' failed make: *** [cmTryCompileExec1141899754/fast] Error 2
Hi, I was trying to compile CorsixTH (024ea8a5053f38e5097439e0cf81a2bcc2432590) on Ubuntu Utopic (14.10) and CMake was complaining that my compiler was broken, I tried reinstalling it but that didn't help.
I am using this command to configure CMake.
cmake -DCMAKE_TOOLCHAIN_FILE=build_files/tolchain-mingw.cmake -DSDL_LIBRARY=/usr/i686-w64-mingw32/lib/libSDL2.dll.a -DSDL_INCLUDE_DIR=/usr/i686-w64-mingw32/include/SDL2 -DSDLMAIN_LIBRARY=
< span style="color: #080;" class="styled-by-prettify">/usr/
...
--