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

tokio 1.16.1 doesn't compile for mipsel #4469

Closed
spacemeowx2 opened this issue Feb 3, 2022 · 1 comment · Fixed by #4475
Closed

tokio 1.16.1 doesn't compile for mipsel #4469

spacemeowx2 opened this issue Feb 3, 2022 · 1 comment · Fixed by #4475
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-metrics Module: tokio/runtime/metrics

Comments

@spacemeowx2
Copy link

spacemeowx2 commented Feb 3, 2022

Description

Failed at https://github.com/tokio-rs/tokio/blob/tokio-1.16.1/tokio/src/runtime/metrics/worker.rs#L2

   Compiling tokio v1.16.1
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
Error:  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/tokio-1.16.1/src/runtime/metrics/worker.rs:2:25
  |
2 | use std::sync::atomic::{AtomicU64, AtomicUsize};
  |                         ^^^^^^^^^
  |                         |
  |                         no `AtomicU64` in `sync::atomic`
  |                         help: a similar name exists in the module: `AtomicU8`

error[E0599]: no method named `fetch_add` found for struct `AtomicU64` in the current scope
Error:   --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/tokio-1.16.1/src/runtime/metrics/scheduler.rs:25:36
   |
25 |         self.remote_schedule_count.fetch_add(1, Relaxed);
   |                                    ^^^^^^^^^ help: there is an associated function with a similar name: `fetch_or`
   | 
  ::: /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/tokio-1.16.1/src/loom/std/atomic_u64.rs:18:5
   |
18 |     pub(crate) struct AtomicU64 {
   |     --------------------------- method `fetch_add` not found for this

Detailed log

It compiled after I downgraded tokio to 1.15.0. And I guess it's not fixed in #4453

Related

#4452 #4454 #4453

@spacemeowx2 spacemeowx2 added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Feb 3, 2022
@name1e5s
Copy link
Contributor

name1e5s commented Feb 6, 2022

Use atomic primitive types provided by tokio fixes the issue.

@Darksonn Darksonn added the M-metrics Module: tokio/runtime/metrics label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-metrics Module: tokio/runtime/metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants