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

stable-x86_64-unknown-linux-gnu - (error reading rustc version) #130423

Closed
2 tasks done
DarkXero-dev opened this issue Aug 29, 2024 · 12 comments
Closed
2 tasks done

stable-x86_64-unknown-linux-gnu - (error reading rustc version) #130423

DarkXero-dev opened this issue Aug 29, 2024 · 12 comments
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues.

Comments

@DarkXero-dev
Copy link

DarkXero-dev commented Aug 29, 2024

Verification

Problem

I keep getting this error
stable-x86_64-unknown-linux-gnu unchanged - (error reading rustc version)

stable-x86_64-unknown-linux-gnu (default)
error: process didn't exit successfully: `/home/xxx/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stderr
: CommandLine Error: Option 'disable-auto-upgrade-debug-info' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

==> ERROR: A failure occurred in build().

Steps

  1. try compiling my package
  2. Error comes up

Possible Solution(s)

No response

Notes

Works on Arch XFCE not Arch KDE which I find odd.

Rustup version

rustup 1.27.1 (2024-05-07)

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/xxx/.rustup

stable-x86_64-unknown-linux-gnu (default)
(error reading rustc version)

OS version

ArchLinux latest
Kernel 6.10.6
@rami3l
Copy link
Member

rami3l commented Aug 30, 2024

@DarkXero-dev Thanks for filing this issue! However, I don't believe this is a Rustup issue. As seen in the log, Rustup tries to launch the rustc process but failed, probably due to the problems with the latter.

This option comes from LLVM (see also bpftrace/bpftrace#1855), so there could be a possibility that somehow the stable toolchain that you've installed is corrupted.

Maybe rust-lang/rust is a better place to ask?
(I've made rust-lang/rustup#4010 so that we can try transferring this issue over there.)

@DarkXero-dev
Copy link
Author

@rami3l

Well after setting rustup default nightly it worked so could be an issue with stable.. I dunno.

@rami3l
Copy link
Member

rami3l commented Aug 30, 2024

@DarkXero-dev Thanks! Please let us know if this issue reappears, so that we may transfer it to the Rust repo.

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@uberkael
Copy link

uberkael commented Sep 16, 2024

I'm experiencing the same bug on Arch Linux...
@DarkXero-dev
Could this be happening because the version on Arch has updates disabled?

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
(error reading rustc version)

Update, it happens with 1.81, 1.80, 1.79, 178, but not with nightly, beta or < 1.77

rustup default 1.81
info: syncing channel updates for '1.81-x86_64-unknown-linux-gnu'
info: latest update on 2024-09-05, rust version 1.81.0 (eeb90cda1 2024-09-04)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 66.9 MiB /  66.9 MiB (100 %)  56.3 MiB/s in  1s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 15.9 MiB /  15.9 MiB (100 %)  13.7 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 26.8 MiB /  26.8 MiB (100 %)  25.0 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 66.9 MiB /  66.9 MiB (100 %)  25.8 MiB/s in  2s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to '1.81-x86_64-unknown-linux-gnu'

  1.81-x86_64-unknown-linux-gnu installed - (error reading rustc version)
active toolchain
----------------

1.81-x86_64-unknown-linux-gnu (default)
(error reading rustc version)

@rami3l
Copy link
Member

rami3l commented Sep 16, 2024

I'm experiencing the same bug on Arch Linux... @DarkXero-dev Could this be happening because the version on Arch has updates disabled?

@uberkael This seems unlikely to be the reason. Given that Rustup seems to be getting the binaries without problems, I suggest you ask in rust-lang/rust instead I've transferred this issue to rust-lang/rust for you.

@rami3l rami3l reopened this Sep 16, 2024
@rami3l
Copy link
Member

rami3l commented Sep 16, 2024

@rustbot transfer rust-lang/rust

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 16, 2024
@rustbot rustbot transferred this issue from rust-lang/rustup Sep 16, 2024
@saethlin
Copy link
Member

Based on bpftrace/bpftrace#1855, what does this print:

ldd $(rustc --print sysroot)/bin/rustc

And can you share what project you are trying to build?

@saethlin saethlin added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. not-rustup labels Sep 26, 2024
@uberkael
Copy link

working 1.77

ldd $(rustc --print sysroot)/bin/rustc
        linux-vdso.so.1 (0x000073a1361f0000)
        /usr/NX/lib/libnxegl.so (0x000073a135800000)
        librustc_driver-cf038663a889d84a.so => /home/user/.rustup/toolchains/1.77-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-cf038663a889d84a.so (0x000073a12fa00000)
        libstd-2d08990d644ac786.so => /home/user/.rustup/toolchains/1.77-x86_64-unknown-linux-gnu/bin/../lib/libstd-2d08990d644ac786.so (0x000073a1360c3000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x000073a1360be000)
        librt.so.1 => /usr/lib/librt.so.1 (0x000073a1360b9000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x000073a1360b2000)
        libc.so.6 => /usr/lib/libc.so.6 (0x000073a135bc5000)
        libLLVM-17-rust-1.77.2-stable.so => /home/user/.rustup/toolchains/1.77-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-17-rust-1.77.2-stable.so (0x000073a127e00000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000073a136084000)
        libm.so.6 => /usr/lib/libm.so.6 (0x000073a135ad6000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000073a1361f2000)
        libz.so.1 => /usr/lib/libz.so.1 (0x000073a135abb000)

stable 1.8

ldd $(rustc --print sysroot)/bin/rustc
: CommandLine Error: Option 'disable-auto-upgrade-debug-info' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
        linux-vdso.so.1 (0x00007167edf5f000)
        /usr/NX/lib/libnxegl.so (0x00007167ed000000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007167ededc000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x00007167ede01000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007167eca00000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007167ed531000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007167eddd3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007167ed442000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007167ed251000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007167eddcc000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007167eddc7000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007167eddc2000)
        libnghttp3.so.9 => /usr/lib/libnghttp3.so.9 (0x00007167edd9f000)
        libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x00007167edd73000)
        libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007167ed22f000)
        libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007167ecfb7000)
        libpsl.so.5 => /usr/lib/libpsl.so.5 (0x00007167ed21b000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007167ecf64000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007167ec921000)
        libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007167ecf55000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007167ecf3c000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007167edf61000)
        libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007167ec771000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007167ec6ac000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007167ecf0f000)
        libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007167ed215000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007167ecf01000)
        libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007167ed20e000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007167eceef000)
        libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007167ec689000)

@saethlin
Copy link
Member

Either that's a rustc distributed by your system package manager, or something is very strange/broken about your system. I think /usr/NX/lib/libnxegl.so is part of NoMachine, and there is no reason that rustc should be having anything to do with remote desktop software.

@uberkael
Copy link

uberkael commented Sep 27, 2024

Wow, that's really strange. Uninstalling NoMachine AUR Package made the stable toolchain (and others) usable.

info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
 stable-x86_64-unknown-linux-gnu installed - rustc 1.81.0 (eeb90cda1 2024-09-04)

However, when I run Cargo (which works), it throws multiple NX-related errors (wtf?):

cargo run
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/NX/lib/libnxegl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
   Compiling anyhow v1.0.89
   Compiling cute v0.3.0
....

Image

How is this possible?
I’ve noticed the same issue on another Arch-based machine as well.

Update: After a restart the errors are gone.

@uberkael
Copy link

uberkael commented Sep 27, 2024

Updated results:

ldd $(rustc --print sysroot)/bin/rustc
        linux-vdso.so.1 (0x000077dcb0471000)
        librustc_driver-3f4ebb066deec3c0.so => /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-3f4ebb066deec3c0.so (0x000077dca9400000)
        libstd-1c4b19562077c20d.so => /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/libstd-1c4b19562077c20d.so (0x000077dcb033d000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x000077dcb02ee000)
        librt.so.1 => /usr/lib/librt.so.1 (0x000077dcb02e9000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x000077dcb02e4000)
        libc.so.6 => /usr/lib/libc.so.6 (0x000077dcafe0f000)
        libLLVM.so.18.1-rust-1.81.0-stable => /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.81.0-stable (0x000077dca1a00000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000077dcb02b4000)
        libm.so.6 => /usr/lib/libm.so.6 (0x000077dca9311000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000077dcb0473000)
        libz.so.1 => /usr/lib/libz.so.1 (0x000077dcb029b000)

@saethlin
Copy link
Member

saethlin commented Sep 27, 2024

I believe this is a known issue with NoMachine. After seeing their forum... I wouldn't touch this software myself. https://forum.nomachine.com/topic/after-uninstall-all-programs-look-for-usr-nx-lib-libnxegl-so

I don't know what it is doing to hijack your system like this, but that is Quite Bad.

Most likely instead of a reboot you could have refreshed the ld.so cache, ldconfig -p I think.

@saethlin saethlin added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues.
Projects
None yet
Development

No branches or pull requests

5 participants