-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
cannot build 3.X.X for old versions of iOS #20687
Comments
I know these are very basic steps but lets start with very basic debug. |
Isn't libcrypto part of openssl? All the libraries and stuff are straight from the iOS 5.1 SDK that I got from https://invoxiplaygames.uk/sdks/iPhoneOS5.1.sdk.tar.lzma I don't know how Apple compiled the libraries in the 5.1 SDK OpenSSL 1.1.1 builds fine with the unmodified 5.1 SDK My build machine is Arch Linux with Clang 15.0.7, I've tested on MacOS 11.7.5 with the same Clang version and get the same result My C compiler is a simple shell script wrapper around clang #!/bin/sh
case $0 in
*+)
cc=clang++
;;
esac
tripple=${0##*/}
tripple=${tripple%-*}
exec "${cc:-clang}" -target "$tripple" -arch armv6 -miphoneos-version-min=3.0.0 -mlinker-version=609 -Wno-unused-command-line-arguement -isysroot "${_SDKPATH:-${0%/*}/../sdk}" "$@" For this build its basically running My linker and the rest of my toolchain are built from https://github.com/tpoechtrager/cctools-port, except on MacOS where they are included with Xcode |
Which version of OpenSSL 3.0 are you using? You need to disable atomic operations: try configuring with |
I'm using 3.1.0, but I get the same error on every 3.0.X version I've tested. Using the commands ./Configure ios-cross --prefix=/usr --openssldir=/usr/lib/ssl CROSS_COMPILE=arm-apple-darwin9- -DOPENSSL_DEV_NO_ATOMICS
make CNF_CFLAGS=-fno-common results in the same error as before |
I tried again recently with 3.1.2
same error clang 16.0.6 |
Same error here. Configure and make process: CC=clang CROSS_TOP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer CROSS_SDK=iPhoneOS.sdk ./Configure ios-cross no-asm Produces error in the linking process:
Adding |
After digging the code. Found a solution: |
Specifying |
./Configure ios-cross CROSS_COMPILE=armv7-apple-darwin11-
make CNF_CFLAGS='-fno-common -DBROKEN_CLANG_ATOMICS' -j12 Can build 3.1.2 (static library only), 3.1.3 and newer require adding no-asm to the Using Clang 17.0.6 with the iOS 5.0 SDK |
Using these commands I can build OpenSSL 1.1.1 for old versions of iOS using my toolchain
but when using the same commands for OpenSSL 3 I get a ton of errors about undefined symbols
The iOS SDK I use (5.1) has no libatomic.
I'm using the 5.1 SDK because it's the last SDK to include armv6 libraries, meaning I can run my stuff on even the oldest idevices
The text was updated successfully, but these errors were encountered: