rust-lang / rustup

The Rust toolchain installer
https://rust-lang.github.io/rustup/
Apache License 2.0
6.08k stars 875 forks source link

powerpc64-unknown-linux-gnu illegal instruction #1565

Open pusateri opened 5 years ago

pusateri commented 5 years ago
(chroot) livecd / # curl https://sh.rustup.rs -sSf | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /root/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile file located at:

  /root/.profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: powerpc64-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: syncing channel updates for 'stable-powerpc64-unknown-linux-gnu'
main: line 363: 17818 Illegal instruction     "$@"
(chroot) livecd / # which gcc
/usr/powerpc64-unknown-linux-gnu/gcc-bin/7.3.0/gcc
(chroot) livecd / # 
pusateri commented 5 years ago
Linux livecd 4.14.65-gentoo-G5 #1 SMP Sun Dec 9 13:26:51 UTC 2018 ppc64 PPC970, altivec supported PowerMac7,2 GNU/Linux
pusateri commented 5 years ago

This looks like it might be cargo. I downloaded a binary beta of cargo https://static.rust-lang.org/dist/2018-10-30/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz and got the same Illegal Instruction.

https://static.rust-lang.org/dist/2018-10-30/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz seemed to work well enough to print it's version where cargo doesn't.

pusateri commented 5 years ago

Looks like there is a cargo bug on this rust-lang/cargo#6320

pusateri commented 5 years ago

Turns out I think this really is a rustup issue. Lots of information in rust-lang/cargo#6320. Rustup 1.0.0 is the only version that seems to work on powerpc64. OpenSSL sends SIGILL (illegal instruction) signals by design for CPU feature detection and so rustup has to account for that and continue.

workingjubilee commented 3 years ago

@rustbot label: +O-linux