librespot-org / librespot

Open Source Spotify client library
MIT License
4.7k stars 573 forks source link

Compile error: playback/src/mixer/softmixer.rs:1:25 unresolved import `std::sync::atomic::AtomicU64` #1078

Closed pejobo closed 1 year ago

pejobo commented 1 year ago

Describe the bug I use the docker image for cross compile (with the change described in #994) and get a compile error (see below). To reproduce Steps to reproduce the behavior:

  1. Follow cross compile description in wiki, but patch Dockerfile to use debian:bullseye
  2. See error

Log

   Compiling librespot-playback v0.4.2 (/src/playback)
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
 --> playback/src/mixer/softmixer.rs:1:25
  |
1 | use std::sync::atomic::{AtomicU64, Ordering};
  |                         ^^^^^^^^^
  |                         |
  |                         no `AtomicU64` in `sync::atomic`
  |                         help: a similar name exists in the module: `AtomicU8`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `librespot-playback` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

Host (what you are running librespot on): does not apply

Additional context does not apply

roderickvd commented 1 year ago

I don’t know, I don’t use docker. Doesn’t it support 64-bit atomic? What is the host platform? And which Rust version does it run?

pejobo commented 1 year ago

The container sources rust from https://sh.rustup.rs, see https://github.com/librespot-org/librespot/blob/dev/contrib/Dockerfile#L29 So I assume it's the latest stable rust version.

Host platform is Debian bullseye (this is my modification to the Dockerfile linked above, see #994 for the reasons for this change).

pejobo commented 1 year ago

Sorry, I rebuild the container and the problem vanished. Closing.