Skip to content

Don't depends inconditionally on critical-section for portable-atomic #6713

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ogoffart
Copy link
Member

This should fix the compilation (link) of the esp-edf build for esp32s2 in the nightly test CI, as that platform doesn't have atomic, and also we don't provide an implementation of the critical-section function from the slint-cpp crate.

Use the unsafe-single-threaded feature instead.

CC #5057

@ogoffartogoffart requested a review from tronical November 4, 2024 09:52
tronical added a commit that referenced this pull request Nov 26, 2024
This configuration has been causing build issues for many weeks now and this isn't something we've ever seen in production.

cc #6713
tronical added a commit that referenced this pull request Nov 26, 2024
This configuration has been causing build issues for many weeks now and this isn't something we've ever seen in production.

cc #6713
@Song-aff
Copy link

Just wanted to check in—could you kindly update me on the progress of the submission merge?

This should fix the compilation (link) of the esp-edf build for esp32s2
in the nightly test CI, as that platform doesn't have atomic, and also
we don't provide an implementation of the critical-section function from
the slint-cpp crate.

Use the unsafe-single-threaded feature instead.

CC #5057
@ogoffart
Copy link
Member Author

This fails CI in several jobs because

 error: `portable_atomic_unsafe_assume_single_core` cfg (`unsafe-assume-single-core` feature) is not compatible with target that supports atomic CAS;
       see also <https://.com/taiki-e/portable-atomic/issues/148> for troubleshooting
   --> /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/portable-atomic-1.11.0/src/lib.rs:355:1
    |
355 | / compile_error!(
356 | |     "`portable_atomic_unsafe_assume_single_core` cfg (`unsafe-assume-single-core` feature) \
357 | |      is not compatible with target that supports atomic CAS;\n\
358 | |      see also <https://.com/taiki-e/portable-atomic/issues/148> for troubleshooting"
359 | | );
    | |_^

As we enable the Slint's unsafe-single-threaded via the --all-features in our CI. And also for some MCU platform that have atomic CAS.

So this is not a solution. Looks like we'll have to enable the critical-section feature in the compat feature enabled by default.

Sign up for free to join this conversation on . 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