GithubHelp home page GithubHelp logo

sinofool / build-openssl-ios Goto Github PK

View Code? Open in Web Editor NEW
124.0 124.0 57.0 16 KB

Build openssl for iOS development, include armv7 armv7s arm64 i386 and x86_64 support.

Home Page: http://sinofool.net/blog/archives/172

License: MIT License

Shell 100.00%

build-openssl-ios's People

Contributors

sinofool avatar vhanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-openssl-ios's Issues

build_release.sh is not creating frameworks

lipo creates a static library, not a framework - you've just used a different file extension (.framework) instead of .a

An iOS framework is actually a folder. It needs to contain a Headers and a Modules folder for example. And a binary for the dynamically linked component.

Please add license information

Could you please add a license to your project?

I'd like to use it for an iOS app that will be distributed by the App Store, and I need to be sure I can use your script under a license compatible to the App Store Terms for developers.

Github has some documentation on how to best add a license to a project here: https://help.github.com/articles/licensing-a-repository/.

Thank you for your consideration, and the effort you have already put into this!

Wrong URLs in script for 1.02 branch

Hello Sinofool,

thank you very much for this wonderful script.

I have found a couple of issues with the build script which I would like to share. While the master branch builds correctly for me, the 1.02 branch doesn't. The reason is: The URLs used for downloading via curl use the raw URLs from the master branch, and those do not work with the 1.02 branch.

The invocations of curl in the build script should look like this:

curl -O https://raw.githubusercontent.com/sinofool/build-openssl-ios/1.0/patch-conf.patch
and
curl -O https://raw.githubusercontent.com/sinofool/build-openssl-ios/1.0/patch-include.patch

Also, the README.md file should use the proper URL for the 1.02 branch, not the master branch.

HTH,

--
Stefan

What is the purpose of the patch-include.patch file?

Hello Sinofool,

can you please elaborate what the purpose of the patch-include.patch file is? It is used to patch opensslconf.h and removes the following lines from it:

`# define NO_SSL_TRACE

endif

if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)

define NO_STORE

endif

if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)

define NO_UNIT_TEST

`
What strikes me is that this is done after the build has completed. Can you please explain what the reason is for removing these preprocessor statements from the header file?

TIA,

--
Stefan

Build fails on Catalina

./build.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8021k 100 8021k 0 0 2899k 0 0:00:02 0:00:02 --:--:-- 2898k
~/github/iwins/build-openssl-ios/openssl-1.1.1b ~/github/iwins/build-openssl-ios

  • TMP_DIR=../build_openssl
    ++ xcode-select --print-path
  • CROSS_TOP_SIM=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
  • CROSS_SDK_SIM=iPhoneSimulator.sdk
    ++ xcode-select --print-path
  • CROSS_TOP_IOS=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
  • CROSS_SDK_IOS=iPhoneOS.sdk
    ++ xcode-select --print-path
  • export CROSS_COMPILE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
  • CROSS_COMPILE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
  • patch Configurations/10-main.conf
    patching file Configurations/10-main.conf
  • build_for ios64sim-cross x86_64 SIM
  • PLATFORM=ios64sim-cross
  • ARCH=x86_64
  • CROSS_TOP_ENV=CROSS_TOP_SIM
  • CROSS_SDK_ENV=CROSS_SDK_SIM
  • make clean
    make: *** No rule to make target `clean'. Stop.
  • export CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
  • CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
  • export CROSS_SDK=iPhoneSimulator.sdk
  • CROSS_SDK=iPhoneSimulator.sdk
  • ./Configure ios64sim-cross '-arch x86_64 -fembed-bitcode' no-asm no-shared no-hw no-async --prefix=../build_openssl/x86_64

Failure! build file wasn't produced.
Please read INSTALL and associated NOTES files. You may also have to look over
your available compiler tool chain or change your configuration.

Directory given with --prefix MUST be absolute

  • exit 1

Won't work on UIKitForMac

Looks like the frameworks won't compile for UIKitForMac. I believe they are gonna have to be packed into the new XCFramework format. This is in regards to bring iPad apps to the mac.

XCFrameworks make it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and UIKit for Mac — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of XCFrameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES. (49948269

)https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_release_notes

curl -L

I needed to use curl -OL to be able to use tar on the .gz file.
Got:
tar: Unrecognized archive format
otherwise.

Export sources to compile manually for iOS and Android

Hi. I create crossplatform apps with C++ for iOS and Android. I have code written in C++ that is compiled with Xcode for iOS and ndk-build for android. Is there a way to add pure sources for this lib and curl? I need this because this is a way package managers work - they bring sources to project not binaries. Could you please create an additional script for this or assist me with it. I tried it by myself by had no luck. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.