首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PARI/GP与gcc

PARI/GP与gcc
EN

Stack Overflow用户
提问于 2012-07-25 18:51:10
回答 2查看 596关注 0票数 0

我正在尝试安装PARI/GP,在配置步骤中我得到:

代码语言:javascript
复制
$ ./Configure
[...]
Looking for the compilers ...
...cc is /usr/bin/cc
...gcc is /usr/local/bin/gcc
GNU compiler version 4.8.0 20120705 (experimental) (GCC)
###
### C compiler does not work. PARI/GP requires an ANSI C compiler! Aborting.
###
### Compiler was: /usr/local/bin/gcc  
$ gcc --version
gcc (GCC) 4.8.0 20120705 (experimental)

这很奇怪,因为文档中说:

代码语言:javascript
复制
"Only ANSI C and C++ compilers are supported.  Choosing the GNU compiler
gcc/g++ enables the inlining of kernel routines (about 20% speedup; if you
use g++, it is a good idea to include the -fpermissive flag).  If you choose
not to use gcc, the C++ version of Pari will be a little faster because of
general inlining, but can be used in library mode only with C++ programs.
We strongly recommand using gcc all the way through."

我也尝试过g++,也得到了同样的结果。

我正在尝试在linux x86_64上编译。

有什么想法吗?提前谢谢你,

M;

EN

回答 2

Stack Overflow用户

发布于 2013-04-05 23:34:44

PARI顶层中的config/get_cc脚本试图编译测试程序,但失败了。

寻找这条线

代码语言:javascript
复制
$CC $CFLAGS $extraflag -o $exe ansi.c 2>/dev/null && $RUNTEST $exe

并删除2>/dev/null。Configure现在应该打印出来自编译器的显式错误消息。它们应该提供一个提示。

票数 1
EN

Stack Overflow用户

发布于 2015-03-11 21:08:31

我也有同样的问题。以下是针对Linux Mint 17.1 64位的解决方案:

代码语言:javascript
复制
sudo apt-get install gcc libc6-dev libgmp-dev

此命令还安装GMP库(建议用于PARI/GP)。

感谢K.B.关于如何看待问题的提示。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11648087

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档