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
419 stars 125 forks source link

Xcode 8 built libcurl breaks on iOS 9 (9.3.5) due to monotonic clock_gettime #17

Closed jasonacox closed 7 years ago

jasonacox commented 7 years ago

Users of iOS 9.3.5 may see libcurl crash due to missing _clock_gettime symbol. According to post below, it is due to an error with Xcode 8 building iOS targets that assumes monotonic clock_gettime function is available which it is for iOS 10, but is not for iOS 9.

Example crash log:

Dyld Error Message:
Dyld Message: Symbol not found: _clock_gettime
  Referenced from: /var/containers/Bundle/Application/6C07A427-A84E-4C73-90CF-75094764C9E6/iCurlHTTP.app/iCurlHTTP
  Expected in: dyld shared cache
  Dyld Version: 390.7

Related post: https://curl.haxx.se/mail/lib-2016-09/0043.html

Workaround: Change "curl_func_clock_gettime" to "no" in configure

jasonacox commented 7 years ago

The defect was related to 7.50.3 of libcurl. Configure bug is corrected in curl 7.51.0 dated November 2 2016 (https://curl.haxx.se/changes.html).

configure: Fix test syntax for monotonic clock_gettime