-
Notifications
You must be signed in to change notification settings - Fork 386
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
libmusl with static OpenSSL? #21
Comments
It ... already works? If you find sometimes that doesn't work, let me know and I'll look into it! |
Sweet! I will look into this tomorrow and try converting a bunch of production projects at work, and let you know how it goes. |
Follow up to this: Is there a reason OpenSSL is not included in the non-x86 musl targets? I'm interested in using cross to create static binaries targeting Raspberry Pi 3, but need OpenSSL. Previously I've used https://github.com/clux/muslrust for creating static binaries, but that project does not support multiple architectures. In clux/muslrust#11, we discuss this project superseding that one. |
I couldn't get OpenSSL to compile using the MUSL toolchains last time I tried (and the alternative of compiling OpenSSL using the glibc toolchain resulted in link errors when trying to produce binaries, iirc). Sadly, I don't remember the details :-(. |
@clux Any insight here? |
Hi. No, not really. OpenSSL is difficult. In all my attempts at getting the linux musl build to work, I had to get OpenSSL compiled correctly with musl-gcc. Any attempt where I accidentally/purposefully used native gcc, I'd end up with link errors at the end of cargo build. Also, I just gotta say that I really like how the docker images in here are set up. The tricks to compile then apt purge build dependencies for instance. Nice way of minimising dependencies and not accidentally relying on the wrong things (I ended up spending way too much time getting pkgconfig to do the right thing with custom prefixes). |
FYI, I submitted this issue to This Week in Rust cause it's something that I really want for my home Kubernetes on Raspberry Pi 3 cluster, but it's far beyond my own knowledge. Hoping someone with the right skills will bite. :} |
This was fixed by #218. |
Fixes ``` #21 22.27 Get:2 http://ftp.ports.debian.org/debian-ports unreleased InRelease [50.3 kB] #21 22.34 Err:1 http://ftp.ports.debian.org/debian-ports unstable InRelease #21 22.34 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B523E5F3FC4E5F2C NO_PUBKEY 8D69674688B6CB36 #21 22.42 Err:2 http://ftp.ports.debian.org/debian-ports unreleased InRelease #21 22.42 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B523E5F3FC4E5F2C NO_PUBKEY 8D69674688B6CB36 #21 22.43 Reading package lists... #21 22.44 W: GPG error: http://ftp.ports.debian.org/debian-ports unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B523E5F3FC4E5F2C NO_PUBKEY 8D69674688B6CB36 #21 22.44 E: The repository 'http://ftp.ports.debian.org/debian-ports unstable InRelease' is not signed. #21 22.44 W: GPG error: http://ftp.ports.debian.org/debian-ports unreleased InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B523E5F3FC4E5F2C NO_PUBKEY 8D69674688B6CB36 #21 22.44 E: The repository 'http://ftp.ports.debian.org/debian-ports unreleased InRelease' is not signed. ```
This looks really cool!
There's a nice trick with musl-libc, where you can build a 100% static Rust executable that works on any distro with a reasonably modern kernel. It's also more-or-less possible to make this work with static OpenSSL. For an example, see https://github.com/emk/rust-musl-builder.
Is there any support for doing something like this with cross? If so, I'd be happy to retire rust-musl-builder and point people at cross!
The text was updated successfully, but these errors were encountered: