jasonacox / Build-OpenSSL-cURL

Scripts to build OpenSSL, HTTP/2 (nghttp2) and cURL (libcurl) for MacOS, iOS and tvOS devices (x86_64, armv7, armv7s, arm64, arm64e). Now Supporting Apple Silicon, OpenSSL 3.0.x with TLS 1.3 and Mac Catalyst builds.
MIT License
432 stars 132 forks source link

Not working with XCode 15.3 and Command Line Tools 15.3 (15E204a) #67

Open Luckfried opened 8 months ago

Luckfried commented 8 months ago

image

jasonacox commented 8 months ago

Thanks @Luckfried - we likely need to upgrade the tvOS version. Are the other targets (iOS, MacOS) building correctly?

jasonacox commented 8 months ago

Update. XCode 15.2 (15C500b) works with the following library version.

OPENSSL="3.0.12"        # https://www.openssl.org/source/ 
LIBCURL="8.5.0"         # https://curl.haxx.se/download.html
NGHTTP2="1.58.0"        # https://nghttp2.org/

I'm upgrafing to XCode 15.3 to see what causes the break. I suspect we may need to change the min SDK versions.

jasonacox commented 8 months ago

The error that is generated with XCode 15.3:

crypto/ui/ui_openssl.c:273:17: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
static volatile intr_signal;
~~~~~~~~~~~~~~~ ^
int
1 error generated.
jasonacox commented 8 months ago

Fix required adding int to declaration. I don't know why it wouldn't be there already and why it only impacts tvOS. A quick sed added to tvOS build:

# Starting with XCode 15.3
LANG=C sed -i -- 's/static volatile intr_signal/static volatile int intr_signal;/' "./crypto/ui/ui_openssl.c"

I discovered a second issue with latest cURL library (8.6.0) that now requires the libpsl library which is not available by default. We have not included this in prior version so I'm using the --without-libpsl for now while I figure out an easy way to get a static cross-compile of the library.

Now working with latest: curl/8.6.0 libcurl/8.6.0 OpenSSL/3.0.13 zlib/1.2.12 nghttp2/1.60.0