编译GCC4.1.2问题

发布于 2022-09-18 04:50:53 字数 4463 浏览 13 评论 0

在make gcc4.1.2的时候会有下面的错误
fortran/simplify.o: In function `gfc_simplify_spacing':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3569: undefined reference to `mpfr_set_ui_2exp'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3549: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_fraction':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:1147: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_set_exponent':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3300: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_scale':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3131: undefined reference to `mpfr_set_ui_2exp'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3099: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3131: undefined reference to `mpfr_set_ui_2exp'
fortran/simplify.o: In function `gfc_simplify_rrspacing':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:3054: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_exponent':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:1068: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_nearest':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2491: undefined reference to `mpfr_nextbelow'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2491: undefined reference to `mpfr_nextabove'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2499: undefined reference to `mpfr_nextabove'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2500: undefined reference to `mpfr_nextbelow'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2505: undefined reference to `mpfr_nextabove'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2456: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2469: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2491: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2500: undefined reference to `mpfr_nextabove'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2499: undefined reference to `mpfr_nextbelow'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2505: undefined reference to `mpfr_nextbelow'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2505: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2499: undefined reference to `mpfr_set_erangeflag'
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2500: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_modulo':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2400: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o: In function `gfc_simplify_mod':
/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2340: undefined reference to `mpfr_set_erangeflag'
fortran/simplify.o:/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/../.././gcc/fortran/simplify.c:2152: more undefined references to `mpfr_set_erangeflag' follow
collect2: ld returned 1 exit status
make[2]: *** [f951] Error 1
make[2]: Leaving directory `/root/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/root/gcc-4.1.2'
make: *** [all] Error 2

应该怎么解决的。现在一头雾水!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一身软味 2022-09-25 04:50:53

libmpfr-dev

赴月观长安 2022-09-25 04:50:53

没有找到mpfr库,gcc 4.0之后需要安装该库和gmp库,并在configure中使用--with-gmp=... --with-mpfr=...来指定路径。

另外,还可能需要环境变量 LD_LIBRARY_PATH 来指定动态库的位置。

瞎闹 2022-09-25 04:50:53

如果你不用Fortran的话,指定--enable-languages=c(你想的语言),看情况不是mpfc的问题,如果是它的问题的话,configure不会过的。应该是代码中Fortran的问题

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文