Skip to content

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

Closed
@andreas-schwab

Description

@andreas-schwab

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

Activity

added
A-codegenArea: Code generation
A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
C-bugCategory: This is a bug.
O-PowerPCTarget: PowerPC processors
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Jul 1, 2019
jonas-schievink

jonas-schievink commented on Jul 1, 2019

@jonas-schievink
Contributor

A PowerPC miscompilation I guess?

hellow554

hellow554 commented on Jul 1, 2019

@hellow554
Contributor

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

mati865

mati865 commented on Jul 1, 2019

@mati865
Member

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

hellow554 commented on Jul 1, 2019

@hellow554
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

jonas-schievink commented on Jul 1, 2019

@jonas-schievink
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.O-PowerPCTarget: PowerPC processorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hellow554@mati865@jonas-schievink@andreas-schwab

        Issue actions

          error[E0432]: unresolved import `std::sync::atomic::AtomicU64` · Issue #62269 · rust-lang/rust