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

Issues installing rustup with OpenIndiana / Illumos #2857

Open
gregbuchholz opened this issue Oct 2, 2021 · 3 comments
Open

Issues installing rustup with OpenIndiana / Illumos #2857

gregbuchholz opened this issue Oct 2, 2021 · 3 comments

Comments

@gregbuchholz
Copy link

When trying to install rustup on new install of OpenIndiana Hipster 21.04 in a virtualbox VM, I browsed over to https://rustup.rs and got the following message:

I don't recognize your platform.

rustup runs on Windows, Linux, macOS, FreeBSD, NetBSD, and illumos. If you are on one of these platforms and are seeing this then please report an issue, along with the following values:
navigator.platform:
SunOS i86pc
navigator.appVersion:
5.0 (X11)

...but there was then a note with instructions to run:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

...that didn't make it very far. Apparently the default bourne shell doesn't like that. Bash seemed to fare better, but dies when executing the rust-init executable that it downloads from:

https://static.rust-lang.org/rustup/dist/x86_64-unknown-illumos/rustup-init

...with an error message:

ld.so.1: rustup-init: fatal: libgcc_s.so.1: open failed: No such file or directory

...but there are many versions of libgcc_s.so.1 installed:

$ find . -name "libgcc_s.so.1" 2>/dev/null
./usr/sfw/lib/amd64/libgcc_s.so.1
./usr/sfw/lib/libgcc_s.so.1
./usr/gcc/7/lib/amd64/libgcc_s.so.1
./usr/gcc/7/lib/libgcc_s.so.1
./usr/gcc/3.4/lib/libgcc_s.so.1
./usr/gcc/3.4/lib/amd64/libgcc_s.so.1
./usr/gcc/10/lib/amd64/libgcc_s.so.1
./usr/gcc/10/lib/libgcc_s.so.1

for reference on this machine:

$ uname -a
SunOS oi 5.11 illumos-fa4a3e77ed i86pc i386 i86pc

@gregbuchholz
Copy link
Author

I then installed rust v 1.44 from the pkg tool, and downloaded the rustup repository. Trying "cargo test" in the rustup project results in the following:

...
Compiling socket2 v0.4.0
Running rustc --crate-name socket2 --edition=2018 /export/home/greg/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=ee62bcee554d4c45 -C extra-filename=-ee62bcee554d4c45 --out-dir /export/home/greg/rustup/target/debug/deps -L dependency=/export/home/greg/rustup/target/debug/deps --extern libc=/export/home/greg/rustup/target/debug/deps/liblibc-7957dd6d3ea6c6c7.rmeta --cap-lints allow
error[E0658]: match is not allowed in a const fn
--> /export/home/greg/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:156:9
|
156 | / match address {
157 | | SocketAddr::V4() => Domain::IPV4,
158 | | SocketAddr::V6(
) => Domain::IPV6,
159 | | }
| |_________^
|
= note: see issue #49146 rust-lang/rust#49146 for more information

error: aborting due to previous error

For more information about this error, try rustc --explain E0658.
error: could not compile socket2.

Caused by:
process didn't exit successfully: rustc --crate-name socket2 --edition=2018 /export/home/greg/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs --error-format=json >--json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 >-C metadata=ee62bcee554d4c45 -C extra-filename=-ee62bcee554d4c45 --out-dir /export/home/greg/rustup/target/debug/deps -L dependency=/export/home/greg/rustup/target/debug/deps --extern libc=/export/home/greg/rustup/target/debug/deps/liblibc-7957dd6d3ea6c6c7.rmeta --cap-lints allow (exit code: 1)

@cgrzemba
Copy link

cgrzemba commented Nov 8, 2021

I know that this works on OI; no rust package installed from OI pkg repository

snipped from a Makefile:

    export RUSTUP_HOME=$(RUSTUP_HOME); \
    export CARGO_HOME=$(CARGO_HOME); \
    export RUSTUP_INIT_SKIP_PATH_CHECK=yes; \
    curl https://sh.rustup.rs -sSf | bash -s -- -y; \
    source $(CARGO_HOME)/env; \

@karaiwulf
Copy link

Hey folks, this isn't an issue with rustup-init. /usr/lib/libgcc_s.so.1 is only provided by pkg:/system/library/gcc-4-runtime (you can verify this using pkg search /usr/lib/libgcc_s.so.1). You either need to create a link from gcc-10's version (/usr/gcc/10/lib/libgcc_s.so.1), install gcc-4-runtime, or alter your ld search path using crle.

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

3 participants