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 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_CFLAGS
和openssl_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_CFLAGS
和openssl_LIBS
变量,我应该使用什么值来成功构建?
编辑:重新运行configure
解决了该问题,我认为我第一次遇到某种错误。
通过手动设置CFLAGS
和LDFLAGS
使其运行:
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure
最有用的评论
通过手动设置
CFLAGS
和LDFLAGS
使其运行:CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure