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

Consider linking OpenSSL as dynamic framework in PodSpec #128

Closed
vixentael opened this issue Aug 24, 2016 · 7 comments
Closed

Consider linking OpenSSL as dynamic framework in PodSpec #128

vixentael opened this issue Aug 24, 2016 · 7 comments
Assignees

Comments

@vixentael
Copy link
Contributor

Continue of issue #127.

Let's move from compiled OpenSSl as static lib to dynamic framework.

See comments
#127 (comment)
#127 (comment)

@vixentael
Copy link
Contributor Author

See branch dynamic frameworks for latest changes.

Current state:

Example projects working fine.

Linting fails with errors:

pod spec lint themis.podspec --subspec=themis --verbose --allow-warnings --fail-fast

    - ERROR | [iOS] [themis] xcodebuild: Returned an unsuccessful exit code.
    - ERROR | [themis] xcodebuild:  /var/folders/1v/7l7m798s24g1xqrh1kdxb2mr0000gn/T/CocoaPods/Lint/App/main.m:1:1: error: use of '@import' when modules are disabled
    - ERROR | [themis] xcodebuild:  /var/folders/1v/7l7m798s24g1xqrh1kdxb2mr0000gn/T/CocoaPods/Lint/App/main.m:2:1: error: use of '@import' when modules are disabled
    - ERROR | [themis] xcodebuild:  /var/folders/1v/7l7m798s24g1xqrh1kdxb2mr0000gn/T/CocoaPods/Lint/App/main.m:3:1: error: use of '@import' when modules are disabled

@gene-eu-zz
Copy link

are there any changes in the ecosystem we'd like to wait until we make final decision? 0.9.4 is coming at steady pace, need to decide whether there are actionable points here

@vixentael
Copy link
Contributor Author

I'll check the current state of CocoaPods infrastructure and let you know. I don't think that we need to wait, anyway.

@vixentael
Copy link
Contributor Author

vixentael commented Nov 6, 2016

That's still an issue.
0.9.4 podspec links OpenSSl as static library.

@vixentael vixentael changed the title Themis on iOS PodSpec: link to OpenSSL as dynamic framework, no static lib Consider switching to link OpenSSL as dynamic framework in PodSpec Nov 6, 2016
@vixentael vixentael changed the title Consider switching to link OpenSSL as dynamic framework in PodSpec Consider linking OpenSSL as dynamic framework in PodSpec Nov 6, 2016
@vixentael
Copy link
Contributor Author

Status update.

I've updated branch podspec_dynamic_frameworks, merged from master.

Current state: can't make CocoaPods linting working successfully due to error mentioned above error: use of '@import' when modules are disabled.

Other ways to create dynamic frameworks:

Maintainers with similar problems:

Using BoringSSL instead:

Next steps:

Play a bit more with creating dynamic frameworks (ideally, podspec should not disable CLANG MODULES ('CLANG_ENABLE_MODULES' => 'NO'))

Try to switch to BoringSSL

@vixentael
Copy link
Contributor Author

vixentael commented Aug 30, 2017

Woohoo, I think we can solve this issue when this PR will be merged:

https://github.com/levigroker/GRKOpenSSLFramework/pull/2

Status update:

  1. I changed Themis.podspec dependency to GRKOpenSSLFramework (OpenSSL static libs wrapped into dynamic frameworks).

  2. Xcode building problems solved by adding #ifdef __OBJC__ ... #endif lines into openssl.h file inside framework. In this case project is built successfully, no need to disable CLANG modules.

  3. Podspec looks like this (GRKOpenSSLFramework version might be .3 after merging PR) --> https://raw.githubusercontent.com/cossacklabs/themis/podspec_dynamic_frameworks_GRKOpenSSLFramework/themis.podspec

  4. Podspec passes pod spec lint validation successfully.

  5. Latest changes are pushed to podspec_dynamic_frameworks_GRKOpenSSLFramework branch.

Next steps:

  • wait until PR is merged
  • update podspec to link to the updated GRKOpenSSLFramework version
  • make sure that all example projects are building successfully
  • merge changes to release_0.9.5 branch
  • enjoy

@vixentael
Copy link
Contributor Author

I think it's solved now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants