[CMake] problem with mac linker flags
Cochran, Bill
cochranwk at ornl.gov
Wed Dec 22 15:03:08 EST 2010
I was wondering if anyone has seen a problem like this before. It appears cmake is not passing arguments to the linker correctly.
===============
Configuring AMP
===============
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/openmpi-1.3.2-gcc-4.6-debug/bin/mpicc
-- Check for working C compiler: /opt/openmpi-1.3.2-gcc-4.6-debug/bin/mpicc -- broken
CMake Error at /:opt:cmake/CMake 2.8-3.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/opt/openmpi-1.3.2-gcc-4.6-debug/bin/mpicc" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: /Users/zfw/repository/amp/build/debug/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
- Ignored:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
"/:opt:cmake/CMake 2.8-3.app/Contents/bin/cmake" -E cmake_progress_report
/Users/zfw/repository/amp/build/debug/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
/opt/openmpi-1.3.2-gcc-4.6-debug/bin/mpicc -o
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
/Users/zfw/repository/amp/build/debug/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec
"/:opt:cmake/CMake 2.8-3.app/Contents/bin/cmake" -E cmake_link_script
CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/opt/openmpi-1.3.2-gcc-4.6-debug/bin/mpicc -Wl,-search_paths_first
-headerpad_max_install_names
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o cmTryCompileExec
gcc: error: unrecognized option '-h'
make[1]: *** [cmTryCompileExec] Error 1
make: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (PROJECT)
-- Configuring incomplete, errors occurred!
For some reason, the linker flag ?headerpad_max_install_names is not being prefixed with ?Wl,. Any thoughts?
Bill
More information about the CMake
mailing list