0

I'm trying to use OpenSSL in my project through Cocoapods, but it just keeps failing on some "undefined symbols for arm64". While I know that this question had been asked before; I can't get it to work using the provided solutions. It's really and I mean really frustrating.

I tried the solutions posted in:

All the things I did and the configs:

  • Tried building with the Build Active Architectures for both Debug and Release to YES and tried it with both for NO (in My Project, the Pods project and all the Targets)
  • Tried building with the Valid architectures to arm64 arm7 arm7s and all possible variations you can think of with those three
  • My project has the linker flags and library/framework search paths set to $(inherited)
  • Removed duplicate linker flags or library/framework search paths
  • I have added the Pods-{My Project} lib to My project
  • Re-installed all the pods by:
    • Deleting all installed pods
    • Deleting the Podfile
    • Called pod init
    • Added each pod one step at a time
  • Re-added the target in My Project and did all the steps again

Next to the above list I probably did a lot of other things I cannot even remember through my clouded-vision right now.

Now this is how my project is set up:

I have a main project which builds my framework. Now because I use both SQLCipher and OpenSSL and had the transitive dependencies error, I added a static library target to my project. This static library target has the Cocoapods dependencies for SQLCipher and OpenSSL which enabled me to use use_frameworks for the framework target in my project.

So far so good and everything works fine, but whenever I try to use OpenSSL in my static library it complains about the godforsaken undefined symbols. I can't seem to resolve those.

Does anyone knows what goes wrong? Or are there other/better setups for what I'm trying?

Community
  • 1
  • 1
Gerald Eersteling
  • 1,244
  • 14
  • 28
  • How are you cross-compiling OpenSSL for arm64? Also, be very careful about using other's build systems for OpenSSL. Each OpenSSL configuration gets its own `` and ``. I seem to recall CocoaPods was not doing things it needed to. Also see [Build Multiarch OpenSSL on OS X](http://stackoverflow.com/q/25530429/608639). – jww May 30 '16 at 11:05
  • Hm, I've used the OpenSSL cocoapod (https://cocoapods.org/pods/OpenSSL) and the OpenSSL-for-ios (https://github.com/x2on/OpenSSL-for-iPhone). Are they both 'wrong'? And if so how do I add OpenSSL to My Project then? – Gerald Eersteling May 30 '16 at 11:19
  • I'm guessing they are probably both wrong. I would need to see their `` and `` to be certain. – jww May 30 '16 at 11:22
  • I see, no idea where to get those. Could I bother you in private? – Gerald Eersteling May 30 '16 at 11:33
  • @Ge3.E - I looked at, for example, the OpenSSL 1.0.2 build script at [OpenSSL.podspec](https://github.com/FredericJacobs/OpenSSL-Pod/blob/master/1.0.208/OpenSSL.podspec). *If* that's all they are doing, then its using the same `` and `` for all architectures. I'm fairly certain its wrong. I thought I filed a bug report against them for it some time ago, but I can't locate it. – jww May 30 '16 at 18:20
  • That's probably the source of the problems as well then. What can one do to compile it himself? _Someone_ should be able to create a pod which is compatible with all iOS archs right? – Gerald Eersteling May 31 '16 at 07:25

0 Answers0