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

add illumos (amd64) support #2432

Merged
merged 1 commit into from
Oct 28, 2020
Merged

add illumos (amd64) support #2432

merged 1 commit into from
Oct 28, 2020

Conversation

jclulow
Copy link
Contributor

@jclulow jclulow commented Jul 20, 2020

With the integration of rust-lang/rust#71272, illumos is now (as I understand it!) a Tier 2 platform (see also rust-lang/compiler-team#279, rust-lang/rustup-components-history#19, etc). We have target and host binaries being built through CI/CD, which you can see at: https://rust-lang.github.io/rustup-components-history/x86_64-unknown-illumos.html

This change adds support illumos systems to rustup, and to the installation wrapper script that folks use via the instructions on the site (i.e., curl | bash). I believe it also rigs us up to cross build through the CI system, but I wasn't completely sure if I got this part right so any pointers definitely welcome.

Testing Notes

  • I tried cargo test on my OpenIndiana (an illumos distribution) build system. It ran a lot of tests; they passed, except for a handful that were ignored.
  • I ran the release build of rustup-init directly, and it was able to install the latest nightly toolchain.
  • I ran rustup-init.sh directly, and it was able to correctly determine that there were no rustup-init binaries available yet -- but at a URL which seemed to make sense!

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fundamentally this looks good. I will temporarily push some commits later today which verify the CI aspects, and then we're probably good to go. Thank you for this work.

@jclulow
Copy link
Contributor Author

jclulow commented Jul 22, 2020

Thanks! Happy to work through any issues that come up in that testing -- just let me know!

@jclulow
Copy link
Contributor Author

jclulow commented Jul 27, 2020

Hi there! Just wanted to check in and see if there's anything I should be doing to help out on this one.

@kinnison
Copy link
Contributor

Hi @jclulow

No, there's nothing you need to do yet, I've been awfully remiss here. I said I'd push a test commit and then entirely forgot due to real-life things. Your reminder that this PR is here was all I needed.

I've now pushed that test commit so let's see what happens.

@kinnison
Copy link
Contributor

Looks like the goal target is not yet in a stable release. We may need to wait a few weeks.

@jclulow
Copy link
Contributor Author

jclulow commented Jul 27, 2020

Looks like the goal target is not yet in a stable release. We may need to wait a few weeks.

Is that because the build process here is installing rust-std from stable, and that won't be built for illumos until the next stable Rust release hits? If so, do you know if there's anything I need to do to make sure that will happen -- or is the fact that nightly rust-std bits are showing up enough, and we just have to wait as you say?

@jclulow
Copy link
Contributor Author

jclulow commented Jul 27, 2020

Looks like the goal target is not yet in a stable release. We may need to wait a few weeks.

Is that because the build process here is installing rust-std from stable, and that won't be built for illumos until the next stable Rust release hits? If so, do you know if there's anything I need to do to make sure that will happen -- or is the fact that nightly rust-std bits are showing up enough, and we just have to wait as you say?

To be more concrete, because this succeeds today:

$ uname
Linux
$ rustup +nightly target install x86_64-unknown-illumos
info: downloading component 'rust-std' for 'x86_64-unknown-illumos'
info: installing component 'rust-std' for 'x86_64-unknown-illumos'
info: Defaulting to 500.0 MiB unpack ram
 14.6 MiB /  14.6 MiB (100 %)  11.1 MiB/s in  1s ETA:  0s

... this will succeed after the next stable release:

$ rustup target install x86_64-unknown-illumos
error: component 'rust-std' for target 'x86_64-unknown-illumos' is unavailable for download for channel stable

Is that right? Thank you for putting up with my ignorance here!

@kinnison
Copy link
Contributor

Correct, rustup is built with stable because we don't want to risk nightly issues causing false failures on our CI. It's fine, we just need to wait a few more weeks (perhaps up to 12) and this PR will remain open and we can retry it after 1.46 and see then.

@jclulow
Copy link
Contributor Author

jclulow commented Oct 26, 2020

Hello! Now that illumos bits are available in a stable Rust version (1.47) I am hoping we can move to get this integrated. I have rebased on current master, and confirmed that I can build and run a rustup-init binary on a current illumos system.

Let me know what the next steps are! Thanks.

@kinnison
Copy link
Contributor

Have you confirmed that the rustup-init can then install a toolchain on illumos? If so then we're probably good to merge this.

@jclulow
Copy link
Contributor Author

jclulow commented Oct 28, 2020

Sorry, I should have been clearer that I ran it and was able to get it to install a toolchain. The stock instructions from https://rustup.rs fail as expected:

x@newcastle:~$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sh[387]: local: not found [No such file or directory]
sh[388]: local: not found [No such file or directory]
sh[174]: local: not found [No such file or directory]
rustup: unrecognized OS type: SunOS

I stuck a copy of rustup-init.sh and the illumos binary in the appropriate structure, with the root URL in the script modified to match up, on illumos.org temporarily. As expected we get the ksh93 warning with the default sh and then it works with bash:

x@newcastle:~$ curl --proto '=https' --tlsv1.2 -sSf https://illumos.org/downloads/rustup/init.sh | sh
rustup does not work with this ksh93 version; please try bash!

x@newcastle:~$ curl --proto '=https' --tlsv1.2 -sSf https://illumos.org/downloads/rustup/init.sh | bash
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed

Continue? (y/N) y


Welcome to Rust!

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

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /export/home/x/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

  /export/home/x/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  /export/home/x/.cargo/bin

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

  /export/home/x/.profile

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

Current installation options:


   default host triple: x86_64-unknown-illumos
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

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

I'm going to ask you the value of each of these installation options.
You may simply press the Enter key to leave unchanged.

Default host triple?


Default toolchain? (stable/beta/nightly/none)


Profile (which tools and data to install)? (minimal/default/complete)


Modify PATH variable? (y/n)
n


Current installation options:


   default host triple: x86_64-unknown-illumos
     default toolchain: stable
               profile: default
  modify PATH variable: no

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

info: profile set to 'default'
info: setting default host triple to x86_64-unknown-illumos
info: syncing channel updates for 'stable-x86_64-unknown-illumos'
info: latest update on 2020-10-08, rust version 1.47.0 (18bf6b4f0 2020-10-07)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-std'
 19.5 MiB /  19.5 MiB (100 %)  10.7 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 49.2 MiB /  49.2 MiB (100 %)  10.4 MiB/s in  5s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
error: error: 'sysinfo not supported on this platform'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'clippy'
error: error: 'sysinfo not supported on this platform'
info: installing component 'rust-std'
error: error: 'sysinfo not supported on this platform'
 19.5 MiB /  19.5 MiB (100 %)  11.4 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
error: error: 'sysinfo not supported on this platform'
 49.2 MiB /  49.2 MiB (100 %)  11.8 MiB/s in  4s ETA:  0s
info: installing component 'rustfmt'
error: error: 'sysinfo not supported on this platform'
info: default toolchain set to 'stable-x86_64-unknown-illumos'

  stable-x86_64-unknown-illumos installed - rustc 1.47.0 (18bf6b4f0 2020-10-07)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable.

To configure your current shell run :
source $HOME/.cargo/env

x@newcastle:~$ export PATH=$HOME/.cargo/bin:$PATH
x@newcastle:~$ rustc --version
rustc 1.47.0 (18bf6b4f0 2020-10-07)
x@newcastle:~$ cargo --version
cargo 1.47.0 (f3c7e066a 2020-08-28)

@kinnison
Copy link
Contributor

Fantastic!

@kinnison kinnison merged commit 2e05bd8 into rust-lang:master Oct 28, 2020
@jclulow
Copy link
Contributor Author

jclulow commented Oct 28, 2020

Thanks for merging! I had a look around the documentation, and it wasn't clear to me what drives the process for getting a new release that would then appear presumably on https://rustup.rs -- is there a schedule, or a trigger of some kind, for the next rustup release?

@kinnison
Copy link
Contributor

It's nothing so formal. I'm working toward deciding what else needs to go in for 1.23, you can see that in the milestone here: https://github.com/rust-lang/rustup/milestone/4 if all that gets done then I'll definitely be releasing :D

AJ-Ianozi pushed a commit to AJ-Ianozi/getada-download that referenced this pull request Oct 12, 2023
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

Successfully merging this pull request may close these issues.

2 participants