【发布时间】:2011-10-09 09:46:29
【问题描述】:
我正在尝试交叉编译 gnutls。 Gnutls 依赖于 libnettle。我能够交叉编译 libnettle,但是,在尝试交叉编译 gnutls 时,我在配置过程中遇到错误:
configure: error: Libnettle 2.2 was not found.
我交叉编译的 libnettle 版本是 2.2。
要配置的命令是:
./configure --host=mips --prefix=/home/tom/lib/gnutls-3.0.3 CC=/crosstools/mips-gcc CXX=/crosstools/mips-g++ --enable-shared --with-libnettle-prefix=/home/tom/lib/nettle-2.2
我也试过:
配置 LDFLAGS="-L/home/tom/lib/nettle-2.2" 没有运气。
这些库安装在 /home/tom/lib/nettle-2.2/lib 中。我也试过这个目录。由于某种原因,libnettle 没有被检测到。有谁知道为什么?
【问题讨论】:
-
改用
LFLAGS并查看configure(config.log) 的输出。什么失败了? -
但是 config.log 中有什么?它应该有编译了什么测试程序来检测 libnettle 以及导致它失败的原因。
-
感谢您的回复,亚历克斯。我已经尝试过使用 LFLAGS,但遇到了同样的事情。配置:8351:检查 libnettle 配置:8370:/crosstoolsmips64/bin/mips-gcc -std= gnu99 -o conftest -g -O2 conftest.c -lnettle -lhogweed -lgmp >&5 conftest.c:36:24: nettle /gcm.h:没有这样的文件或目录 conftest.c:在函数
main': conftest.c:40: warning: implicit declaration of functiongcm_set_iv' 配置:8370:$? = 1 配置:失败的程序是:| /* confdefs.h */ configure:8380: result: no configure:8406: error: *** *** Libnettle 2.2 was not found. -
如您所见,它甚至无法编译,因为它找不到标头。也许它不尊重
--with-libnettle-prefix设置或者它不是正确的路径。
标签: linux compilation cross-compiling mips64