Skip to content
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

Can't install rustup (Void Linux-musl) #1247

Closed
lynxcs opened this issue Sep 2, 2017 · 11 comments
Closed

Can't install rustup (Void Linux-musl) #1247

lynxcs opened this issue Sep 2, 2017 · 11 comments

Comments

@lynxcs
Copy link

lynxcs commented Sep 2, 2017

Hello,
I'm not sure if I'm just dumb or if it's an issue, apologies if it's the former.
I'm trying to install rustup on void linux (musl based). During the curl / sh thing on the website it just complains about not finding rustup-init (somewhere in /tmp/random_letters_here/rustup-init directory).
So then I tried compiling from source but it always fails because of a missing dependency (openSSL).
I tried cargo update and cargo clean with no luck. Maybe it doesn't compile because void linux uses LibreSSL. I don't know.
Anyways I'd really appreciate it if someone would help me with this.

@lynxcs
Copy link
Author

lynxcs commented Sep 3, 2017

Update: I managed to build it (maybe I confused that part with building rust?) but now the executables in ~/.cargo/bin/ don't work.

@ParadoxSpiral
Copy link

The script also doesn't work for me (alpine linux, also musl) with the same error.

Turns out that the rustup-init binary is linked to glibc, so it will fail:

paradoxspiral@misaki> ld rustup-init
ld: warning: libdl.so.2, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: librt.so.1, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libpthread.so.0, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libc.so.6, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: ld-linux-x86-64.so.2, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libm.so.6, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
rustup-init: undefined reference to `gettimeofday@GLIBC_2.2.5'
rustup-init: undefined reference to `memset@GLIBC_2.2.5'
rustup-init: undefined reference to `strncpy@GLIBC_2.2.5'
rustup-init: undefined reference to `inet_ntop@GLIBC_2.2.5'
rustup-init: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
rustup-init: undefined reference to `clock_gettime@GLIBC_2.2.5'
rustup-init: undefined reference to `strlen@GLIBC_2.2.5'
rustup-init: undefined reference to `gai_strerror@GLIBC_2.2.5'
rustup-init: undefined reference to `pthread_mutexattr_settype@GLIBC_2.2.5'
rustup-init: undefined reference to `setenv@GLIBC_2.2.5'
…

Providing a rustup-init that is linked against musl, and detecting that in the script would be awesome!

@Sh4d1
Copy link

Sh4d1 commented Dec 17, 2017

Hey, I have the same issue. Would love a musl linked rustup-init! Is there something that can be done on our part?

Cheers!

@Michael-F-Bryan
Copy link

I just encountered the same issue trying to install Rust in a CI environment. The image I'm working with is built on alpine linux which doesn't use glibc, hence the cryptic "not found" error message when the OS tries to load rustup-init into memory.

@mcandre
Copy link

mcandre commented Mar 15, 2018

For what it's worth, Void appears to feature a "rustup" package in its repository:

https://www.voidlinux.eu/packages/

Could we backport this into rustup's official downloads?

@rosstimson
Copy link

There is indeed a rustup package for Void Linux, however when you are using the musl version of Void it is as good as useless as you cannot install a toolchain. Unless I'm missing something -- I'm new to Void and Rust. I ended up uninstalling rustup and fell back to the void packaged rust and cargo.

@mcandre
Copy link

mcandre commented May 30, 2018

I'm grateful for Void offering rust and cargo for musl in the main xbps repository, however for my purposes I actually need rust nightly, so that I can continue using clippy to analyze my code.

@pickfire
Copy link
Contributor

I have the same issue, using alpine here.

rpi [~]$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
sh: /tmp/tmp.gEbhdG/rustup-init: not found

@0xd61
Copy link

0xd61 commented Feb 3, 2019

same issue for me. Is there any update on this?

@rye
Copy link

rye commented Apr 30, 2019

Dup of #1053.

@kinnison
Copy link
Contributor

We've added musl as a build target for rustup in June.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants