Non*_*one 7 configuration gcc makefile mpfr gmp
我试图在Mac OS 10.5.7上交叉编译GCC.我在安装GMP,MPFR和MPC后使用此命令配置GCC:
../gcc-4.5.0/configure --target=$i586-elf --prefix=/usr/local/cross \
--disable-nls \
--enable-languages=c,c++,fortran,java,objc,obj-c++,treelang,ada \
--without-headers --with-libiconv-prefix=/opt/local --with-gmp=/usr/local \
--with-mpfr=/usr/local --with-mpc=/usr/local
Run Code Online (Sandbox Code Playgroud)
我收到了这个错误:
checking for the correct version of gmp.h... buggy but acceptable
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
Run Code Online (Sandbox Code Playgroud)
为什么GCC可以找到GMP,MPFR和MPC的头部而不是库?
我怀疑问题可能是当您尝试构建64位编译器时库是32位,反之亦然.
我能够在MacOS X 10.6.4建立GCC 4.5.1最近,但我建造和安装的GMP,MPFR和MPC库自己-在/usr/gnu64
我使用的,我安装我自己的利益的东西(非标准位置).我还使用了配置选项:
CC='gcc -m64'
Run Code Online (Sandbox Code Playgroud)
强制64位构建.我在Linux上遇到了类似的问题(加上opt-functions.awk中的正则表达式问题 - 在开放式大括号前用两个反斜杠很容易修复),发现自从我建立起来后,MPFR和MPC库都有更新MacOS X:
自从我写这篇文章以来,我已经改变了我的方法论.我现在所做的是在Mac上安装GNU GCC中记录的.基本上,我获得当前版本的GMP,MPC,MPFR并将其源代码放入GCC源目录,并让GCC为自己编译库.这使得GCC处理定位库.
小智 5
你应该用
--with-gmp=/usr/local/include \
--with-mpfr=/usr/local/include --with-mpc=/usr/local/include
Run Code Online (Sandbox Code Playgroud)
代替
--with-gmp=/usr/local \
--with-mpfr=/usr/local --with-mpc=/usr/local
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
32079 次 |
最近记录: |