2014-10-06 17 views
3

좋아, 나는 새로운 OS X Yosemite에서 gcc-4.9.2를 빌드하는 데 어려움을 겪고있다. tesseract-3.0.1과 wxWidgets 애플리케이션 중 일부를 제외하고 대부분의 다른 소프트웨어가 잘 컴파일되어 있기 때문에 OS X에서 gnu-gcc 컴파일러를 빌드해야하는지 잘 모르겠습니다. clang이 컴파일 할 수없는 특정 프로그램/코드 기능이 있습니까?OS X에서 GCC-4.9.2 빌드 요세미티

cd build-gcc 
../gcc-4.9.1/configure --program-prefix="gnu-" --prefix="/usr/local/gcc-4.9.1" --with-gmp="/usr/local" --with-mpfr="/usr/local" --with-mpc="/usr/local" CC=clang CXX=clang++ 
make 

내 빌드 경로 및 GCC 소스 경로는 공백을 포함하지 않는, 나는 /usr/local에 GMP, MPFR와 MPC를 설치 한 다음과 같이

내 빌드 단계입니다.

clang++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -Wl,-no_pie -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o i386-c.o darwin-c.o \ 
    cc1-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lmpc -lmpfr -lgmp -L../zlib -lz 
ld: warning: ld: warning: ld: warning: ignoring file libbackend.a, file was built for archive which is not the architecture being linked (x86_64): libbackend.aignoring file libcommon-target.a, file was built for archive which is not the architecture being linked (x86_64): libcommon-target.aignoring file ../libdecnumber/libdecnumber.a, file was built for archive which is not the architecture being linked (x86_64): ../libdecnumber/libdecnumber.a 


ld: warning: ignoring file ../zlib/libz.a, file was built for archive which is not the architecture being linked (x86_64): ../zlib/libz.a 
Undefined symbols for architecture x86_64: 
... (Lots of symbols) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make[3]: *** [cc1] Error 1 
make[2]: *** [all-stage1-gcc] Error 2 
make[1]: *** [stage1-bubble] Error 2 
make: *** [all] Error 2 

구성이 같은 빌드 타입 출력 :

내 빌드 출력은 x86_64-apple-darwin14.0.0를, 그래서 이런 일이 왜 이해가 안 돼요.

도움을 받으려면 미리 감사하십시오.

+0

GCC 4.9.2가 방금 출시되었습니다. 시도해 볼 수도 있습니다. 물론 필요한 모든 의존성이 필요합니다. –

+0

GCC 4.9.2 –

+0

을 사용하면 같은 라이브러리에서 정확히 같은 오류가 발생할 수 있습니다.'configure' 시간에'--with-zlib '이 필요할 수도 있습니다 ... –

답변

0

ranlib/usr/local/bin에 깨졌음을 알았습니다. 아마도 GNU Binutils가 OS X에서 작동하지 않을 수 있습니까? 나는이 문제를 해결하기 위해 수행하는 데 필요한 모든 하였다 :

sudo mv /usr/local/bin/ranlib /usr/local/ranlib_old 

다음 make, 지금은 작업 GCC있다!