-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Cannot build rustc on systems that use musl libc #28667
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
Comments
We have instructions for building a musl-enabled rustc distribution. AFAIR we require gnu libc for an otherwise standard build. |
Could the patches for LLVM be merged upstream perhaps? That way we'd just pick up compatibility automatically! |
@alexcrichton I think they could be merged with upstream. But i actually would prefer it to use the existing LLVM installation instead of rebuilding LLVM over and over again during the rustc build. Why/What do you need @nagisa i have looked at the docs, but i am unable to compile rustc do to the error message i posted above. |
Currently |
You cannot rely on |
@alexcrichton i looked at all files distributed by Alpine Linux. There is no |
Perhaps! It's not super critical that we run our codegen tests in all configurations (we have very few codegen tests right now) so it'd probably just make more sense to have a |
So what would be the next steps to get this issue fixed so that Rust then runs on Alpine Linux? |
This was reported to us on Arch Linux, asking to ship FileCheck so Rust can be built using the system LLVM. [1] Upstream LLVM seems to believe FileCheck is only used for running LLVM tests. [2] FileCheck used to be installed by the autotools build system but we have now switched to CMake which is the recommended way to build LLVM these days. I will comment on the LLVM bug report that Rust uses it for some of its tests; either LLVM needs to install FileCheck for CMake builds or Rust to make it optional. [1] https://bugs.archlinux.org/task/47510 |
|
Stuck with the same issue currently as well. Solus doesn't ship llvm utils given we don't use the autotools system and with no way to skip the tests, I'm currently stuck delivering the Rust binaries as opposed to building the Rust source and cargo separately (which I'd prefer to do). Given LLVM being such a bigger part of the system toolchain and thus making it a bit more of a PITA to update to newer versions, a |
Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately this isn't always available in all custom LLVM roots (e.g. those specified via `--llvm-root`). This commit adds a `./configure` option called `--disable-codegen-tests` which will manually disable running these tests. In the case that this option is passed we can forgo the need for the `FileCheck` executable. Note that we still require `FileCheck` by default as we will attempt to run these tests. Closes rust-lang#28667
mk: Add configure option for disabling codegen tests Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately this isn't always available in all custom LLVM roots (e.g. those specified via `--llvm-root`). This commit adds a `./configure` option called `--disable-codegen-tests` which will manually disable running these tests. In the case that this option is passed we can forgo the need for the `FileCheck` executable. Note that we still require `FileCheck` by default as we will attempt to run these tests. Closes #28667
Hey,
currently it's not possible to build
rustc
on Alpine Linux because it is based on musl libc. The main problem is that your shipped LLVM version does not contain the patches needed to compile on musl libc.The following patches are needed for LLVM to build on Alpine Linux: http://git.alpinelinux.org/cgit/aports/tree/main/llvm?id=HEAD
Sadly it is not possible to use the system LLVM version, because Alpine Linux does not ship
FileCheck
. So that makes it impossible to use./configure --llvm-root
Thanks and greetings
Leo
Tasks
The text was updated successfully, but these errors were encountered: