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


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to