【问题标题】:PARI/GP and gccPARI/GP 和 gcc
【发布时间】:2012-07-25 10:51:10
【问题描述】:

我正在尝试安装 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 上编译。

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

M;

【问题讨论】:

    标签: build ansi pari


    【解决方案1】:

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

    找线

    $CC $CFLAGS $extraflag -o $exe ansi.c 2>/dev/null && $RUNTEST $exe
    

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

    【讨论】:

    • 感谢您的提示。这个问题是 9 个月前提出的,我不记得我是如何解决的,但如果我再次发现同样的问题,我会回到这个问题。
    【解决方案2】:

    我遇到了同样的问题。这是 Linux Mint 17.1 64 位的解决方案:

    sudo apt-get install gcc libc6-dev libgmp-dev
    

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

    感谢 K.B.有关如何查看问题的提示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 2014-03-10
      • 2014-08-23
      • 1970-01-01
      • 2013-01-25
      • 2021-04-19
      • 1970-01-01
      相关资源
      最近更新 更多