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 upCannot build rustc on systems that use musl libc #28667
Comments
steveklabnik
added
the
A-LLVM
label
Sep 25, 2015
This comment has been minimized.
This comment has been minimized.
|
We have instructions for building a musl-enabled rustc distribution. AFAIR we require gnu libc for an otherwise standard build. |
This comment has been minimized.
This comment has been minimized.
|
Could the patches for LLVM be merged upstream perhaps? That way we'd just pick up compatibility automatically! |
This comment has been minimized.
This comment has been minimized.
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
Currently |
This comment has been minimized.
This comment has been minimized.
|
You cannot rely on |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton i looked at all files distributed by Alpine Linux. There is no |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
So what would be the next steps to get this issue fixed so that Rust then runs on Alpine Linux? |
This comment has been minimized.
This comment has been minimized.
foutrelis
commented
Dec 24, 2015
|
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 |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
JoshStrobl
commented
Jan 19, 2016
|
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 |
leo-unglaub commentedSep 25, 2015
Hey,
currently it's not possible to build
rustcon 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-rootThanks and greetings
Leo