Skip to content

"error: [48] An unknown option was passed in to libcurl" on nightly only #6155

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

Closed
nickolay opened this issue Oct 8, 2018 · 8 comments · Fixed by #6383
Closed

"error: [48] An unknown option was passed in to libcurl" on nightly only #6155

nickolay opened this issue Oct 8, 2018 · 8 comments · Fixed by #6383

Comments

@nickolay
Copy link

nickolay commented Oct 8, 2018

I'm on OS X 10.9.5 (I know) and attempting to install any package using the nightly version (cargo 1.31.0-nightly (ad6e5c0 2018-09-28)) results in:

$  cargo install cargo-cov
    Updating crates.io index
error: [48] An unknown option was passed in to libcurl

Adding -v doesn't reveal the source of error.
curl crates.io with or without https works.

Stable cargo 1.29.0 (524a578 2018-08-05) and cargo 1.30.0-beta (05e9b01 2018-09-21) work fine.

I first suspected network censorship was the reason and tried to configure a proxy in ~/.cargo/config, but that didn't have any effect.

I'm not an active rust user, so I'm not sure if/how I can troubleshoot this further without delving in too deep.

@ehuss
Copy link
Contributor

ehuss commented Oct 8, 2018

@nickolay What version of curl is on your system? (curl -V)

@alexcrichton it looks like curl-sys just gained the ability to statically link a few days ago 🎉 . I'm curious if that is a feasible option.

@alexcrichton
Copy link
Member

Ah I believe the bug here is that we blindly link cargo dynamically on osx hoping it has all the features. We should probably just link cargo statically like other platforms already do. Definitely a bug for us to fix!

@nickolay
Copy link
Author

nickolay commented Oct 8, 2018

Thanks for the quick reply! My version of curl is:

$ curl -V
curl 7.59.0 (x86_64-apple-darwin13.4.0) libcurl/7.59.0 OpenSSL/1.0.2o zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.1 (+libidn2/2.0.4) nghttp2/1.31.1
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

^^ that's from macports, the system version is:

$ /usr/bin/curl -V
curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz

@alexcrichton
Copy link
Member

This should get fixed as part of rust-lang/rust#54919 where we should force Cargo to always compile the curl submodule and link it

@nickolay
Copy link
Author

nickolay commented Nov 5, 2018

Indeed, this now works fine for me in nightly. Thanks a lot!

@nickolay nickolay closed this as completed Nov 5, 2018
@carols10cents
Copy link
Member

carols10cents commented Dec 6, 2018

Hey, I'm reopening this because I'm helping out @synapticarbors at a meetup, and they're seeing this error even though they're on a newer nightly than Nov 4 (cargo +nightly -v = 2018-12-02)

They're on macos 10.9.5, and curl -V = 7.55.1. They're seeing the same error message as in the original report...

I'm not sure what to check to see if something broke the linked PR that changes to have cargo always compile the curl submodule and link it... is there any chance that's the case?

Or are we missing something?

This is NOT more urgent than the release or the all-hands <3

@ehuss
Copy link
Contributor

ehuss commented Dec 6, 2018

@carols10cents We ended up needing to link libcurl dynamically on MacOS. Since 10.9 has a relatively old version of libcurl, it was breaking on an newer option that was added. I have posted a PR with a proposed fix.

@carols10cents
Copy link
Member

Ahh, awesome. Thank you @ehuss! ❤️

bors added a commit that referenced this issue Dec 6, 2018
[BETA] Fix fetching crates on old versions of libcurl.

CURLOPT_PIPEWAIT was added in 7.43 but MacOS 10.9 has 7.30.

Fixes #6155

(I think this is worthy for beta since it makes cargo unusable on older versions of MacOS.)
bors added a commit that referenced this issue Dec 7, 2018
Fix fetching crates on old versions of libcurl.

CURLOPT_PIPEWAIT was added in 7.43 but MacOS 10.9 has 7.30.

Fixes #6155
@bors bors closed this as completed in #6383 Dec 7, 2018
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 a pull request may close this issue.

4 participants