2017-05-03 5 views
1

소스에서 GCC 7.1.0을 빌드하려고합니다. 이것은 처음이 아니며 GCC의 이전 릴리스에서 사용되었습니다.GCC 7 컴파일 : 오류 : C++ 전 처리기 "/ lib/cpp"가 정상 검사에 실패합니다.

../configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 \ 
--prefix=/c/mingw64 --with-sysroot=/c/mingw64 \ 
--with-gmp=/c/mingw64/gmp --with-mpfr=/c/mingw64/mpfr --with-mpc=/c/mingw64/mpc \ 
--with-isl=/c/mingw64/isl \ 
--disable-nls --disable-multilib --disable-libstdcxx-pch --disable-shared \ 
--disable-win32-registry --disable-libstdcxx-debug --disable-libstdcxx-verbose \ 
--with-tune=haswell --enable-lto --enable-checking=release --enable-languages=c,c++ \ 
--enable-libstdcxx-time --enable-threads=win32 --enable-libatomic --enable-fully-dynamic-string 

오류

checking how to run the C++ preprocessor... /lib/cpp 
configure: error: in `/c/mingw64/src/build/gcc': 
configure: error: C++ preprocessor "/lib/cpp" fails sanity check 
See `config.log' for more details. 
make[2]: *** [Makefile:4309: configure-stage2-gcc] Error 1 
make[2]: Leaving directory '/c/mingw64/src/build' 
make[1]: *** [Makefile:20550: stage2-bubble] Error 2 
make[1]: Leaving directory '/c/mingw64/src/build' 
make: *** [Makefile:936: all] Error 2 

전체 config.log : 나는 존재하지 /lib/cpphttps://pastebin.com/raw/mEeJHCuK

참고.

는 좀 Google 검색을했고 포함한 모든 제안 시도 :

  • (CC에 마찬가지로 및 CPP) CXX=/c/mingw/bin/g++
  • /c/mingw/bin/g++gcc-7.1.0/gcc/configure/lib/cpp의 모든 차례 나오는 교체합니다. 준 어떤 :
 
    conftest.c:14:8: error: 'Syntax' does not name a type 
      Syntax error 
      ^

(^ Compiling on a mac: What does it mean if my compiler fails a sanity check?과 유사)

https://gcc.gnu.org/ml/gcc-bugs/2015-10/msg00604.html에 관련된 것 같다 오래된 (중요) 버그,하지만 갱신이 있었다.

+0

여기에서 같은 문제가 발생합니다. 이것은'C++ preprocessor를 실행하는 방법을 검사하는 중 '(config.log의'/ lib/cpp' 실패 몇 줄을보십시오)에 의해 발생합니다. 거기에'limits.h '를 찾을 수 없습니다. – user5434231

답변

0

CPPg++을 가리켜서는 안됩니다. CPP는 C 프리 프로세서, 그래서는 C 프리 프로세서를 가리합니다

CPP=/c/mingw/bin/cpp 

이것은 당신이 연결된 문제에 언급되어있다.

+0

솔루션을 사용했지만 src/gcc/configure에서 "/ lib/cpp"가 "/ c/mingw/bin/cpp"로 바꿔야합니다. 그럼에도 불구하고 게시물을 답변으로 표시하십시오. –

+0

@JohnLondon : 구성 스크립트가 버그가있는 것 같습니다. tbh –