Libimobiledevice: OS X EI Capitan构建错误

创建于 2015-11-04  ·  7评论  ·  资料来源: libimobiledevice/libimobiledevice

CCLD libimobiledevice.la
架构x86_64的未定义符号:
从以下位置引用的“ _ERR_remove_thread_state”
idevice.o中的_internal_idevice_deinit
idevice.o中的_idevice_connection_enable_ssl
ld:找不到架构x86_64的符号
铛:错误:链接器命令失败,退出代码为1(使用-v查看调用)
make [1]: ** [libimobiledevice.la]错误1make:* * [install-recursive]错误1

链接步骤发生错误。

OS X question

最有用的评论

通过手动设置CFLAGSLDFLAGS使其运行:
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure

所有7条评论

同样在_OS X 10.11_上执行make ,我现在也得到openssl错误
fatal error: 'openssl/ssl.h' file not found

@deadlyfingers
您可以在_OS X 10.11_上安装openssl,例如brew install openssl 。 头文件将在/usr/local/Cellar/openssl/include/openssl目录中创建。 您可以在/usr/local/include目录中建立链接,使用此命令sudo ln -s /usr/local/Cellar/openssl/include/openssl /usr/local/include/openssl 。 但是关于这些目录,我记不清楚了。 不确定这些是正确的。 您可以使用此命令find /usr/ -name "ssl.h"查找目录。

该问题已解决。 我的openssl版本错误。 我将/usr/local/Cellar/openssl/1.0.2/lib/*/usr/local/lib/ ,然后构建OK。此问题已解决。 我的openssl版本错误。 我将/usr/local/Cellar/openssl/1.0.2/lib/*/usr/local/lib/ ,然后构建OK。

进一步注意,如果您在不寻常的位置安装了OpenSSL,则可以使用openssl_CFLAGSopenssl_LIBS环境变量来修复构建。 不需要奇怪的摆弄...

检查配置输出以获取更多信息:

$ ./configure --help

我使用了openssl_CFLAGS和openssl_LIBS env变量,但是仍然遇到相同的问题,并且也完成了具有相同结果的符号链接。 我从libimobiledevice存储库的新克隆中获得了相同的结果。 我已经成功构建并安装了libplist和libusbmuxd。

brew安装的openssl版本:1.0.2h_1

我在OSX 10.11.5上看到了相同的错误消息:

Undefined symbols for architecture x86_64:
  "_ERR_remove_thread_state", referenced from:
      _internal_idevice_deinit in idevice.o
      _idevice_connection_enable_ssl in idevice.o
ld: symbol(s) not found for architecture x86_64

我也遇到了上面提到的fatal error: 'openssl/ssl.h' file not found错误,我用brew link openssl --force解决了。

对于openssl_CFLAGSopenssl_LIBS变量,我应该使用什么值来成功构建?

编辑:重新运行configure解决了该问题,我认为我第一次遇到某种错误。

通过手动设置CFLAGSLDFLAGS使其运行:
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure

此页面是否有帮助?
0 / 5 - 0 等级