Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCreate a musl build #24
Comments
This comment has been minimized.
This comment has been minimized.
Gankro
commented
Sep 11, 2015
|
3.7 is out |
This comment has been minimized.
This comment has been minimized.
|
I've updated the instructions - rust-lang/rust#28389 |
This comment has been minimized.
This comment has been minimized.
saeta
commented
Feb 18, 2016
|
@aidanhs any updates to the status of this? Is this something that can be done? |
This comment has been minimized.
This comment has been minimized.
jimmycuadra
commented
Feb 18, 2016
|
/cc @alexcrichton, I know he was working on musl support and may have some info on the status of this. |
This comment has been minimized.
This comment has been minimized.
|
There was a recent thread on this on rust-internals - https://internals.rust-lang.org/t/request-for-adding-free-hardened-bsd-and-linux-musl-to-official-releases/3185 I think the crucial quote is this:
Which I believe roughly translates to: "MUSL doesn't do dynamic builds. Dynamic builds are required for some nightly features and we don't want crippled nightly builds, so MUSL will not become a nightly build." I think the next step is to do one of two things:
As I've mentioned in the topic, adding the ability to dynamically link MUSL binaries will probably not help - it's effectively a different target to static musl, so you'd just end up with nightly releases of dynamic musl :( |
This comment has been minimized.
This comment has been minimized.
saeta
commented
Feb 18, 2016
|
Perhaps I'm missing something, but @aidanhs is it not possible to have a rustc that itself uses dynamic linking (for complier plugins), but that can produce binaries that are statically linked? |
This comment has been minimized.
This comment has been minimized.
|
Being brief because my last toying with the rust build system was a while ago: I think the last stage of the rust build system (stage3 iirc) is effectively "let's test if this compiler is self-hosting". So to answer your question: maybe, but this seems like it'd subvert the point of this final stage. (but I may be totally wrong, as I seem to recall that a rustc compiler able to build musl must also be able to build glibc executables for some reason, which raises a question-mark over what I say. I'll delete my comment if it turns out I'm spreading bad information) |
This comment has been minimized.
This comment has been minimized.
saeta
commented
Feb 19, 2016
|
I just built from source a MUSL compiler and it does output glibc binaries unless you ask it to do MUSL.
I'm currently building a docker container to contain the MUSL compiler, but it'd be nicer if I could just use a pre-built compiler. |
This comment has been minimized.
This comment has been minimized.
|
@saeta as I find happens very often, @alexcrichton is a few steps ahead and already has dockerfiles for musl rust! https://github.com/alexcrichton/port-of-rust Regarding the |
This comment has been minimized.
This comment has been minimized.
|
Oh right! I forgot to close out this issue :) So, the state of things today:
In terms of building a compiler linked against MUSL I'd definitely be up for at the very least supporting that! The first step would just be adding support to the build system to actually do that. Then there'd probably also be some changes to the builder image to for example get a libstdc++ linking against MUSL. If we've got that up and running seems easy enough to add a new builder and a new nightly! (pretty low cost on our end) Does that help @aidanhs and @saeta? I'm gonna close this issue specifically (as we have the nightly MUSL standard library), but feel free to open an issue in rust-lang/rust about enabling a MUSL compiler! |
alexcrichton
closed this
Feb 19, 2016
This comment has been minimized.
This comment has been minimized.
|
The new rustup now allows you to download the musl stdlib for use with your compiler, so no compilation needed. See https://internals.rust-lang.org/t/static-binary-support-in-rust/2011/53. |
aidanhs commentedAug 25, 2015
This issue is to track my desire to have a nightly musl build.
We can't use a release of llvm because 3.7 isn't out yet (https://llvm.org/bugs/show_bug.cgi?id=23364), so I'd say there's nothing to do at the moment.