* [Buildroot] [PATCH] package/dtui: require 64-bit atomic support
@ 2026-08-29 11:01 Christopher Obbard via buildroot
2026-08-29 21:12 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Obbard via buildroot @ 2026-08-29 11:01 UTC (permalink / raw)
To: buildroot; +Cc: Christopher Obbard, Christopher Obbard
dtui depends on tui-textarea which unconditionally imports AtomicU64 in
src/widget.rs to pack a viewport rectangle into a single atomic word:
use std::sync::atomic::{AtomicU64, Ordering};
pub struct Viewport(AtomicU64);
As there is no cfg(target_has_atomic) guard in tui-textarea, its
build fails on any target for which rustc does not provide 64-bit
atomics with:
Compiling tui-textarea v0.7.0
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
--> .../dtui-3.0.0/VENDOR/tui-textarea/src/widget.rs:10:25
|
10 | use std::sync::atomic::{AtomicU64, Ordering};
| ^^^^^^^^^ no `AtomicU64` in `sync::atomic`
|
help: a similar name exists in the module
|
10 - use std::sync::atomic::{AtomicU64, Ordering};
10 + use std::sync::atomic::{AtomicU32, Ordering};
This has been reported to tui-textarea upstream, but unfortunately the
project seems to be unmaintained (issue linked below). A sane workaround
is to disable the package on targets which lack 64-bit atomic support.
Of all the rust targets buildroot can generate (see RUST_TARGETS in
utils/update-rust), three lack 64-bit atomic support:
$ rustc --print cfg --target <target> | grep target_has_atomic
armv5te-unknown-linux-gnueabi "16" "32" "8" "ptr"
armv5te-unknown-linux-musleabi "16" "32" "8" "ptr"
powerpc-unknown-linux-gnu "16" "32" "8" "ptr"
The armv6 and armv7 targets, for comparison, are fine:
arm-unknown-linux-gnueabi "16" "32" "64" "8" "ptr"
armv7-unknown-linux-gnueabihf "16" "32" "64" "8" "ptr"
The armv5te targets come from BR2_ARM_CPU_ARMV5 and the powerpc target
from BR2_powerpc, which is 32-bit only. Disable the package for both.
The uclibc variants of these architectures are already excluded as
BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS only covers armv5te and
32-bit powerpc for glibc and musl.
Build tested with utils/test-pkg against:
- BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE
- BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_MUSL_STABLE
- BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_GLIBC_STABLE
all three fail with the above error before this change and are skipped
after it, while armv7 (glibc and musl), aarch64, powerpc64le and x86-64
still select and build the package.
The same problem was hit by package/dust and worked around in commit
3abc3b97bad9 ("package/dust: bump to version 1.1.2") by bumping to a
version in which upstream had added the missing guard. That is not an
option here as tui-textarea 0.7.0 is the latest release.
As a follow-up it could be worth adding a
BR2_PACKAGE_HOST_RUSTC_TARGET_HAS_ATOMIC_64 symbol to
package/rustc/Config.in.host, defaulting to y everywhere except the three
target combinations listed above. Packages could then express this
constraint as a single dependency and it would stay correct as rust
gains new targets.
Link: https://github.com/rhysd/tui-textarea/issues/66
Fixes: https://autobuild.buildroot.org/results/188f6442371500731453f75983590c922eab6d57
Fixes: https://autobuild.buildroot.org/results/e254db2654f18f1d2110eb8b1a32b43ad0f2a3d6
Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
---
package/dtui/Config.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/dtui/Config.in b/package/dtui/Config.in
index 65d51df7d5..31e337a5e0 100644
--- a/package/dtui/Config.in
+++ b/package/dtui/Config.in
@@ -3,6 +3,10 @@ config BR2_PACKAGE_DTUI
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
depends on BR2_USE_MMU # dbus
+ # tui-textarea unconditionally uses AtomicU64, which rustc does
+ # not provide on armv5te or 32-bit powerpc.
+ depends on !BR2_ARM_CPU_ARMV5
+ depends on !BR2_powerpc
select BR2_PACKAGE_DBUS # runtime
select BR2_PACKAGE_HOST_RUSTC
help
---
base-commit: e991fa071605a78c17adba2ed26e07c3b8c95583
change-id: 20260822-wip-obbardc-package-dtui-fix-armv5-832655f4860b
Best regards,
--
Christopher Obbard <chris.obbard@oss.qualcomm.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/dtui: require 64-bit atomic support
2026-08-29 11:01 [Buildroot] [PATCH] package/dtui: require 64-bit atomic support Christopher Obbard via buildroot
@ 2026-08-29 21:12 ` Thomas Petazzoni via buildroot
2026-08-31 15:53 ` Chris Obbard via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-29 21:12 UTC (permalink / raw)
To: Christopher Obbard; +Cc: buildroot, Christopher Obbard
Hello Christopher,
On Sat, Aug 29, 2026 at 12:01:02PM +0100, Christopher Obbard via buildroot wrote:
> As a follow-up it could be worth adding a
> BR2_PACKAGE_HOST_RUSTC_TARGET_HAS_ATOMIC_64 symbol to
> package/rustc/Config.in.host, defaulting to y everywhere except the three
> target combinations listed above. Packages could then express this
> constraint as a single dependency and it would stay correct as rust
> gains new targets.
Yes, please add this. It will be much more explicit and logical. Maybe:
config BR2_PACKAGE_HOST_RUSTC_ARCH_HAS_ATOMIC_U64
Could you prepare a v2 with this?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/dtui: require 64-bit atomic support
2026-08-29 21:12 ` Thomas Petazzoni via buildroot
@ 2026-08-31 15:53 ` Chris Obbard via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Chris Obbard via buildroot @ 2026-08-31 15:53 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Christopher Obbard
Hi Thomas,
On Sat, Aug 29, 2026 at 10:12 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Christopher,
>
> On Sat, Aug 29, 2026 at 12:01:02PM +0100, Christopher Obbard via buildroot wrote:
>
> > As a follow-up it could be worth adding a
> > BR2_PACKAGE_HOST_RUSTC_TARGET_HAS_ATOMIC_64 symbol to
> > package/rustc/Config.in.host, defaulting to y everywhere except the three
> > target combinations listed above. Packages could then express this
> > constraint as a single dependency and it would stay correct as rust
> > gains new targets.
>
> Yes, please add this. It will be much more explicit and logical. Maybe:
>
> config BR2_PACKAGE_HOST_RUSTC_ARCH_HAS_ATOMIC_U64
>
> Could you prepare a v2 with this?
I just sent a v2, but I forgot to change the config name, even though
your mail was right in front of me. Oops! I will send that in v3 along
with any other feedback.
Cheers!
Chris
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-29 11:01 [Buildroot] [PATCH] package/dtui: require 64-bit atomic support Christopher Obbard via buildroot
2026-08-29 21:12 ` Thomas Petazzoni via buildroot
2026-08-31 15:53 ` Chris Obbard via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.