passepartoutvpn / openssl-apple

A script for compiling OpenSSL for Apple Devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing 'openssl.dylib' when bitcode is enabled

ilkerc opened this issue · comments

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

Bitcode proved to be a bad beast with non-Swift libraries in my experience. I suggest you always disable it.