I am trying to install OpenSSL-Apple Cocoapod as a dependency on a project but the build fails like so
[!] /bin/bash -c
set -e
./build-libssl.sh --version="1.1.1l" --targets="ios-sim-cross-x86_64 ios-sim-cross-arm64 ios64-cross-arm64 ios64-cross-arm64e macos64-x86_64 macos64-arm64 mac-catalyst-x86_64 mac-catalyst-arm64"
./create-openssl-framework.sh dynamic
Build options
OpenSSL version: 1.1.1l
Targets: ios-sim-cross-x86_64 ios-sim-cross-arm64 ios64-cross-arm64 ios64-cross-arm64e macos64-x86_64 macos64-arm64 mac-catalyst-x86_64 mac-catalyst-arm64
iOS SDK: 15.4 (min 12.0)
macOS SDK: 12.3 (min 10.15)
macOS SDK (Catalyst): 12.3 (min 10.15)
watchOS SDK: 8.5 (min 4.0)
tvOS SDK: 15.4 (min 12.0)
Number of make threads: 8
Configure options: no-deprecated
Build location: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple
Downloading openssl-1.1.1l.tar.gz...
Building openssl-1.1.1l for iPhoneSimulator 15.4 x86_64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/iPhoneSimulator15.4-x86_64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for iPhoneSimulator 15.4 arm64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/iPhoneSimulator15.4-arm64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for iPhoneOS 15.4 arm64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/iPhoneOS15.4-arm64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for iPhoneOS 15.4 arm64e...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/iPhoneOS15.4-arm64e.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for MacOSX 12.3 x86_64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/MacOSX12.3-x86_64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for MacOSX 12.3 arm64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/MacOSX12.3-arm64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for Catalyst 12.3 x86_64...
Logfile: /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/Catalyst12.3-x86_64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Problem during make - Please check /private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/bin/Catalyst12.3-x86_64.sdk/build-openssl-1.1.1l.log
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9603k 100 9603k 0 0 3645k 0 0:00:02 0:00:02 --:--:-- 3658k
whereas the file in question has this at the end
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
clang: clang: error: clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
invalid version number in '-target x86_64-apple-ios13.0-macabi'
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
make[1]: *** [Makefile:701: apps/s_cb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:677: apps/apps.o] Error 1
make[1]: *** [Makefile:693: apps/opt.o] Error 1
make[1]: *** [Makefile:685: apps/bf_prefix.o] Error 1
make[1]: *** [Makefile:709: apps/s_socket.o] Error 1
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
make[1]: *** [Makefile:720: crypto/aes/aes_cbc.o] Error 1
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
make[1]: *** [Makefile:669: apps/app_rand.o] Error 1
make[1]: *** [Makefile:728: crypto/aes/aes_cfb.o] Error 1
make[1]: Leaving directory '/private/var/folders/mg/vh8gm88n7q9fz88_0zx52b2c0000gn/T/CocoaPods/Try/OpenSSL-Apple/src/Catalyst-x86_64/openssl-1.1.1l'
make: *** [Makefile:174: all] Error 2
When I try to do command directly though
./build-libssl.sh --version="1.1.1l" --targets="ios-sim-cross-x86_64 ios-sim-cross-arm64 ios64-cross-arm64 ios64-cross-arm64e macos64-x86_64 macos64-arm64 mac-catalyst-x86_64 mac-catalyst-arm64"
the process is successful…
Building openssl-1.1.1l for Catalyst 12.3 x86_64...
Logfile: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/bin/Catalyst12.3-x86_64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.1l for Catalyst 12.3 arm64...
Logfile: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/bin/Catalyst12.3-arm64.sdk/build-openssl-1.1.1l.log
Configure...
Make (using 8 thread(s))...
Done.
Tried many different reinstalls,but the problem persists preventing me from initializing the project.
2
Answers
I have the same problem; since I don’t need Catalyst support (that’s where the build fails), I removed that by doing the following:
/Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d
– it’s visible in the log)OpenSSL-Apple.podspec
file and remove the architectures fromopenssl_targets
. In my case it now readshttps://www.example.com/podspecs/OpenSSL-Apple.podspec
Podfile
to use a private podspec file (as described at the bottom of this documentation page):(it’s possible it works with just a path reference, I haven’t tested that)
You need a private podspec file since
pod install
will update it from the remote library, even if you modify it. It’s entirely possible that there are better ways to do this, I’m only a very incidental Pod user.Anyway, after this
pod install
worked again for me and the mobile app works as well.I use local version of openSSL
Then edit run command in file
OpenSSL-Apple.podspec
And in the PodFile set