如何使用当前版本,
使用正确版本的依赖项,而不是使用包管理器(如yum,rpm,apt,dpkg),而不是使用共享库,逐个安装GCC(GNU编译器集合)?
典型的开发人员可能希望以典型的方式安装GCC,使用您的包管理器(yum,rpm,apt,dpkg,port,brew等)或按照此处的说明进行操作(http://gcc.gnu.org/wiki/ InstallingGCC).
我的问题是如何一块一块地安装GCC,没有共享库.
GCC取决于:
我从http://www.netgull.com/gcc/releases/gcc-4.5.0/下载了GCC 4.5,但是当我尝试设置/构建时,我收到以下错误:
Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1040> /x/home/prakash_satya/shared_scripts/bin/gcc/gcc-4.5.0/configure CC="gcc -m64" --prefix=/x/home/prakash_satya/shared_scripts/bin/gcc/gcc-4.5.0 --with-gmp-lib=/usr/lib64 --with-mpfr-lib=/usr/lib64 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc -m64
checking for C compiler default output file name... a.out
checking whether …
Run Code Online (Sandbox Code Playgroud) 当我在项目上运行"make"时,我收到此错误:
dyld: Library not loaded: /usr/local/lib/libmpfr.4.dylib
Referenced from: /Users/Petrov/Downloads/mips/bin/../libexec/gcc/mipsel-elf/4.8.1/cc1
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
没有libmpfr.4.dylib
文件/usr/local/lib
,但有libmpfr.6.dylib
.我安装了mpfr 4.0.1.我已经尝试重新安装Xcode和mpfr.
我正在安装gcc 4.5.2,mpc为0.8.2,mpfr为3.1.0,gmp为5.0.2.我已将每个mpc,mpfr和gmp目录复制到gcc-4.5.2目录中(删除版本标记).GCC成功配置.然而,当我运行make时,我得到:
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI.
make[1]: *** [configure-mpc] Error 1
make[1]: leaving directory cross/build/gcc
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)
MPFR位于cross/src/gcc-4.5.2/mpfr.MPFR已经成功构建.有谁知道为什么mpc无法配置?
我认为问题可能部分与MPFR的libs/headers在cross/src/gcc-4.5.2/mpfr/src中有关,而不在cross/src/gcc-4.5.2/mpfr中.我所做的只是提取和复制 - 这是默认的目录结构.
有没有一种简单的方法可以在Windows下使用Visual Studio 2005 构建GMP(GNU多精度算术库,http://gmplib.org)?我试图找到有关自己构建库的信息,但找不到任何真正帮助我的东西.我自己建立图书馆的经验不是很丰富(我已经设法建立了提升,但就是这样).
还是有一个我不知道的稳定(预建)GMP发行版?
MPIR是一个有效的替代方案(http://www.mpir.org)吗?关于GMP网站上的MPIR的评论:对于一些Windows用户来说,这个"愤怒的GMP分叉"可能是真正的GMP的替代品,但他们必须处理大量的反GMP情绪.
编辑: MPFR C++包装页面包含指向Visual Studio的GMP/MPFR解决方案的信息/链接以及编译的gmp/mpfr库:http: //www.holoborodko.com/pavel/mpfr/
我试图在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 …
Run Code Online (Sandbox Code Playgroud) 我正在使用数学库中的sqrt()函数,当我使用-m64构建64位时,我得到了正确的结果但是当我构建32位时,我的行为非常不一致.
例如在64位上
double dx = 0x1.fffffffffffffp+1023;
sqrt(dx); // => 0x1.fffffffffffffp+511
sqrt(0x1.fffffffffffffp+1023);// => 0x1.fffffffffffffp+511
Run Code Online (Sandbox Code Playgroud)
(我相信这是正确的舍入结果,用mpfr验证)
但是在32位相同的输入值上,它表现不同.
double dx = 0x1.fffffffffffffp+1023;
sqrt(dx); // => 0x1.0p+512
sqrt(0x1.fffffffffffffp+1023); // => 0x1.fffffffffffffp+511
Run Code Online (Sandbox Code Playgroud)
当在变量中传递相同的值时,我得到了错误的结果.我在每次调用之前和之后检查了舍入模式,并且所有都设置为舍入到最近.是什么原因?我在64位机器上使用gcc 4.6,-mfpmath=sse
并且-march=pentium
对于x86 和x64两种情况都有选项.
问题非常简单直接,但我找不到文档的答案.如果我有
mpfr_t a, b;
Run Code Online (Sandbox Code Playgroud)
我能做点什么吗
mpfr_add(a, a, b, rnd);
Run Code Online (Sandbox Code Playgroud)
这将计算的总和a
,并b
与存储的结果a
.我不知道这是否会导致别名问题,可能导致结果无效,或者这是否正常.
我的问题很简单...我如何检查我的机器上安装的 GMP 版本?MPFR 怎么样?那么 CamlIDL 呢?
非常感谢
我正在尝试在 mac os X 10.11 上编译需要 boost、GMP 和 MPFR 的 plll 库。
我已经通过自制软件安装了 boost、GMP 和 MPFR,然后我在 plll 中的目录构建中启动了 cmake,但是我得到了那个错误:
By not providing "FindMPFR.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "MPFR", but
CMake did not find one.
Could not find a package configuration file provided by "MPFR" with any of
the following names:
MPFRConfig.cmake
mpfr-config.cmake
Add the installation prefix of "MPFR" to CMAKE_PREFIX_PATH or set
"MPFR_DIR" to a directory containing one of …
Run Code Online (Sandbox Code Playgroud)