Giter VIP home page Giter VIP logo

openssl-apple's People

Contributors

andreasverhoeven avatar andrewh42 avatar bithug avatar chebur avatar dapperstout avatar dyashkir avatar fjolnir avatar gpongelli avatar hoppjan avatar ilammy avatar ilkerc avatar keeshux avatar levigroker avatar lifeisfoo avatar lucasbunq avatar martijnlaan avatar matoma avatar mconintet avatar megastep avatar mpfluger avatar mwermeester avatar nferruzzi avatar omochi avatar oneton avatar pieterclaerhout avatar revolter avatar steffenl avatar x2on avatar zeroimpl avatar zhzenghui 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

openssl-apple's Issues

Building 1.1.1d results in error

When running ./build-libssl.sh --version=1.1.1d I receive the error output posted below.

During my documentation inspection of openssl I didn't figure out the solution for this.

I'm investigating this due to:

Error output

Build options
  OpenSSL version: 1.1.1d
  Targets: ios-sim-cross-x86_64 ios64-cross-arm64 tvos-sim-cross-x86_64 tvos64-cross-arm64 macos64-x86_64 watchos-cross-armv7k watchos-cross-arm64_32 watchos-sim-cross-i386
  macOS SDK: 10.15
  iOS SDK: 13.1
  tvOS SDK: 13.0
  watchOS SDK: 6.0
  Number of make threads: 12
  Configure options:  no-deprecated
  Build location: /Users/jeroenleenarts/code/openssl-apple

Using openssl-1.1.1d.tar.gz
Building openssl-1.1.1d for iPhoneSimulator 13.1 x86_64...
  Logfile: /Users/jeroenleenarts/code/openssl-apple/bin/iPhoneSimulator13.1-x86_64.sdk/build-openssl-1.1.1d.log
  Configure...
Problem during Configure - Please check /Users/jeroenleenarts/code/openssl-apple/bin/iPhoneSimulator13.1-x86_64.sdk/build-openssl-1.1.1d.log

Log file contents

Global symbol "%targets" requires explicit package name (did you forget to declare "my %targets"?) at (eval 16) line 3.
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

pick os/compiler from:
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 Cygwin-i586
Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN VC-CE VC-WIN32
VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A VC-WIN64A-ONECORE
VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc android-arm
android-arm64 android-armeabi android-mips android-mips64 android-x86
android-x86_64 android64 android64-aarch64 android64-mips64 android64-x86_64
bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc darwin64-ppc-cc
darwin64-x86_64-cc gcc haiku-x86 haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc
hpux-parisc-cc hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc
hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86
ios-cross ios-xcrun ios64-cross ios64-xcrun iossimulator-xcrun iphoneos-cross
irix-mips3-cc irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc linux-aarch64
linux-alpha-gcc linux-aout linux-arm64ilp32 linux-armv4 linux-c64xplus
linux-elf linux-generic32 linux-generic64 linux-ia64 linux-mips32 linux-mips64
linux-ppc linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32
linux-x86 linux-x86-clang linux-x86_64 linux-x86_64-clang linux32-s390x
linux64-mips64 linux64-s390x linux64-sparcv9 mingw mingw64 nextstep
nextstep3.3 sco5-cc sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc
solaris-sparcv8-cc solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc
solaris-x86-gcc solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist
uClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vos-gcc
vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug
vxworks-ppc860 vxworks-ppcgen vxworks-simlinux

NOTE: If in doubt, on Unix-ish systems use './config'.
Configuring OpenSSL version 1.1.1d (0x1010104fL) for ios-sim-cross-x86_64
Using os-specific seed configuration

Non-PIE Binary error from App Store

I'm getting a "Non-PIE Binary" error when trying to upload to the App Store. Is there a flag to provide the correct settings when building the framework?

Unable to build the macosx for arm64 arch.

I downloaded the project, and just fired along build-libssl.sh... The default configuration what it takes are openssl 1.1.1dh and
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
watchos-cross-armv7k watchos-cross-arm64_32 watchos-sim-cross-x86_64 watchos-sim-cross-i386
tvos-sim-cross-x86_64 tvos64-cross-arm64

But when it runs - i see macos-arm64 fails..

Is anybody aware of this... Or am i doing something wrong??

Missing 'openssl.dylib' when bitcode is enabled

When bitcode is enabled, recompiled projects are crashing due to missing openssl.dylib. My workaround was to simply disable bitcode. I can live with that but the binary is twice the size now.

What am I missing, is it a flag to compile openssl with bitcode support?

Steps to reproduce

Archive the project with bitcode enabled, export ad-hoc binary with app thining enabled, or push to testflight and check your logs on device (Settings->Privacy->Analytics&Improvements->Analytics Data)

Date/Time:           2020-12-14 02:41:12.2216 +0300
Launch Time:         2020-12-14 02:41:12.0951 +0300
OS Version:          iPhone OS 14.2 (18B92)
Release Type:        User
Baseband Version:    3.01.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, dyld: Using shared cache: D3007DDA-6BD9-3B24-B208-96F3008FB935 | dependent dylib 'openssl.dylib' not found for '/private/var/containers/Bundle/Application/C7A9106D-D3BB-4917-B36A-3A6B2593E5C3/testapp.app/testapp', tried but didn't find: 'openssl.dylib'
Highlighted by Thread:  0

Backtrace not available

Unknown thread crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000006   x1: 0x0000000000000001   x2: 0x000000016d826010   x3: 0x000000000000008a
    x4: 0x000000016d825c10   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x0000000000000001  x11: 0x000000000000007d
   x12: 0x00000000000000da  x13: 0x000000000000006b  x14: 0x00000000000000d9  x15: 0x000000000000003b
   x16: 0x0000000000000209  x17: 0x0000000103ab17b4  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x000000016d825c10  x21: 0x000000000000008a  x22: 0x000000016d826010  x23: 0x0000000000000001
   x24: 0x0000000000000006  x25: 0x000000016d8268d8  x26: 0x0000000103ad8778  x27: 0x0000000103ad8000
   x28: 0x0000000000000000   fp: 0x000000016d825be0   lr: 0x0000000103abf6e0
    sp: 0x000000016d825ba0   pc: 0x0000000103ab7440 cpsr: 0x00000000
   esr: 0x00000000  Address size fault

Binary images description not available

Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯

EOF

Could not build on Xcode 11.7

As per title.

Command:

caffeinate ./build-libssl.sh --version=1.1.1g --min-macos-sdk=10.9 --min-ios-sdk=9.0

Last error:

ld: building for iOS Simulator, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd) built for macOS/Mac Catalyst, file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
ld: building for iOS Simulator, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd) built for macOS/Mac Catalyst, file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
ld: building for iOS Simulator, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd) built for macOS/Mac Catalyst, file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment:

  • Xcode 11.7 (11E801a)
  • macOS Catalina 10.15.6 (19G2021)
  • OpenSSL 1.1.1g

Full logs attached.

build-bin.tar.gz

App Store Rejection: Privacy Manifest Files

ITMS-91065: Missing signature - Your app includes “Frameworks/openssl.framework/openssl”, which includes BoringSSL / openssl_grpc, an SDK that was identified in the documentation as a privacy-impacting third-party SDK. If a new app includes a privacy-impacting SDK, or an app update adds a new privacy-impacting SDK, the SDK must include a signature file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a signature. For details about verifying the code signature for a third-party SDK, visit: https://developer.apple.com/documentation/xcode/verifying-the-origin-of-your-xcframeworks.

Apple Developer Relations

Help - invalid x86_64

pple/bin/iPhoneSimulator16.2-x86_64.sdk/build-openssl-1.1.1q.log
apps/libapps.a -lssl -lcrypto
Undefined symbols for architecture x86_64:
"_opendir$INODE64", referenced from:
_OPENSSL_DIR_read in libcrypto.a(o_dir.o)
"_readdir$INODE64", referenced from:
_OPENSSL_DIR_read in libcrypto.a(o_dir.o)
ld: symbol(s) not found for architecture x86_64

Input command: ./build-libssl.sh --version=1.1.1d --archs="ios_armv7 ios_arm64 ios_i386 ios_arm64e" --targets="ios-sim-cross-x86_64 ios64-cross-arm64 ios64-cross-arm64e"

Any help would be appreciated. What are all the supported targets?

dylib support

Thanks for your excellent script, it would be much more useful if you could add the option to build dylib instead of .a libraries.

Question about iOS target bump

Hi, thank you for figuring out the Xcode 12 and Apple silicon support.
I was just wondering what was the reason behind bumping the iOS target to 12.0 in 340537f? Does the XCFramework not support iOS 11 or was there something else in the build process?

Missing symbolic links for Catalyst target

Catalyst build framework is missing symbolic links whereas the macOS build framework has. App Store processing defines these are malformed frameworks thus invalid build. Should we add Catalyst for symbolic link creation too, or am I missing something?

https://github.com/keeshux/openssl-apple/blob/7eb1ce9894c4f7f2d19895e1a044d3583d20f089/create-openssl-framework.sh#L244

Image 2020-12-09 at 7 13 31 PM

 ITMS-90291: Malformed Framework - The framework bundle openssl (x.app/Contents/Frameworks/openssl.framework) must contain a symbolic link 'openssl' -> 'Versions/Current/openssl'. Refer to the Anatomy of Framework Bundles for more information.

ITMS-90291: Malformed Framework - The framework bundle openssl (x.app/Contents/Frameworks/openssl.framework) must contain a symbolic link 'Resources' -> 'Versions/Current/Resources'. Refer to the Anatomy of Framework Bundles for more information.

ITMS-90292: Malformed Framework - The framework bundle openssl (x.app/Contents/Frameworks/openssl.framework) 'Versions' directory must contain a symbolic link 'Current' resolving to a specific version directory. Resolved link target: '${linkTarget}'. Refer to the Anatomy of Framework Bundles for more information.

Linking for arm64 and arm64e error.

> Making all for tool membrane…
==> Compiling src/main.mm (arm64)…
==> Compiling src/membrane.m (arm64)…
==> Linking tool membrane (arm64)…
Undefined symbols for architecture arm64:
  "___darwin_check_fd_set_overflow", referenced from:
      _RAND_poll in libcrypto.a(rand_unix.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/enty8080/Desktop/iphoneos-membrane/handler/.theos/obj/debug/arm64/membrane] Error 1
make[2]: *** [/Users/enty8080/Desktop/iphoneos-membrane/handler/.theos/obj/debug/arm64/membrane] Error 2
make[1]: *** [internal-tool-all_] Error 2
make: *** [membrane.all.tool.variables] Error 2

Compiled libssl.a and libcrypto.a using your program for ios_arm64 and ios_arm64e

Issues building openssl 3.0.0

Trying to build openssl 3.0.0 and ran into some issue:

  1. Out of the box, the script doesn't work. Log is showing:

Undefined subroutine &main::asm called at (eval 23) line 42.
Usage: Configure [no- ...] [enable- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]
pick os/compiler from:
...

Managed to work around this my removing calls to asm() from config/20-all-platforms.conf

  1. Building with bitcode doesn't work. Throwing this error:

ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together

Adding --disable-bitcode worked around this, but some build probably do need bitcode

Build fails on Catalyst target with Xcode 13.3

I'm running this command to build lib

./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"

which produces error

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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d

Using openssl-1.1.1l.tar.gz
Building openssl-1.1.1l for iPhoneSimulator 15.4 x86_64...
  Logfile: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/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: /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))...
Problem during make - Please check /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

build log shows

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'
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'
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:693: apps/opt.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:685: apps/bf_prefix.o] Error 1
make[1]: *** [Makefile:669: apps/app_rand.o] Error 1
make[1]: *** [Makefile:709: apps/s_socket.o] Error 1
make[1]: *** [Makefile:677: apps/apps.o] Error 1
make[1]: *** [Makefile:701: apps/s_cb.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:728: crypto/aes/aes_cfb.o] Error 1
make[1]: Leaving directory '/Users/steinmacht/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/src/Catalyst-x86_64/openssl-1.1.1l'
make: *** [Makefile:174: all] Error 2

using Xcode 13.3

Wrong minimum iOS version in Info.plist for iPhoneOS

Branch: master

Steps to reproduce:

  • used targets ios-sim-cross-x86_64 ios-sim-cross-arm64 ios64-cross-arm64 (ios-sim-cross-arm64 is added)
  • min-ios-sdk is set to 12.0

Result:
In the generated iPhoneOS framework the Info.plist contains 13.0 as minimum iOS version, but in the iPhoneSimulator framework's Info.plist contains 12.0.

Expected:
Both folders should contain min iOS version 12.0 in the Info.plist.

Building for Catalyst13.0-x86_64.sdk occur error

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -I. -Iinclude -fPIC -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -fno-common -fembed-bitcode -target x86_64-apple-ios13.0-macabi -mios-version-min=13.0 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR=""/Users/ring/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/bin/Catalyst13.0-x86_64.sdk/ssl"" -DENGINESDIR=""/Users/ring/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1l.11-fb93d/bin/Catalyst13.0-x86_64.sdk/lib/engines-1.1"" -D_REENTRANT -DNDEBUG -DOPENSSL_API_COMPAT=0x10100000L -MMD -MF crypto/aes/aes_ecb.d.tmp -MT crypto/aes/aes_ecb.o -c -o crypto/aes/aes_ecb.o crypto/aes/aes_ecb.c
clangclang: : error: clangclang: error: : invalid version number in '-target x86_64-apple-ios13.0-macabi'
invalid version number in '-target x86_64-apple-ios13.0-macabi'
error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
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'
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]: *** [apps/app_rand.o] Error 1
make[1]: *** Waiting for unfinished jobs....
clang: error: invalid version number in '-target x86_64-apple-ios13.0-macabi'
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** [apps/s_socket.o] Error 1
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** [crypto/aes/aes_core.o] Error 1
make[1]: *** [apps/s_cb.o] Error 1
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: *** [apps/bf_prefix.o] Error 1
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]: *** [apps/apps.o] Error 1
make[1]: *** [apps/opt.o] Error 1
make: *** [all] Error 2

How to use from Swift macOS app?

I have a macOS app written in Swift using Xcode 15.3. I'm trying to integrate this openssl-apple package so that I can use it from one of my Swift class.

Step 1: Added this repo to "Package Dependencies", exact version = 3.2.107
Step 2: Selected my app target, confirmed that "Frameworks, Libraries, and Embedded Content" section shows "openssl-apple" static library
Step 3: In my class implementation (.swift file), at the top: import openssl

Xcode complains "No such module 'openssl'". If I try "import openssl-apple" I get a "Consecutive statements on a line must be separated by ';'" error.

I tried variations of the name, OpenSSL, opensslapple, etc but nothing seems to work.

The README of this project doesn't provide any example on how to do this. Looking at previous issues, someone recommended adding a Modules/module.modulemap which I've done without any improvement.

Is anyone using this from a macOS Swift app able to provide some guidance? Thanks!

WatchOS Simulator does not link proper architecture

Hi, thank you so much to this repository for creating xcframework for open ssl, for iphone/catalyst it works pretty well but I have also targets with watchOS and when I'm building for watchsimulator in project, it could not determine symbols because Xcode12 is using x86_64 such as i386 (and arm64 on apple silicone) and xcframework could not be used, I found that openssl supports just x86_64, is there any way how to fix it? Thanks

Cannot Build - symbol(s) not found for architecture i386

Hi, when trying to use this as a cocoapods dependancy, I get the following messages:

[!] /bin/bash -c
set -e
./build-libssl.sh --version=1.1.0h
./create-openssl-framework.sh dynamic

Build options
OpenSSL version: 1.1.0h
Targets: ios-sim-cross-x86_64 ios-sim-cross-i386 ios64-cross-arm64 ios-cross-armv7s ios-cross-armv7 tvos-sim-cross-x86_64 tvos64-cross-arm64 macos64-x86_64 macos-i386
macOS SDK: 10.14
iOS SDK: 12.1
tvOS SDK: 12.1
Number of make threads: 8
Configure options: no-deprecated
Build location: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153

Downloading openssl-1.1.0h.tar.gz...
Building openssl-1.1.0h for iPhoneSimulator 12.1 x86_64...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/iPhoneSimulator12.1-x86_64.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for iPhoneSimulator 12.1 i386...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/iPhoneSimulator12.1-i386.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for iPhoneOS 12.1 arm64...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/iPhoneOS12.1-arm64.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for iPhoneOS 12.1 armv7s...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/iPhoneOS12.1-armv7s.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for iPhoneOS 12.1 armv7...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/iPhoneOS12.1-armv7.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for AppleTVSimulator 12.1 x86_64...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/AppleTVSimulator12.1-x86_64.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for AppleTVOS 12.1 arm64...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/AppleTVOS12.1-arm64.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for MacOSX 10.14 x86_64...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/MacOSX10.14-x86_64.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0h for MacOSX 10.14 i386...
Logfile: /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/MacOSX10.14-i386.sdk/build-openssl-1.1.0h.log
Configure...
Make (using 8 thread(s))...
Problem during make - Please check /Users/mikebowyer/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.0h-cd153/bin/MacOSX10.14-i386.sdk/build-openssl-1.1.0h.log

Then the output from the log is here:
build-openssl-1.1.0h.log

Have done a bit of research but cannot find anything similar, probably something simple that I am missing, but any help would be great. Thanks :)

Swift PM

Hello,

I've used your xcframework to make a simple swift binaryTarget pm that is "all inclusive".

https://github.com/nferruzzi/openssl

so basically all you need to use openss is

....
    dependencies: [
        .package(name: "openssl", url: "https://github.com/nferruzzi/openssl", from: "0.0.2"),
    ],
    targets: [
        .target(
            name: "MyApp",
            dependencies: [ .product(name: "OpenSSL", package: "openssl")]),
        .testTarget(
            name: "MyAppTests",
            dependencies: [.product(name: "OpenSSL", package: "openssl")]),
    ]
...

and then you can

import OpenSSL
...

        OpenSSL_SSL_init()
        ERR_load_CRYPTO_strings()

etc etc

would you be interested in adding a concept like this directly to your repo ? at the end what is really required is an URL to the latest openlssl.xcframework.zip which can be hosted by github as a release file.

xcrun: error: unable to lookup item 'SDKVersion' in SDK 'watchos'

Hi,

I can't install the openssl-apple pod. What could be the issue?

Maybe it's related to the Podfile

use_frameworks!

def shared_pods
    pod 'SwiftyBeaver'
    pod 'OpenSSL-Apple', '~> 1.1.1g.6'
    #pod 'OpenSSL-Apple', :path => '../../personal/openssl-apple'
end

abstract_target 'TunnelKit' do
    target 'TunnelKit-iOS' do
        platform :ios, '11.0'
        shared_pods
    end
    target 'TunnelKitTests-iOS' do
        platform :ios, '11.0'
    end
    target 'TunnelKitHost' do
        platform :ios, '11.0'
    end

    target 'TunnelKit-macOS' do
        platform :osx, '10.11'
        shared_pods
    end
    target 'TunnelKitTests-macOS' do
        platform :osx, '10.11'
    end
end

Thanks

➜  tunnelkit (master) ✗ pod install
Analyzing dependencies
Downloading dependencies
Installing OpenSSL-Apple (1.1.1g.6)
[!] /bin/bash -c
set -e
./build-libssl.sh --version="1.1.1g" --targets="ios-sim-cross-x86_64 ios64-cross-arm64 macos64-x86_64"
./create-openssl-framework.sh dynamic


Build options
  OpenSSL version: 1.1.1g
  Targets: ios-sim-cross-x86_64 ios64-cross-arm64 macos64-x86_64
  macOS SDK: 10.15
  iOS SDK:
  tvOS SDK:
  watchOS SDK:
  Number of make threads: 8
  Configure options:  no-deprecated
  Build location: /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b

Downloading openssl-1.1.1g.tar.gz...
Building openssl-1.1.1g for iPhoneSimulator  x86_64...
  Logfile: /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b/bin/iPhoneSimulator-x86_64.sdk/build-openssl-1.1.1g.log
  Configure...
  Make (using 8 thread(s))...
Problem during make - Please check /Users/houmie/Library/Caches/CocoaPods/Pods/Release/OpenSSL-Apple/1.1.1g.6-c9c1b/bin/iPhoneSimulator-x86_64.sdk/build-openssl-1.1.1g.log
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphoneos'
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: SDK "appletvos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'appletvos'
xcrun: error: SDK "watchos" cannot be located
xcrun: error: SDK "watchos" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'watchos'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 9571k  100 9571k    0     0  38.9M      0 --:--:-- --:--:-- --:--:-- 38.9M

SPM import openssl

I have added this package to my project, and I can see that it has been linked as a framework. But I am unable to import this framework into my codebase.

How have other people called import for this library via SPM

Branch 1.0 is gone

I'm installing another library that depends on openssl-apple and today pod install stopped working:

Installing OpenSSL-Apple (1.1.0h)

[!] Error installing OpenSSL-Apple
[!] /usr/bin/git clone https://github.com/keeshux/OpenSSL-Apple /var/folders/XXX/XXX --template= --single-branch --depth 1 --branch 1.0

Cloning into '/var/folders/XXX/XXX'...
warning: Could not find remote branch 1.0 to clone.
fatal: Remote branch 1.0 not found in upstream origin

Cannot use framework in Swift

I'm able to build and generate the xcframework just fine, but when it comes to using it, both in my own project and the provided demo project, I can't import the framework in code. i.e. import openssl or import OpenSSL using xcode 12.2

UIKitForMac?

Have you been able to get OpenSSL building for UIKitForMac yet?

"Problem during configure ..."

Can't build openssl for any archs by using build-libssl.sh

Has that problem
Screenshot 2021-02-03 at 12 24 29

Don't understand what is the problem and how to solve it.
Please help with it!

Trouble with $SDKVERSION in recent Xcode versions

Scripts have trouble finding sysroot due to the following:

$ xcrun -sdk macosx --show-sdk-version
10.15.4
$ xcrun -sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk

That is, SDK version not being 1:1 with the SDK path.

cc not found on Mac OSX Montery

Seems like a lot of these guys can't find cc or something. Anyone had this issue before?

/usr/bin/cc: No such file or directory
make[1]: *** [crypto/aes/aes_cbc.o] Error 127
/bin/sh: /Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc: No such file or directory
make[1]: *** [crypto/aes/aes_cfb.o] Error 127
/bin/sh: /Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc: No such file or directory
make[1]: *** [crypto/aes/aes_core.o] Error 127
/bin/sh: /Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc: No such file or directory
make[1]: *** [crypto/aes/aes_ecb.o] Error 127
make: *** [all] Error 2

Simulator build failing on Xcode 11.6

The scripts doesn't seem be working with Xcode 11.6. Building for the iOS Simulator failed due to what seems to be a linker flag problem.

Example invocation:

 caffeinate ./build-libssl.sh   --version=1.1.1g --archs="ios_x86_64"

Error:

ld: building for iOS Simulator, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd) built for macOS/Mac Catalyst, file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64

Full log here: build-openssl-1.1.1g.log.gz

AppStore rejection project with openssl-apple!!! 🚨🚨🚨

Hello,
We noticed one or more issues with a recent submission for TestFlight review for the following app:

  • #######
  • Version 0.1.12
  • Build 27

Please correct the following issues and upload a new binary to App Store Connect.
ITMS-91065: Missing signature - Your app includes “Frameworks/openssl.framework/openssl”, which includes BoringSSL / openssl_grpc, an SDK that was identified in the documentation as a privacy-impacting third-party SDK. If a new app includes a privacy-impacting SDK, or an app update adds a new privacy-impacting SDK, the SDK must include a signature file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a signature. For details about verifying the code signature for a third-party SDK, visit: https://developer.apple.com/documentation/xcode/verifying-the-origin-of-your-xcframeworks.

Apple Developer Relations


Dear developer, please fix that! Or help me for fix that 🙏 🙏

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.