Ish: rust / rustup

Created on 13 Nov 2018  Â·  37Comments  Â·  Source: ish-app/ish

Not unsurprisingly, Rust doesn't seem to install currently:

Rhyss-iPhone:~# curl https://sh.rustup.rs -sSf | sh
curl: (56) LibreSSL SSL_read: error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt, errno 0
rustup: command failed: downloader https://static.rust-lang.org/rustup/dist/i686-unknown-linux-gnu/rustup-init /tmp/tmp.aMfBBO/rustup-init

Mostly reporting here so we can add it to the compatibility table.

compatibility

Most helpful comment

I moved it back to Doesn’t Work. Possibilities for getting it to work:

  • Install 32-bit glibc. This requires building it from source.
  • Build rustc from source for 32-bit musl. This is not supported by the rust project.
  • Switch to a Linux distribution that uses glibc, like Ubuntu. This would make the app download 10 times bigger, and require a reinstall to get it if I don’t implement multiple root filesystems first.
  • Make iSH support 64-bit. This would take probably at least 6 months.

All 37 comments

That error is fixed in the master branch, but then you get a different one.

As of the latest build, here’s what I get when running that command:

Rhyss-iPhone:~# curl https://sh.rustup.rs -sSf | sh
info: downloading installer
sh: can't open /dev/tty: no such file

That error is the same as the one preventing ssh from reading passwords from stdin.

I installed bash and ran the script with -y to get around the tty issue, but it then just crashed the entire app

/dev/tty and segfault issues are fixed, but now it turns out rustup doesn't work on alpine. You'll have to install rust through apk.

And you can't install rust through apk because they only have 64-bit binaries...

@tbodt so rust works or doesn't work? I cannot install it via apk or rustup script. I am asking because you moved the card to "Works". :smile:

It doesn’t work and I’m not sure how to make it work. Maybe I should make a new column for that sort of thing?

I would vote for a new column with a label like help needed? It might encourage contribution as well as a side effect. What do you think?

I moved it back to Doesn’t Work. Possibilities for getting it to work:

  • Install 32-bit glibc. This requires building it from source.
  • Build rustc from source for 32-bit musl. This is not supported by the rust project.
  • Switch to a Linux distribution that uses glibc, like Ubuntu. This would make the app download 10 times bigger, and require a reinstall to get it if I don’t implement multiple root filesystems first.
  • Make iSH support 64-bit. This would take probably at least 6 months.

@tbodt Thank you for the response. I have little experience with system programming like this so I really cannot comment on any of those solutions except that Rust support isn't that urgent so if you have a plan for 64-bit support, I would vote for that instead of anything else.

And if you can plan out and want to farm out some tasks for newbies like me, this could be fun as well. Maybe? :grinning:

I would love to have more people contributing, but this is not an easy project to contribute to. You’d need to be pretty good at C and Linux to work on it.

Just a heads up, Ubuntu has a minimal version now: https://blog.ubuntu.com/2018/07/09/minimal-ubuntu-released

They don’t seem to have a 32-bit version available for download.

They have 32-bit on this page: https://help.ubuntu.com/l/Installation/MinimalCD

That link gives a 404.

weird, the url got changed when I pasted to github https://help.ubuntu.com/community/Installation/MinimalCD

I found a 32-bit rootfs for Ubuntu Base here: http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/

I think once this is merged then a 32bit build for musl shouldn't be to hard: https://github.com/rust-lang/rust/pull/55163

I met the same problom when I installed rust on ubuntu 18.04.
But, the following command line works well without arguments -sSf.
curl https://sh.rustup.rs | sh

@corbinu

I think once this is merged then a 32bit build for musl shouldn't be to hard: rust-lang/rust#55163

Rust 1.35.0, which is released on May 24, supports for x86_64-unknown-linux-musl. 🎉

But, i686-unknown-linux-musl is still not supported by rustc and cargo.
https://forge.rust-lang.org/platform-support.html

Update on rust: it's in the Alpine edge repo. rustup is not going to work very well though.

@tbodt I upgraded my Alpine Linux on iSH 1.0 build 64 from v3.10 to edge by following the article, then installed cargo package. Installation itself was succeeded, but both rustc and cargo are killed by SIGILL immediately.

Do you have any suggestions?

IMG_0193

@kkk669 What does dmesg say? My hunch is it's SSE2.

@tbodt Is this enough?

# cargo
fish: 'cargo' terminated by signal SIGILL (Illegal instruction)
# dmesg
8 stub syscall 375
43 illegal instruction at 0x56d3b9fd: f2 0f 10 45 e8 89 48 08 
# rustc
fish: 'rustc' terminated by signal SIGILL (Illegal instruction)
# dmesg
8 stub syscall 375
43 illegal instruction at 0x56d3b9fd: f2 0f 10 45 e8 89 48 08 
61 illegal instruction at 0xf4d96a0d: f2 0f 10 45 e8 89 48 08

Yep that's movsd, which is SSE2

Is this issue closed because there is no plan to support rust in the plans?

It’s because it relies on SSE2 which hasn’t been implemented yet, and which has issues for it already.

rustc command crashes the app since iSH 1.0.66.
iSH-2020-05-04-233938.txt

Weird, I’m just getting an illegal instruction (I installed cargo and ran rustc —version). iSH 1.0 build 67

@Rexogamer Try just rustc without --version.

Oh right, yeah that crashes the app. Build 67.

Crash should be fixed in master, though I'd still expect an illegal instruction.

Reopening now that Alpine has rust in the repo

Cargo a rust file manager can’t install arch command to replicate cargo add arch

https://github.com/rust-lang/rust/pull/71586#issuecomment-626328134 indicates that [ 0.000000] 17 illegal instruction at 0x56cd15be: 0f fe e1 66 0f df dc 66 is not an iSH bug, despite the existence of both Rust/“rustup” and Cargo .apk packages in Alpine 3.12 since the latter depends on the former, neither will currently run.

fwiw cargo from the alpine installation fails on cargo install ripgrep with

15 illegal instruction at 0x56da02f1: 0f fa c6 66 0f 6e ee 0f
Was this page helpful?
0 / 5 - 0 ratings

Related issues

BrammyH picture BrammyH  Â·  3Comments

fernandotcl picture fernandotcl  Â·  6Comments

m4rkw picture m4rkw  Â·  5Comments

sirredbeard picture sirredbeard  Â·  3Comments

wsjyhaozi picture wsjyhaozi  Â·  4Comments