Libimobiledevice: OS X EI Capitan Build Error

Created on 4 Nov 2015  路  7Comments  路  Source: libimobiledevice/libimobiledevice

CCLD libimobiledevice.la
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
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: ** [libimobiledevice.la] Error 1
make: *
* [install-recursive] Error 1

Error occurs on link step.

OS X question

Most helpful comment

got it running by manually setting CFLAGS and LDFLAGS:
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure

All 7 comments

Also when doing make on _OS X 10.11_ I now get openssl error
fatal error: 'openssl/ssl.h' file not found

@deadlyfingers
You can install openssl on _OS X 10.11_ , like brew install openssl. The header files will be created at /usr/local/Cellar/openssl/include/openssl directory. You can make a link at /usr/local/include directory, use this command sudo ln -s /usr/local/Cellar/openssl/include/openssl /usr/local/include/openssl. But about these directories, I don't remember clearly. Not sure these are right. You can use this command find /usr/ -name "ssl.h" to find the directory.

This problem is resolved. My openssl version was error. I link the /usr/local/Cellar/openssl/1.0.2/lib/* to /usr/local/lib/, then build OK.This problem is resolved. My openssl version was error. I link the /usr/local/Cellar/openssl/1.0.2/lib/* to /usr/local/lib/, then build OK.

Further note, if you have OpenSSL installed at unusual locations you can use the openssl_CFLAGS and openssl_LIBS environment variables to fix the build. No weired fiddling needed...

Check the configure output for more information:

$ ./configure --help

I have used the openssl_CFLAGS and openssl_LIBS env variables but still get the same issues, have also done the symbolic link with the same results. I get the same results from fresh clones of the libimobiledevice repo. I have successfully build and installed libplist and libusbmuxd.

openssl version installed by brew: 1.0.2h_1

I see the same error message building on 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

I got the fatal error: 'openssl/ssl.h' file not found error also mentioned above, which I resolved with brew link openssl --force.

What values should I use for openssl_CFLAGS and openssl_LIBS variables to successfully build?

Edit: Re-running configure resolved the issue, I think I had some kind of error the first time.

got it running by manually setting CFLAGS and LDFLAGS:
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure

Was this page helpful?
0 / 5 - 0 ratings

Related issues

plinytheelder picture plinytheelder  路  4Comments

abraunstein picture abraunstein  路  3Comments

iOSShohrab picture iOSShohrab  路  6Comments

alxjandroszlv picture alxjandroszlv  路  3Comments

kloczek picture kloczek  路  4Comments