Open WnP opened 6 years ago
I'm a bit puzzled as I cannot reproduce this (Ubuntu 18.04) and I don't have the libcurl*-dev
package installed.
I have, though, this file under the cargo cache:
$ ls -la /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.4.5/curl/libcurl.pc.in
-rw-rw-r-- 1 me me 1503 nov 10 2016 /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.4.5/curl/libcurl.pc.in
not sure if it's related.
@WnP Can you still reproduce this? If yes, can you post your configuration?
@apiraino
I cannot reproduce this (Ubuntu 18.04)
Sorry I'm not an Ubuntu user.
Can you still reproduce this?
Yes, the following dockerfile will helps you to reproduce this issue:
FROM voidlinux/voidlinux
# `openssl-sys` crate requires `openssl-devel` or `libressl-devel`
# `libssh2-sys` crate requires `zlib-devel`
RUN xbps-install -Sy \
rust cargo \
cmake make gcc pkg-config \
libressl-devel zlib-devel \
&& cargo install nannou-new
Note comments about other *-devel
required packages.
Building an image from this dockerfile will fail, but if you add libcurl-devel
it will successfully build.
FYI this issue looks related to alexcrichton/curl-rust#210
so it should be fixed in curl-sys 0.4.6
released 19 days ago
@mitchmindtree could we update curl-sys
to use this fixed version in order to close this issue?
@WnP I see.
I tried building an image from your Dockerfile and cargo install nannou-new
downloads curl-sys==0.4.8
(the latest as I write). Still, without the libcurl-devel
src the build breaks like you pointed out. Tried again with Alpine Linux, same result.
I'm not sure that pinning a more recent curl-sys
would help fixing the issue, the problem is that some distros explicitely require libcurl-devel
(or equivalent package).
Am I testing wrong?
@apiraino that's true, it doesn't compile even with curl-sys==0.4.8
.
Here is a more simpler test case:
directory structure:
.
├── Dockerfile
└── test_curl_sys
├── Cargo.toml
└── src
└── main.rs
Where:
Dockerfile
:
FROM voidlinux/voidlinux
COPY test_curl_sys /test_curl_sys RUN xbps-install -Sy \ rust cargo libressl-devel \ cmake make gcc pkg-config \ && cd test_curl_sys \ && cargo run
- `Cargo.toml`:
[package] name = "test_curl_sys" version = "0.1.0" authors = ["me me@here.io"]
[dependencies] curl-sys = "0.4.8"
- `main.rs`:
fn main() { println!("Hello curl-sys"); }
I guess the issue is related to the fact that void linux use `libressl` which is an `openssl` fork, which could explain the version mismatch issue.
So, how about we add a little notice on the README (#184), warning that some distros (voidlinux, alpine, others?) need the curl dev pkg since curl-sys (a dependency of nannou-new) might require it. Makes sense?
I would like the README to be helpful in this scenario without scaring away from nannou not-too-techy linux users
@apiraino IMHO it's not mandatory to enumerate every distros, just pointing libreSSL users should be enough because even ubuntu (or whatever distro) users can setup libreSSL in place of openSSL.
By the way enumerating few ones with the link you've just shared sounds like a good idea.
Is this still an issue? The related issue #184 is closed and the superseeding issue #188 is merged.
build command for
curl-sys v0.4.5
requiredlibcurl-devel
install on the system otherwise it could ends up with someopenssl
version issue.Logs:
Installing
libcurl
development package using your package manager fix the issue