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

the name _critical_section_1_0_acquire is defined multiple times #509

Closed
9names opened this issue Nov 30, 2022 · 2 comments
Closed

the name _critical_section_1_0_acquire is defined multiple times #509

9names opened this issue Nov 30, 2022 · 2 comments

Comments

@9names
Copy link
Member

9names commented Nov 30, 2022

We had to update our version of critical_section, since critical_section 0.2.0 will silently break when mixed with critical_section 1.0.
If you see the above error message, you need to update your dependency to rp2040-hal v0.6.1 (or downgrade to an older version of the HAL)
Sorry for any inconvenience!

Full error for anyone who needs more context:

 Compiling rp2040-hal v0.6.0 (/home/nine/vc/rust/rp2040/rphal-update/rp2040-hal)
error[E0428]: the name `_critical_section_1_0_acquire` is defined multiple times
 --> rp2040-hal/src/critical_section_impl.rs:5:1
  |
5 | critical_section_0_2::custom_impl!(RpSpinlockCs);
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `_critical_section_1_0_acquire` redefined here
6 | #[cfg(feature = "critical-section-impl")]
7 | critical_section::set_impl!(RpSpinlockCs);
  | ----------------------------------------- previous definition of the value `_critical_section_1_0_acquire` here
  |
  = note: `_critical_section_1_0_acquire` must be defined only once in the value namespace of this module
  = note: this error originates in the macro `critical_section_0_2::custom_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

Please comment or emote on this issue if you've hit this problem so we have an idea of how many people are affected.
Also: feel free to ask if you don't know how to resolve this.

@jannic jannic pinned this issue Feb 14, 2023
@jannic
Copy link
Member

jannic commented May 14, 2023

I think this change old enough that we can close the ticket now. We can leave it pinned so it'll still show up on top of https://github.com/rp-rs/rp-hal/issues. @9names, do you agree?

@9names
Copy link
Member Author

9names commented May 14, 2023

Sounds good to me

@jannic jannic closed this as completed May 14, 2023
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

No branches or pull requests

2 participants