2014-03-30 9 views
1

부스트를 컴파일하려고하는데 (다른 라이브러리 설치의 일부로) 내 gcc가 손상되었다고보고합니다. 내가 cmake를 실행할 때cmake로 부스트 컴파일 중 Bash 오류가 발생했습니다.

나는

-- The C compiler identification is unknown 
-- The CXX compiler identification is GNU 4.7.2 
-- Check for working C compiler: /usr/bin/gcc 
-- Check for working C compiler: /usr/bin/gcc -- broken 
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): 
    The C compiler "/usr/bin/gcc" is not able to compile a simple test program. 

    It fails with the following output: 

    Change Dir: /home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp 



    Run Build Command:/usr/bin/make "cmTryCompileExec3895803733/fast" 

    /usr/bin/make -f CMakeFiles/cmTryCompileExec3895803733.dir/build.make 
    CMakeFiles/cmTryCompileExec3895803733.dir/build 

    make[1]: Entering directory 
    `/home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp' 


    /usr/bin/cmake -E cmake_progress_report 
    /home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp/CMakeFiles 
    1 

    Building C object 
    CMakeFiles/cmTryCompileExec3895803733.dir/testCCompiler.c.o 

    /usr/bin/gcc -m64 -O3 -march=native (Default on Linux) -o 
    CMakeFiles/cmTryCompileExec3895803733.dir/testCCompiler.c.o -c 
    /home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp/testCCompiler.c 


    /bin/sh: 1: Syntax error: "(" unexpected 

    make[1]: *** [CMakeFiles/cmTryCompileExec3895803733.dir/testCCompiler.c.o] 
    Error 2 

    make[1]: Leaving directory 
    `/home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp' 


    make: *** [cmTryCompileExec3895803733/fast] Error 2 





    CMake will not be able to correctly generate this project. 
Call Stack (most recent call first): 
    CMakeLists.txt:28 (project) 


-- Configuring incomplete, errors occurred! 

내가 정말 잘못 될 일을 모르는

를 얻을. C에서 제 자신의 cmake 프로젝트를 만들 때 컴파일하는데 문제가 없습니다.

+0

'Boost.CMake'는 건물을 부스트하는 일반적인 방법이 아닙니다. 보통 우리는'Boost.Build' 시스템을 사용합니다. [www.boost.org : 시작하기] (http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html)를 참조하십시오. 또한 컴파일러는 약간 구식입니다. (http://www.gnu.org/software/gcc/releases.html)이 중 어떤 것도 문제는 아니지만 삶을 어렵게 만들 수 있습니다. CMake는 분명히이 줄에 문제가있다 :'/ usr/bin/gcc -m64 -O3 -march = native (Linux에서는 기본값) ... ' – Drop

답변

3

오류는 gcc이 아니지만 /bin/sh에서 발생하지만 실제로 gcc 자체에 문제가 있다는 신호는 없습니다.

/usr/bin/gcc -m64 -O3 -march=native (Default on Linux) -o 
CMakeFiles/cmTryCompileExec3895803733.dir/testCCompiler.c.o -c 
/home/lecopivo/code/bempp-inst/bempp/build/contrib/boost/build/CMakeFiles/CMakeTmp/testCCompiler.c 


/bin/sh: 1: Syntax error: "(" unexpected 

은 당신이 어딘가에 입력 한이 값 (Default on Linux) 뭔가 있습니까?

+0

나는 눈이 멀다. D 고정되어 작동한다. 나는 왜 sh가 잘못되었는지 궁금해했다. – tom

+0

질문을 삭제하려고합니다. 미래의 Google 직원에게는 오해의 소지가 있으며 도움이되지 않을 것입니다. 너 괜찮 니? 나는 그것을 삭제하면 15 포인트를 얻지 못할 것 같아요. – tom

+0

기분이 가장 좋다. 나는 현재 스탠드에있는 질문에서 테이크 어웨이가 초기 값 "C 컴파일러 작동 확인 :/usr/bin/gcc - broken"메시지를 액면가에서 가져 오는 것과는 대조적으로 로그를주의 깊게 읽는 것이 사실이라고 생각합니다. –

관련 문제