cmake fails TryCompile test on precise/armel due to incorrect gcc option parsing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
New
|
Medium
|
|||
cmake (Ubuntu) |
Fix Released
|
High
|
Colin Watson | ||
gcc-4.6 (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Here's the relevant build output:
25/193 Test #25: TryCompile .......
Internal cmake changing into directory: /build/
Error: cmake execution failed
The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Configuring
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Configuring
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Configuring
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Configuring
Detecting CXX compiler ABI info - done
Configuring
Configuring
Configuring
Configuring
All Tests passed, ignore all previous output.
Configuring
Compiler supports ansi for
Configuring
Compiler supports ansi for
use the module now
Compiler supports ansi for
Testing try_compile project mode
Configuring
Configuring
Configuring
Configuring
Performing Test C_BUILD_SHOULD_FAIL
Configuring
Performing Test C_BUILD_SHOULD_FAIL - Failed
Performing Test C_BUILD_SHOULD_WORK
Configuring
Performing Test C_BUILD_SHOULD_WORK - Success
Performing Test C_RUN_SHOULD_FAIL
Configuring
Performing Test C_RUN_SHOULD_FAIL - Failed
Performing Test C_RUN_SHOULD_WORK
Configuring
Performing Test C_RUN_SHOULD_WORK - Success
Performing Test CXX_BUILD_
Configuring
Performing Test CXX_BUILD_
Performing Test CXX_BUILD_
Configuring
Performing Test CXX_BUILD_
Performing Test CXX_RUN_SHOULD_FAIL
Configuring
Performing Test CXX_RUN_SHOULD_FAIL - Failed
Performing Test CXX_RUN_SHOULD_WORK
Configuring
Performing Test CXX_RUN_SHOULD_WORK - Success
Performing Test C_BOGUS_FLAG
Configuring
Performing Test C_BOGUS_FLAG - Success
CMake Error at CMakeLists.txt:12 (MESSAGE):
Failing test succeeded:
failed
Call Stack (most recent call first):
CMakeLists.
Performing Test CXX_BOGUS_FLAG
Configuring
Performing Test CXX_BOGUS_FLAG - Success
CMake Error at CMakeLists.txt:12 (MESSAGE):
Failing test succeeded:
failed
Call Stack (most recent call first):
CMakeLists.
Performing Test C_STRICT_PROTOTYPES
Configuring
Performing Test C_STRICT_PROTOTYPES - Success
Configuring
Checking prototype remove for TEST_REMOVE_PROTO - True
Configuring
Configuring incomplete, errors occurred!
I've distilled this down to the following test case:
$ gcc ---
gcc: fatal error: no input files
compilation terminated.
The correct output, on an i386 system with the same version of gcc-4.6 (4.6.2-2ubuntu1), is:
$ gcc ---
gcc: error: unrecognized option ‘---’
gcc: fatal error: no input files
compilation terminated.
So this is a GCC bug. I haven't tracked it down further than that yet.
Related branches
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in gcc-4.6 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Oh, it's also worth mentioning that version 4.6.1-9ubuntu3 in oneiric works fine.