Skip to content

Comments

Use portable-atomic on platforms without u64 atomics#148

Open
linkmauve wants to merge 1 commit intotesselode:mainfrom
linkmauve:portable-atomic
Open

Use portable-atomic on platforms without u64 atomics#148
linkmauve wants to merge 1 commit intotesselode:mainfrom
linkmauve:portable-atomic

Conversation

@linkmauve
Copy link

@linkmauve linkmauve commented Jan 3, 2026

This has been tested on powerpc-unknown-linux-gnu, which supports atomics only up to u32. Without this commit, building kira would fail with:

error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
 --> crates/kira/src/backend/cpal/desktop/stream_manager.rs:6:24
  |
6 |         atomic::{AtomicBool, AtomicU64, Ordering},
  |                              ^^^^^^^^^
  |                              |
  |                              no `AtomicU64` in `sync::atomic`
  |                              help: a similar name exists in the module: `AtomicU32`

Edit: This also depends on not-fl3/quad-rand#23 in order to make the whole testsuite pass, but can be merged independently.

This has been tested on powerpc-unknown-linux-gnu, which supports
atomics only up to u32.  Without this commit, building kira would fail
with:
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
 --> crates/kira/src/backend/cpal/desktop/stream_manager.rs:6:24
  |
6 |         atomic::{AtomicBool, AtomicU64, Ordering},
  |                              ^^^^^^^^^
  |                              |
  |                              no `AtomicU64` in `sync::atomic`
  |                              help: a similar name exists in the module: `AtomicU32`
@linkmauve
Copy link
Author

I just rebased that PR on top of latest main, nothing much was changed but there was a merge conflict.

@tesselode
Copy link
Owner

Which test isn't passing? I'm unclear on what this has to do with quad-rand.

@linkmauve
Copy link
Author

linkmauve commented Feb 18, 2026

quad-rand just has the exact same issue as kira, it also uses AtomicU64 for its prng, which isn’t available on PowerPC so it also doesn’t build there.

This PR is the only one required to make kira work on Linux on the Wii, but I’ve also sent a PR to quad-rand to also make kira’s testsuite compile there.

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

Successfully merging this pull request may close these issues.

2 participants