【发布时间】:2014-09-10 02:17:38
【问题描述】:
我正在尝试从 FreeBSD 上的源代码编译 CVC4,但我在配置时遇到了问题 - 找不到 GMP,即使共享对象显然位于公共路径中:
$> ls /usr/local/lib | grep gmp
libgmp.a
libgmp.la
libgmp.so
libgmp.so.10
libgmp.so.10.1.3
libgmpxx.a
libgmpxx.la
libgmpxx.so
libgmpxx.so.4
libgmpxx.so.4.3.3
$> echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin: \
/usr/local/bin:/root/bin:/usr/local/lib
...这是./configure的输出:
...
checking how to hardcode library paths into programs... immediate
checking for __gmpz_init in -lgmp... no
configure: error: GNU MP (libgmp) not found, see http://gmplib.org/
在那之后,我做了一点谷歌搜索,找到了an article describing an ABI error that I thought could be related。然后我从源代码编译了 GMP,但仍然没有从配置脚本中找到运气。
什么可能导致此错误?任何创意或帮助将不胜感激。谢谢!
【问题讨论】:
-
PATH 无关紧要。如何查看 config.log 以了解该测试究竟是如何失败的?另外,您的 freebsd 是否配置为在运行时在 /usr/local/lib 中查找库? GMP 是自己安装的还是由 freebsd 的包管理器安装的?
-
尝试“./configure LDFLAGS='-L/usr/local/lib/'
”。如果可行,那么 Marc 可能是正确的,并且 ld 没有正确找到“/usr/local/lib/”或 libgmp.a。如果不是这样,您可能应该提供完整的“./configure”命令和“builds/config.log”文件。 (config.log 文件也可能位于类似“builds/x86_64-unknown-linux-gnu/debug/config.log”的目录中,即架构和配置名称)。您也可以发送电子邮件至 cvc-bugs@cs.nyu.edu,我或其他 CVC4 开发人员可以提出更深入的问题。 -
你们是我的英雄。无论如何,手动添加 /usr/local/lib 不起作用,所以这是我的 configure 和 config.log 文件。非常感谢你们,你们是救生员。配置文件几乎是一兆字节,所以我真的建议你克隆
https://github.com/athanclark/freebsd-cvc4的 repo。谢谢!!! -
configure:16729: checking for __gmpz_init in -lgmp [...] yes这不是同一个错误...现在您缺少 gmpxx,您可以通过 freebsd 以某种方式获得它,或者通过 --enable-cxx 传递给 configure 自己编译 GMP。
标签: freebsd configure gmp abi cvc4