curl / Mailing Lists / curl-library / Single Mail

curl-library

macOS support in curl

From: Pavol Markovic via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 26 Apr 2017 23:52:22 +1200

On curl GitHub page there are currently two issues / pull requests opened for more than month which are awaiting for feedback from maintainers.

Both are dealing with problems related to building and targetting curl for various macOS systems.

The first one deals with crash on systems before OS X 10.9 when building curl on OS X 10.11 and later: https://github.com/curl/curl/issues/1330
The second one deals with failure to build curl for Mac OS X 10.6: https://github.com/curl/curl/issues/1333

As systems evolve and new APIs are edded and older ones get deprecated the project needs to decide how to deal with those situations.
Currently there's a mix of various approaches which are not necessarily compatible.

One approach is to take advantage of so called weak-linking: building curl with newer SDKs providing new functions and conditionally check for function symbols during runtime with fallback options on systems missing those symbols. This approach allows to target multiple systems when one needs/wants to bundle curl with the app.

Another approach is to use compile time check for presence of functions. This might be simpler but limits the usage of curl to specific system. It's alright if you expect the curl to be bundled with the system.

The latter approach has been introduced as a hot-fix for crash related to 'clock_gettime' added in macOS 10.12 and I personally think it was wrong as it didn't followed the weak-linking pattern already present in the curl source base. The -Werror=partial-availability compiler flag turns characteristic of the macOS runtime into failure and prohibits wider backwards compatibility support.

Are there any plans to handle those issues / pull requests and eventually sort those problems for good?

Palo
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-04-26