Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dynamic framework fails #72

Closed
appcoders opened this issue Nov 24, 2015 · 6 comments
Closed

Create dynamic framework fails #72

appcoders opened this issue Nov 24, 2015 · 6 comments
Assignees
Labels

Comments

@appcoders
Copy link

➜ OpenSSL-for-iPhone git:(master) ./create-openssl-framework.sh dynamic Creating openssl.framework ld: warning: -macosx_version_min not specified, assuming 10.9 ld: in lib/libcrypto.a(cryptlib.o), building for OSX, but linking in object file built for iOS, for architecture i386 fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: internal link edit command failed Created openssl.framework

@x2on x2on self-assigned this Nov 25, 2015
@x2on x2on added the bug label Nov 25, 2015
@x2on
Copy link
Owner

x2on commented Nov 25, 2015

Works fine here:

$ ./create-openssl-framework.sh 
Creating openssl.framework
Created openssl.framework

What Xcode version have you installed?

x2on added a commit that referenced this issue Nov 25, 2015
Add check for openssl-framework script on Travis. Related #72
@x2on
Copy link
Owner

x2on commented Nov 25, 2015

Ah now i see the problem - if you use ./create-openssl-framework.sh dynamic the error happens.
I will have a look!

x2on added a commit that referenced this issue Nov 25, 2015
Add `ios_version_min` - but doesn't work at the moment (see http://www.openradar.me/22104678)
Related #72
@x2on
Copy link
Owner

x2on commented Nov 25, 2015

So it seems to be a Xcode Bug: http://www.openradar.me/22104678 and http://ww.openradar.appspot.com/23663451

@x2on x2on added Radar and removed bug labels Nov 25, 2015
@nanotech
Copy link

If you remove the rejected -ios_version_min 8.0 flag and add the -v verbose flag to libtool, you can see the ld command it's trying to run:

Removing previous openssl.framework copy
Creating openssl.framework
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -arch_multiple -arch i386 -dylib -dynamic -all_load -force_cpusubtype_ALL -no_arch_warnings -dylib_install_name openssl.framework/openssl -undefined dynamic_lookup lib/libcrypto.a lib/libssl.a -o openssl.framework/openssl.libtool.i386 -final_output openssl.framework/openssl 
ld: warning: -macosx_version_min not specified, assuming 10.10
ld: in lib/libcrypto.a(libcrypto_la-aes_cbc.o), building for OSX, but linking in object file built for iOS, for architecture i386
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: internal link edit command failed

Copying that and calling it for each arch, then combining the outputs with lipo seems to produce a working dynamic framework: nanotech@9409f98

@x2on
Copy link
Owner

x2on commented Apr 29, 2016

Ok could be a workaround - but it could break things for newer Xcode version i think, or?

@x2on
Copy link
Owner

x2on commented Sep 18, 2016

Seems to be fixed by Apple - Xcode 8 the dynamic framework is created.

@x2on x2on closed this as completed Sep 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants