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

error[E0432]: unresolved import std::sync::atomic::AtomicU64 #62269

Closed
andreas-schwab opened this issue Jul 1, 2019 · 5 comments
Closed

error[E0432]: unresolved import std::sync::atomic::AtomicU64 #62269

andreas-schwab opened this issue Jul 1, 2019 · 5 comments
Labels
A-codegen Area: Code generation A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@andreas-schwab
Copy link

https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:Factory/rust/p/ppc

Dist RLS stage2 (powerpc-unknown-linux-gnu)
Building stage2 tool clippy-driver (powerpc-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.59s
Building stage2 tool rls (powerpc-unknown-linux-gnu)
Compiling rls v1.35.0 (/home/abuild/rpmbuild/BUILD/rustc-1.35.0-src/src/tools
/rls)
error[E0432]: unresolved import std::sync::atomic::AtomicU64
--> src/tools/rls/rls/src/cmd.rs:10:25
|
10 | use std::sync::atomic::{AtomicU64, Ordering};
| ^^^^^^^^^
| |
| no AtomicU64 in sync::atomic
| help: a similar name exists in the module: AtomicU16

error[E0432]: unresolved import std::sync::atomic::AtomicU64
--> src/tools/rls/rls/src/server/io.rs:10:25
|
10 | use std::sync::atomic::{AtomicU64, Ordering};
| ^^^^^^^^^
| |
| no AtomicU64 in sync::atomic
| help: a similar name exists in the module: AtomicU16

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0432.
error: Could not compile rls.

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/abuild/rpmbuild/BUILD/rust-1.35.0-powerpc-unknown-linux-gnu/usr/bin/cargo" "build" "--target" "powerpc-unknown-linux-gnu" "-j" "8" "--release" "--frozen" "--manifest-path" "/home/abuild/rpmbuild/BUILD/rustc-1.35.0-src/src/tools/rls/Cargo.toml" "--features" "clippy" "--message-format" "json"
expected success, got: exit code: 101
thread 'main' panicked at 'Unable to build RLS', src/bootstrap/dist.rs:65:9
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.
failed to run: /home/abuild/rpmbuild/BUILD/rustc-1.35.0-src/build/bootstrap/debug/bootstrap install

@jonas-schievink jonas-schievink added A-codegen Area: Code generation A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 1, 2019
@jonas-schievink
Copy link
Contributor

jonas-schievink commented Jul 1, 2019

A PowerPC miscompilation I guess?

@hellow554
Copy link
Contributor

@andreas-schwab please put the error output into a region surrounded by three backticks (```)

@mati865
Copy link
Contributor

mati865 commented Jul 1, 2019

Enabling RLS tool requires platform to have 64 bit atomics available which isn't true on 32 bit PowerPC.
You can either disable RLS on affected platforms or patch it to work with 32 bit atomics, related RLS PR: rust-lang/rls#910

@hellow554
Copy link
Contributor

https://doc.rust-lang.org/std/sync/atomic/index.html#portability

PowerPC and MIPS platforms with 32-bit pointers do not have AtomicU64 or AtomicI64 types.

@jonas-schievink
Copy link
Contributor

Okay, closing as an expected build failure then. Please open an issue on the RLS repo if this needs fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. O-PowerPC Target: PowerPC processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants