我在交叉编译 gettext-0.18.2
对于 Windows,但遇到了一些问题。在共享库之一的链接阶段,libtool
给我以下错误消息:
/bin/bash ../libtool --tag=CXX ...
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.
您可以看到完整的构建日志,包括
libtool
命令 here (错误位于页面的最底部)。什么会导致这个错误,它是什么意思?尽管错误消息中有声明,但我似乎无法在文档中找到有关此错误的任何信息。
另外值得注意的是:真正让这件事变得奇怪的是 the build succeeded without error on Ubuntu 12.10 (Quantal) ...但它在当前的 LTS 版本 Ubuntu 12.04 上失败了。
附加:我做了一个调用
libtool
的行的差异在成功的构建和失败的构建之间。差异看起来像这样:显然,命令中省略了 C++ 编译器。这会导致上述错误吗?
最佳答案
啊哈!
结果证明这个问题非常微妙。 mingw-w64 Ubuntu 12.10 (Quantal) 中的软件包列表 g++-mingw-w64 作为依赖项 - 但在 Ubuntu 12.04 (Precise) 中并非如此。所以我需要做的就是指定 g++-mingw-w64
作为构建依赖项。
上述实际错误消息的原因是因为配置脚本找不到交叉编译器工具链的 C++ 编译器:
量子:
checking for g++... i686-w64-mingw32-g++
checking whether the C++ compiler (...) works... yes
精确的:checking for g++... i686-w64-mingw32-g++
checking whether the C++ compiler (...) works... no
关于cross-compiling - 为什么 libtool 会抛出 "unsupported hardcode properties"错误,它们是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11964466/