-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
Description
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.
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp: In static member function 'static void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)':
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:148:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
EXPLICIT_SYMBOL(stderr);
^
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'
if (!strcmp(symbolName, #SYM)) return &SYM
^
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:149:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
EXPLICIT_SYMBOL(stdout);
^
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'
if (!strcmp(symbolName, #SYM)) return &SYM
^
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:150:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
EXPLICIT_SYMBOL(stdin);
^
/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'
if (!strcmp(symbolName, #SYM)) return &SYM
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
YetAnotherMinion
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.