当运行configure
中cmake-gui
在我的OS X平台,我得到发生以下错误:
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: /usr/bin/gcc-4.0
Check for working C compiler: /usr/bin/gcc-4.0 -- broken
CMake Error at /Applications/CMake 2.8-2.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/usr/bin/gcc-4.0" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: /Users/bill/Desktop/cmake_test/build/CMakeFiles/CMakeTmp
Run Build Command:/opt/local/bin/gmake "cmTryCompileExec/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/Users/bill/Desktop/cmake_test/build/CMakeFiles/CMakeTmp'
"/Applications/CMake 2.8-2.app/Contents/bin/cmake" -E cmake_progress_report
/Users/bill/Desktop/cmake_test/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
/usr/bin/gcc-4.0 -isysroot -o
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
/Users/bill/Desktop/cmake_test/build/CMakeFiles/CMakeTmp/testCCompiler.c
i686-apple-darwin10-gcc-4.0.1:
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o: No such file or
directory
<snip>
通过观察论坛等在互联网上,我已经建立,这可能是与我的PATH变量的事情。 这里是我的分析PATH变量:
! echo $PATH
/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/sw/bin:/sw/sbin:/Applications/MATLAB_R2012a.app/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin
此路径变量最近发生了变化,当我配置的Python,我认为,海湾合作委员会问题,必须在相同的排序时间如雨后春笋般涌现。 出了什么问题我的系统安装这个正在发生?
一些更多的细节。 由指定的构建计划CMAKE_MAKE_PROGRAM
是/opt/local/bin/gmake
。
我还发现,运行时,这些错误仅抛出Configure
中cmake-gui
。 在命令行(运行cmake ..
从构建文件夹),结构精细完成:
! cmake ..
-- The C compiler identification is GNU 4.0.1
-- The CXX compiler identification is GNU 4.2.1
-- 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: /usr/bin/gcc-4.0
-- Check for working C compiler: /usr/bin/gcc-4.0 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
例如见-然而,在使用一些库编译时并不总是成功这个问题,我在这里问 。 因此,我认为有些事情可能仍然在是想错了cmake
过程。