Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails to link static libcurl on macOS <= 10.13 #68

Closed
sagebind opened this issue Aug 26, 2019 · 5 comments · Fixed by #169
Closed

Compilation fails to link static libcurl on macOS <= 10.13 #68

sagebind opened this issue Aug 26, 2019 · 5 comments · Fixed by #169
Labels
build Build or CI process upstream Caused by an upstream dependency
Milestone

Comments

@sagebind
Copy link
Owner

See alexcrichton/curl-rust#279.

Statically linking to libcurl is currently broken on macOS <= 10.13 due to a missing symbol.

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.

We could either wait for this to get fixed upstream and recommend that people disable the static-curl feature, or disable it by default, or find another workaround.

There does appear to already be an upstream PR to fix this, so it might be worth waiting it out to see if it is merged and published soon: alexcrichton/curl-rust#283

@sagebind sagebind added the build Build or CI process label Aug 26, 2019
@sagebind sagebind added the upstream Caused by an upstream dependency label Jan 9, 2020
@sagebind
Copy link
Owner Author

sagebind commented Feb 18, 2020

Good news, this was fixed upstream by alexcrichton/curl-rust#314 and alexcrichton/curl-rust#283! Now we just have to force curl-sys to version 0.4.25 to get this applied to Isahc.

Actually looks like 0.4.25 only contains one of the fixes. We'll have to prod upstream to make a new patch release that we can add as a minimum requirement (probably 0.4.26...).

@sagebind sagebind added this to the 0.9 milestone Feb 18, 2020
alexcrichton pushed a commit to alexcrichton/curl-rust that referenced this issue Feb 18, 2020
I'd like to pull in #283 downstream so that I can close sagebind/isahc#68. Master has everything needed now, I just need a new version...
@sagebind
Copy link
Owner Author

curl-sys version 0.4.26 has now been published, so in theory all we have to do is bump our dependency to 0.4.26 to fix this issue now.

@sagebind
Copy link
Owner Author

sagebind commented Mar 6, 2020

This is now fixed in the 0.9.0 release!

@ta3pks
Copy link
Contributor

ta3pks commented Mar 6, 2020

curl requires openssl which makes is impossible to be able to be built out of box for musl targets. Do you think there is anything to do about this ?

@sagebind
Copy link
Owner Author

sagebind commented Mar 6, 2020

I think for musl targets the appropriate solution would be to either disable the static-curl feature, or to configure TLS differently, either by using MesaLink with the curl/mesalink feature or by attempting to statically compile OpenSSL as well with the curl/static-ssl feature. I'm not sure what the best approach would be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build or CI process upstream Caused by an upstream dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants