2012-06-13 2 views
1

OS X 10.7.4를 실행하는 MacBook Pro에서 GCC-4.7.0을 빌드하려고합니다.configure : error : GCC 빌드시 GMP 4.2 이상, MPFR 2.3.1+ 및 MPC 0.8.0+가 필요합니다.

:

./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ 

나는 다음과 같은 작업을 시도했습니다이 오류를 제거하는 :이 오류는 다음 줄을 실행 한 후 발생

configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. 

: 그러나,이 같은 오류가 발생하는 것을 계속하고있다

  • homebrew를 사용하여 gmp-5.0.4, mpc-0.21 및 mpfr-3.1.0을 다운로드했습니다. 이 시점에서 나는 GMP, MPC, 그리고 mpfr은 다음 명령의 위치를 ​​가리 키도록 시도 :

    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/  --with-gmp=/usr/local/Cellar/ --with-mpfr=/usr/local/Cellar/ --with-mpc=/usr/local/Cellar/ 
    

    그러나,이 같은 오류가 발생합니다. 그래서 Cellar 디렉토리의 여러 위치에 gcc를 지정하려고 시도했습니다.

    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/ --with-mpfr=/usr/local/Cellar/mpfr --with-mpc=/usr/local/Cellar/mpc/ 
    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/5.0.4/ --with-mpfr=/usr/local/Cellar/mpfr/3.1.0/ --with-mpc=/usr/local/Cellar/mpc/0.21/ 
    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/5.0.4/include/ --with-mpfr=/usr/local/Cellar/mpfr/3.1.0/include/ --with-mpc=/usr/local/Cellar/mpc/0.21/share/ 
    

    결국 모두 동일한 오류가 발생했습니다. 그런 다음 gcc, mpc 및 mpfr 버전을 gcc 오류 메시지 (여기에서 찾을 수 있습니다 : ftp://gcc.gnu.org/pub/gcc/infrastructure/)에서 다운로드했습니다. 소스에서 빌드하고 동일한 구성을 실행 한 후 동일한 문제가 남아 있습니다. 나는이 설치를 시도 구성은 다음과 같습니다

    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ 
    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/ --with-mpfr=/usr/local/ --with-mpc=/usr/local/ 
    ./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/include/ --with-mpfr=/usr/local/include/ --with-mpc=/usr/local/include/ 
    

그럼 내가 명시 적으로 64 비트 모드에서 실행되도록 구성을 설정하지 않은 경우 문제가 될 수 있다고 어딘가에 읽었다. 그래서 나는 'CC = gcc -m64'라는 설정을 추가하여이 모든 설정을 다시 시도했다. 그러나 이것은 아무 것도 바뀌지 않았습니다. 누구든지 아이디어가 있다면 크게 감사 할 것입니다.

답변

4

빌드하고 라이브러리에 제대로 직접 GCC의 구성은 GCC 자체의 소스 트리에 넣을 수있는 방법을 모르는 경우 :

/일부/디렉토리/소스/GCC/[된 libstdC++ | libgomp/구성/...] /some/dir/source/gcc/mpfr/[구성 | ...] /some/dir/source/gcc/mpc/[configure | ...]

버전 번호를 추가하지 않았습니다. 그런 다음 GMP/MPC/MPFR과 관련된 인수없이 GCC 구성을 실행하십시오.

+0

오른쪽. 이것은 효과가있는 것 같습니다. 이상하게도 나는 어제이 화를 시도했다. 건배. – josh

+0

@rubenvb이 도움말을 올바르게 구성했습니다. 그러나 fixincludes는 생성되지 않습니다. 나는 항상 실패하고 있습니다. RHEL 6에서 gcc-4.4.4를 사용하여 gcc-4.5.4를 컴파일하려고합니다. – fedvasu

0

EasyBuild (건물 소프트웨어를 쉽게 만드는 도구)가 도움이 될 수 있습니다. 빌드 할 GCC 버전과 활성화 할 기능을 지정하는 작은 easyconfig 파일이 함께 제공됩니다 (예 : https://github.com/hpcugent/easybuild/blob/master/easybuild/easyconfigs/g/GCC/GCC-4.7.0.eb 참조).

당신이 EasyBuild를 다운로드하고 구성하면, 당신은 단지

$EBHOME/easybuild.sh myGCC.eb 
당신이 EasyBuild 압축을 푼 위치로 설정 EBHOME와

하고, 예를 들어 GCC의 easyconfig의 myGCC.eb 사본을 실행할 수있는 당신을 귀하의 필요에 맞게 수정되었습니다.

이 명령은 GCC, MPFR 및 MPC와 같은 종속성을 동일하게 수행 한 후에 GCC 소스 타볼을 다운로드하여 설치/설치하므로 많은 두통을 덜어줍니다.

EasyBuild에 대한 자세한 내용은 https://github.com/hpcugent/easybuild/wiki을 참조하십시오.

3

저도 같은 문제에 직면 한과 쉽게 해당 개발 패키지 설치함으로써 해결되었다 : GMP-(STABLE), mpfr-(STABLE) 및 libmpc-(STABLE)

  • 이갈
관련 문제