1

I tried Cocoapod Libssh2-iOS 1.6.0, but got a compile error. It's Xcode 8.2.1. The build of the included openssl stopped with

LD_LIBRARY_PATH=: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="/var/folders/d4/mby6kr4j6y389b213bdyq31w0000gn/T/Libssh2/iPhoneSimulator10.2-i386" -DENGINESDIR="/usr/local/lib/engines-1.1" -Wall -O3 -pthread -D_THREAD_SAFE -D_REENTRANT -fPIC -shared -Wl,-Bsymbolic -Wl,-soname=libcrypto.so.1.1 -o ./libcrypto.so.1.1 -Wl,--whole-archive,--version-script=crypto.map ./libcrypto.a -Wl,--no-whole-archive
clang: warning: argument unused during compilation: '-pthread'
ld: unknown option: -Bsymbolic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_shlib.linux-shared] Error 1
make[1]: *** [libcrypto.so] Error 2
make: *** [all] Error 2

Is this Cocoapod still valid? I am bit confused, the offered project-links are dead. Shall I use the pod libssh2 instead? Is there a libssh that uses the SSL implementation of the security.framework?

jww
  • 97,681
  • 90
  • 411
  • 885
Frank Hintsch
  • 560
  • 8
  • 14
  • `-Bsymbolic` is for shared objects/dynamic libraries. My gut feeling is OpenSSL and SSH should be built with `no-shared` because many iOS versions don't allow dylib's. Would you happen to know why CocoaPods is trying to build an OpenSSL shared object for iOS? Something else that looks unusual is the lack of an `-arch` option to the tools. – jww Feb 11 '17 at 17:10
  • `make[2]` targets `link_shlib.linux-shared` which is wrong for iOS, obviously. This pod seems not to be maintained anymore, but I do not know whom to ask... – Frank Hintsch Feb 12 '17 at 17:56
  • Maybe you can forgo CocoaPods, and have a try with [Compilation and Installation | iOS](https://wiki.openssl.org/index.php/Compilation_and_Installation#iOS) from the OpenSSL wiki. If you want to do the multiarch thing for OpenSSL, then see [Build Multiarch OpenSSL on OS X](http://stackoverflow.com/q/25530429/608639). I don't really know SSH build procedures that well, so I can't comment. – jww Feb 12 '17 at 18:08

0 Answers0