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
Link to musl instead of glibc for .deb files #252
Comments
Musl builds are not supposed to run on glibc systems, and most systems are glibc systems, so dynamically linking to musl for a universal package without a dependency on the musl package sounds wrong. Do you mean to package static builds? (I do agree glibc is a major pain and I wish most systems were musl systems, but that's not the case.) |
@FiloSottile yes! I did mean static builds. Rust currently (for now...) statically links to musl libc by default if you specify a |
I looked at CI a bit more, and I believe the main changes needed would be to build libfuse-dev and libpcsclite-dev against musl. Alternatively, I suppose the mount feature could be disabled for deb packages?
Edit: oops, you already generate debs :) |
Hmm, the inability to provide The So I don't see a strong motivation to migrate over to purely-musl builds, but I don't have a problem with providing statically-linked My main questions then are:
|
To statically link FUSE, it sounds like changes to the underlying crate we depend on would be required (rather than just compiling Also, I can't figure out why I thought |
Hm, when you build on ubuntu-18.04 that means it might fail to run on Debian Stretch, which uses a libc 3 minor versions older. Admittedly, stretch is not supported for too much longer, but once you presumably move to focal, the same issue will occur with Debian Buster. glibc is only backwards compatible. I'm working on a GitHub action that will build and package binaries statically linking against musl. I will also probably add an image with openssl and such to link to, so I can add libfuse, and then it's a matter of fuser, so it may be a while before mount will work. I believe an easy way to make the packages different and incompatible is to name one e.g. rage-musl and have them mark each other incompatible in the Debian config (and document the difference). |
The reason Debian packages used Ubuntu 18.04 is because that's the minimum required version for
That sounds reasonable. The musl version could probably be documented in the Debian config so it shows up in the right UI places. I think I'll hold off making musl binary tarballs though, at least until there's someone asking for them, to try and keep the number of release packages at a reasonable level. |
Interesting, I looked at the cargo-deb repo but I couldn't find any documentation about this, I probably should change some other configs if this is the case, could you point me to where you learned about this so I can reference it in PRs to other projects please?
Could you explain why you want the musl version documented?
That seems reasonable |
Unfortunately I do not remember exactly, sorry. It's what I documented in #222, and I suspect that was from me encountering failures when trying to install or use In any case, GitHub has removed the 16.04 build environment as it's now unsupported, so 18.04 seems like a reasonable base version.
Ah, sorry, I didn't mean that the version number of MUSL should be documented. I meant that the |
Environment
I recently set up an apt repo for Rust command line tools at https://apt.0xe.me, and I was hoping to add
rage
. However, to support the widest set of OS versions, linking to musl libc seems to give the best portability.Would you consider linking your
.deb
files to musl instead of glibc?Edit: See e.g. this ripgrep issue where linking to glibc was an issue: BurntSushi/ripgrep#1890
The text was updated successfully, but these errors were encountered: