Skip to content

Conversation

badboy
Copy link
Contributor

@badboy badboy commented Aug 21, 2019

Default features includes always statically linking curl, which fails under macOS.
Not requiring static linking does the right thing on all OSs:

  • Link against a system library if it exists (e.g. on Linux and macOS)
  • Statically build and link against curl if it doesn't (e.g. on Windows)

Default features includes always statically linking curl, which fails under macOS.
Not requiring static linking does the right thing on all OSs:

* Link against a system library if it exists (e.g. on Linux and macOS)
* Statically build and link against curl if it doesn't (e.g. on Windows)
@yoshuawuyts
Copy link
Member

@sagebind this might be of interest for isahc too as it probably means this is breaking for direct users of isahc too unless they opt-out of static binding (where rust's libcurl bindings will always still fallback to static binding if no local copy is found).

@sagebind
Copy link

Could you perhaps share some more details on what errors you are getting on macOS? Compiling statically passes on my macOS CI servers, and it also works fine on my Macbook.

Not requiring static linking does the right thing on all OSs:

I think it could be up to debate as to what the "right thing" would be. 😉 Generally static linking is preferred unless there's a good reason not to do it, because it means you are running against a consistent, immutable version of the library and have less system dependencies; both of which are great for portability and testability.

@badboy
Copy link
Contributor Author

badboy commented Aug 24, 2019

There are more details in here: alexcrichton/curl-rust#279
And a PR is up for fixing static linking on macOS as well: alexcrichton/curl-rust#283

@sagebind
Copy link

Ah, I see, the error occurs on macOS <= 10.13. That makes sense; my MacBook has 10.14, and so does my CI.

@sagebind
Copy link

Created an Isahc issue here: sagebind/isahc#68

@yoshuawuyts yoshuawuyts merged commit b47d2fd into http-rs:master Aug 26, 2019
@sagebind
Copy link

sagebind commented Mar 6, 2020

The underlying problem has now been fixed in the 0.9.0 release, so if you're interested in static linking everywhere, it works now. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants