The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13855 ====================================================================== Reported By: Andres Gomez Assigned To: ====================================================================== Project: CMake Issue ID: 13855 Category: Modules Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2013-01-17 17:39 EST Last Modified: 2013-01-17 17:39 EST ====================================================================== Summary: Cross compilation with MinGW fails on initial GCC compilation test because mingw doesn't support the -rdynamic linking flag Description: When configuring a simple program with CMake support it fails because CMake is not able to find a C compiler capable of compiling a simple test program.
The error happens because, as we try to crosscompile, the C compiler program found is MinGW (/usr/bin/i686-w64-mingw32-gcc), which doesn't support the Linking "-rdynamic" flag. Steps to Reproduce: $ cmake . debug trycompile on -- The C compiler identification is GNU 4.6.3 -- 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: /home/tanty/swftools-jhbuild.git/checkout.dbg/openjpeg-2.0.0/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec4018385851/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec4018385851.dir/build.make CMakeFiles/cmTryCompileExec4018385851.dir/build make[1]: Entering directory `/home/tanty/swftools-jhbuild.git/checkout.dbg/openjpeg-2.0.0/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/tanty/swftools-jhbuild.git/checkout.dbg/openjpeg-2.0.0/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec4018385851.dir/testCCompiler.c.o /usr/bin/i686-w64-mingw32-gcc -mms-bitfields -march=i686 -I/home/tanty/swftools-jhbuild.git/mingw-target.dbg//include -D_WIN32=1 -D__USE_MINGW_ANSIO_STDIO=1 -DWIN32=1 -DOPJ_STATIC=1 -g -O0 -o CMakeFiles/cmTryCompileExec4018385851.dir/testCCompiler.c.o -c /home/tanty/swftools-jhbuild.git/checkout.dbg/openjpeg-2.0.0/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec4018385851 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4018385851.dir/link.txt --verbose=1 /usr/bin/i686-w64-mingw32-gcc -mms-bitfields -march=i686 -I/home/tanty/swftools-jhbuild.git/mingw-target.dbg//include -D_WIN32=1 -D__USE_MINGW_ANSIO_STDIO=1 -DWIN32=1 -DOPJ_STATIC=1 -g -O0 -L/home/tanty/swftools-jhbuild.git/mingw-target.dbg/lib64 -L/home/tanty/swftools-jhbuild.git/mingw-target.dbg//lib -static CMakeFiles/cmTryCompileExec4018385851.dir/testCCompiler.c.o -o cmTryCompileExec4018385851 -rdynamic i686-w64-mingw32-gcc: error: unrecognized option '-rdynamic' make[1]: *** [cmTryCompileExec4018385851] Error 1 make[1]: Leaving directory `/home/tanty/swftools-jhbuild.git/checkout.dbg/openjpeg-2.0.0/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec4018385851/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:24 (project) -- Configuring incomplete, errors occurred! ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-01-17 17:39 Andres Gomez New Issue ====================================================================== -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
