[cmake-developers] Fwd: Bug#691948: cmake: Insists on using non-existent (when cross-compiling) -rdynamic flag
Bill Hoffman
bill.hoffman at kitware.com
Wed Oct 31 12:11:50 EDT 2012
FYI
-------- Original Message --------
Subject: Bug#691948: cmake: Insists on using non-existent (when
cross-compiling) -rdynamic flag
Resent-Date: Wed, 31 Oct 2012 16:09:02 +0000
Resent-From: Sam Morris <sam at robots.org.uk>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-CC: Modestas Vainius <modax at debian.org>
Date: Wed, 31 Oct 2012 16:04:04 +0000
From: Sam Morris <sam at robots.org.uk>
Reply-To: Sam Morris <sam at robots.org.uk>, 691948 at bugs.debian.org
To: Debian Bug Tracking System <submit at bugs.debian.org>
Package: cmake
Version: 2.8.9-1
Severity: important
The -rdynamic flag is being picked up from Platform/Linux-GNU.cmake,
even though CMAKE_SYSTEM_NAME is set to Windows.
Test case:
#!/bin/bash
set -ex
cat > CMakeLists.txt << EOF
cmake_minimum_required (VERSION 2.8)
project (test)
add_executable (test test.c)
EOF
cat > main.c << EOF
int main (void) {}
EOF
mkdir build
cd build
cmake -G 'Unix Makefiles' -DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_C_COMPILER=i686-w64-mingw32-gcc
-DCMAKE_RC_COMPILER=i686-w64-mingw32-windres ..
Output:
-- The C compiler identification is GNU 4.6.3
-- The CXX 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 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-c++
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_RC_COMPILER= i686-w64-mingw32-windres
-- The C compiler identification is GNU 4.6.3
-- The CXX 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:52
(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: /tmp/x/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec793991569/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec793991569.dir/build.make
CMakeFiles/cmTryCompileExec793991569.dir/build
make[1]: Entering directory `/tmp/x/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/tmp/x/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec793991569.dir/testCCompiler.c.obj
/usr/bin/i686-w64-mingw32-gcc -o
CMakeFiles/cmTryCompileExec793991569.dir/testCCompiler.c.obj -c
/tmp/x/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec793991569
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec793991569.dir/link.txt --verbose=1
/usr/bin/i686-w64-mingw32-gcc
CMakeFiles/cmTryCompileExec793991569.dir/testCCompiler.c.obj -o
cmTryCompileExec793991569 -rdynamic
i686-w64-mingw32-gcc: error: unrecognized option ‘-rdynamic’
make[1]: Leaving directory `/tmp/x/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec793991569] Error 1
make: *** [cmTryCompileExec793991569/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (530, 'testing'), (520, 'unstable'), (510, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages cmake depends on:
ii cmake-data 2.8.9-1
ii libarchive12 3.0.4-2
ii libc6 2.13-35
ii libcurl3-gnutls 7.26.0-1
ii libexpat1 2.1.0-1
ii libgcc1 1:4.7.1-7
ii libstdc++6 4.7.1-7
ii libxmlrpc-core-c3 1.16.33-3.2
ii procps 1:3.3.3-2
ii zlib1g 1:1.2.7.dfsg-13
cmake recommends no packages.
Versions of packages cmake suggests:
ii gcc 4:4.7.1-1
ii make 3.81-8.2
-- no debconf information
More information about the cmake-developers
mailing list