Comments (7)
I don't really follow this, could you be a little more specific as to what the problem is?
from curl-rust.
It's a few problems:
- non-blessed targets (those without a particular triple in curl-sys's Cargo.toml) are broken. Adding all targets is not possible (upstream) because some of them are generated by build scripts.
- curl-rust built with the feature
unix
depends on openssl-sys (it calls a function from it), but doesn't actually depend on it (via Cargo.toml), leaving that to curl-sys (which proceeds to depend on openssl based on triplets rather than features, a mismatch between the usage and dependency).
from curl-rust.
Also, on the pkg-config bit:
The normal operation with feature(unix)
and target={i686,x86_64}-unknown-linux-gnu
in curl-sys causes the openssl libraries to appear three times in the link command (pkg-config --static curl
adds them twice, then depending on openssl-sys adds them again)
I'd argue that it may not be entirely correct to have curl-sys depend on openssl-sys: we're essentially writing out duplicate dependency information that already exists elsewhere, and having that dependency information be wrong some of the time.
My understanding is: the curl-sys -> openssl-sys dep exists so that in the case of a system lacking curl and openssl, we can have openssl automatically built. Unfortunately, that is not all that dependency does, and curl-rust presently reliese on it for more than that (improperly, as I argue above).
It's less clear what the right way to fix this is.
from curl-rust.
The lack of non-blessed targets sounds like a limitation of Cargo, not the usage here. This was an explicit drawback in the RFC that drafted this support.
Note that we really do need to depend on OpenSSL on unix because we're depending on that as part of the libcurl build process. If libcurl is found on the system, then it wasn't really up to use (so the openssl-sys dep doesn't do much), but if we build libcurl from source then we require OpenSSL to be available to enable https support.
I do agree that the lack of other platform support is somewhat worrisome, but I don't see how it's specific to this project or how it relates to pkg-config though. What do you mean that the openssl libraries appear three times? This sounds like a bug?
from curl-rust.
Thanks for the link to the RFC. I don't see it mentioning that target-based dependencies will make non-blessed targets unusable without patching within the cargo ecosystem, but yes, that is something we'll want to address in cargo. In this case, it could be solved by somehow having dependencies triggered by cfg(unix).
On the curl-sys -> openssl-sys dependency: the problem is that that real-world-dependency doesn't always exist. It only shows up when we need to build the c library that backs curl-sys. In the alternate where we have pkg-config & libcurl already, pkg-config indicates the c library dependencies that exist.
And in both cases, we don't need the ffi interface curl-sys provides. [And I'd argue that curl-rust, which needs that ffi interface, should be depending on it]
While I've thrown in some other complaints, I think for now this issue can be summarized as:
Missmatch between usage and dependence on openssl-sys breaks non-blessed triples
and it'll probably be blocking on a cargo issue for that support.
from curl-rust.
Oh wow, sorry about that! I misremembered and then didn't even read my own RFC! Would you be ok moving this issue to rust-lang/cargo instead of curl-rust?
from curl-rust.
Closing in favor of more specific ticket(s)
from curl-rust.
Related Issues (20)
- Versioning up of this crate
- How to make OpenSSL as the TLS backend on Windows and macOS? HOT 2
- HTTP response version HOT 5
- Missing debug_function in curl::easy::Easy2
- v0.4.69 release cannot be compiled because it's missing its copy of curl HOT 2
- Adopt openssl@3 HOT 1
- more easily get access to headers in Easy2 client HOT 2
- 0.4.45: Compilation issue HOT 2
- EOF error parsing large JSON response HOT 2
- How to set custom CA file
- abort_read test fails on Debian sid, probablly due to curl
- How upload file, just like curl -T <file> HOT 3
- Unsound usages of unsafe implementation leading to potential use-after-free bug HOT 2
- CURLOPT_REQUEST_TARGET
- Returning error on second request on using authentication 'auto'
- `os_errno()` not always reporting error 110 for connection timeouts
- several years since last release, status of this project ? HOT 3
- Unable to connect to an IPv6 link local address HOT 1
- Building expects `openssl/engine.h` despite engine API being deprecated?
- Please update to curl 8.10.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-rust.