Closed dleehr closed 8 years ago
I found a working build for iOS 9.0 on Sept 16, but I don't know what version exactly I had checked out when I built it:
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/lib/libz.dylib (found version "1.2.5")
-- checking for module 'libssh2'
-- found libssh2, version 1.4.3
-- Looking for libssh2_userauth_publickey_frommemory in ssh2
-- Looking for libssh2_userauth_publickey_frommemory in ssh2 - not found
After some digging, this is certainly related to my homebrew copy of libssh2. When update_libgit2_ios
runs, cmake does not use the locally-built iOS copy of libssh2 - it finds the version I have in /usr/local/opt
I uninstalled libssh2 and re-installed it with homebrew, now update_libgit2_ios
succeeds, but it reports version 1.6.0 and 1.4.3 is the version used by the submodule.
So I suppose the issue here is to update the update_libgit2_ios
build script, but I don't know what to change.
I'll look into this. I'm guessing the new tvOS platform is breaking an assumption in those fragile build scripts
I feel like it's got something to do with this:
https://github.com/libgit2/libgit2/blob/c27b4afcdd80f5a45d7120044bf3d78272181abb/CMakeLists.txt#L279
The PKG_CHECK_MODULES CMake function is for finding pkg-config packages, but the library in External/libssh2-ios/lib
doesn't have a pkgconfig dir or .pc file. The SDK and arch-specific ones in External/libssh2-ios/bin/iphoneos8.1-arm64.sdk/lib/
does.
If there's an easy way to include that path before running CMake, that could help. I just don't know enough about pkg-config or CMake to know how this should fit together.
Ah, I think you're onto something. I'm also seeing libssh2 version 1.6.0 pulled in from homebrew's install.
The update_libgit2_ios
script does have LIBSSH2_INCLUDE_DIRS pointed at the libssh2-ios dir, but perhaps it needs to be pointed to the arch-specific subdir that contains the pkgconfig info.
I just realized that the script/bootstrap
script installs libssh2 onto my mac homebrew, which probably masks this problem most of the time. Some other info:
This has been driving me nuts. Everything I try seems to make no difference. However, I just ran across PKG_CONFIG_USE_CMAKE_PREFIX_PATH
which is making PKG_CHECK_MODULES
actually pay attention to CMAKE_PREFIX_PATH
-- checking for module 'libssh2'
-- found libssh2, version 1.4.3_DEV
-- Looking for libssh2_userauth_publickey_frommemory in ssh2
-- Looking for libssh2_userauth_publickey_frommemory in ssh2 - not found
Fix incoming, then we can deal with the fact that iOS is using a 2 year old version of libssh2.
If its any consolation, this was driving me nuts too. I tried a bunch of stuff and kept running into the same walls. Hoped the fix would be obvious to someone who'd worked with that build script before. Thanks for digging in!
@dleehr Thanks for your research as well!
Would you mind testing out the changes I made in #533? I tested both with libssh2 uninstalled and installed through homebrew and according to the logs it picked up the correct (old) version.
I was trying to build a fresh copy of objective-git and found that the iOS build process can no longer find libssh2.
Steps to reproduce:
In Xcode 7.1, pick ObjectiveGit-iOS for iPhone 6 Simulator and build. Upon completion:
Not sure what caused this to happen, could be Xcode 7 or iOS 9 related. I had a build under iOS 8 SDK that worked fine.