我正在尝试安装PARI / GP,在配置步骤中我得到:
$ ./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)
这很奇怪,因为文档说:
"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上编译。
有什么想法吗? 提前谢谢,
米;
答案 0 :(得分:1)
PARI顶层的config / get_cc脚本试图编译测试程序 并且失败了。
寻找
行$CC $CFLAGS $extraflag -o $exe ansi.c 2>/dev/null && $RUNTEST $exe
并删除2> / dev / null。配置现在应该打印出显式错误 来自编译器的消息。他们应该提供一些提示。
答案 1 :(得分:1)
我遇到了同样的问题。这是Linux Mint 17.1 64位的解决方案:
sudo apt-get install gcc libc6-dev libgmp-dev
此命令还会安装GMP库(推荐用于PARI / GP)。
感谢K.B.关于如何看待问题的提示。