{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28667","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28667/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28667/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28667/events","html_url":"https://github.com/rust-lang/rust/issues/28667","id":108421162,"number":28667,"title":"Cannot build rustc on systems that use musl libc","user":{"login":"LeoUnglaub","id":734684,"avatar_url":"https://avatars.githubusercontent.com/u/734684?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoUnglaub","html_url":"https://github.com/LeoUnglaub","followers_url":"https://api.github.com/users/LeoUnglaub/followers","following_url":"https://api.github.com/users/LeoUnglaub/following{/other_user}","gists_url":"https://api.github.com/users/LeoUnglaub/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoUnglaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoUnglaub/subscriptions","organizations_url":"https://api.github.com/users/LeoUnglaub/orgs","repos_url":"https://api.github.com/users/LeoUnglaub/repos","events_url":"https://api.github.com/users/LeoUnglaub/events{/privacy}","received_events_url":"https://api.github.com/users/LeoUnglaub/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-llvm","name":"A-llvm","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-25T23:03:16Z","updated_at":"2015-09-28T22:16:42Z","closed_at":null,"body":"Hey,\r\ncurrently 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.\r\n\r\n```\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp: In static member function 'static void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)':\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:148:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]\r\n     EXPLICIT_SYMBOL(stderr);\r\n                     ^\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'\r\n    if (!strcmp(symbolName, #SYM)) return &SYM\r\n                                           ^\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:149:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]\r\n     EXPLICIT_SYMBOL(stdout);\r\n                     ^\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'\r\n    if (!strcmp(symbolName, #SYM)) return &SYM\r\n                                           ^\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:150:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]\r\n     EXPLICIT_SYMBOL(stdin);\r\n                     ^\r\n/tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp:141:43: note: in definition of macro 'EXPLICIT_SYMBOL'\r\n    if (!strcmp(symbolName, #SYM)) return &SYM\r\n```\r\n\r\nThe following patches are needed for LLVM to build on Alpine Linux: http://git.alpinelinux.org/cgit/aports/tree/main/llvm?id=HEAD\r\n\r\nSadly 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`\r\n\r\nThanks and greetings\r\nLeo"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/143889199","html_url":"https://github.com/rust-lang/rust/issues/28667#issuecomment-143889199","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28667","id":143889199,"user":{"login":"nagisa","id":679122,"avatar_url":"https://avatars.githubusercontent.com/u/679122?v=3","gravatar_id":"","url":"https://api.github.com/users/nagisa","html_url":"https://github.com/nagisa","followers_url":"https://api.github.com/users/nagisa/followers","following_url":"https://api.github.com/users/nagisa/following{/other_user}","gists_url":"https://api.github.com/users/nagisa/gists{/gist_id}","starred_url":"https://api.github.com/users/nagisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagisa/subscriptions","organizations_url":"https://api.github.com/users/nagisa/orgs","repos_url":"https://api.github.com/users/nagisa/repos","events_url":"https://api.github.com/users/nagisa/events{/privacy}","received_events_url":"https://api.github.com/users/nagisa/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T22:16:42Z","updated_at":"2015-09-28T22:16:42Z","body":"You cannot rely on `FileCheck` being installed by the distribution."}}