From b71b14793ac4b45f3058528b4d8452d47e617d90 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 31 May 2026 16:38:19 +0200 Subject: [PATCH] package/sane-airscan: needs BR2_TOOLCHAIN_HAS_SYNC_4 Fixes a build error output/per-package/sane-airscan/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libsane-airscan.so.1.p/airscan-http.c.o: in function `http_data_ref': airscan-http.c:(.text+0x1c88): undefined reference to `__sync_fetch_and_add_4' output/per-package/sane-airscan/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libsane-airscan.so.1.p/airscan-http.c.o: in function `http_data_unref': airscan-http.c:(.text+0x1cd0): undefined reference to `__sync_sub_and_fetch_4' output/per-package/sane-airscan/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libsane-airscan.so.1.p/airscan-trace.c.o: in function `trace_ref': airscan-trace.c:(.text+0x32c): undefined reference to `__sync_fetch_and_add_4' output/per-package/sane-airscan/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libsane-airscan.so.1.p/airscan-trace.c.o: in function `trace_unref': airscan-trace.c:(.text+0x358): undefined reference to `__sync_sub_and_fetch_4' with this defconfig BR2_sparc=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_STABLE=y BR2_PACKAGE_SANE_AIRSCAN=y detected by the Gitlab pipelines while testing to bump of sane-backends to 1.4.0 in this series. The build error is caused by an upstream commit added in 2020 to version 0.99.14: https://github.com/alexpevzner/sane-airscan/commit/fccd8402a6bc5fce22805edf4e0fb6b0f24479e7 so a backport to LTS branches should be considered because the initial version of the buildroot package was 0.99.33, added with commit f78280bf262ceb1c1abbdade9de77fcc4add74ae. An autobuilder error was not recorded yet because it is masked by various build errors of the sane-backends package which are resolved by its bump to 1.4.0 in this series. Signed-off-by: Bernd Kuhls Signed-off-by: Arnout Vandecappelle --- package/sane-airscan/Config.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/sane-airscan/Config.in b/package/sane-airscan/Config.in index 2324a3f661..63ef06b582 100644 --- a/package/sane-airscan/Config.in +++ b/package/sane-airscan/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_SANE_AIRSCAN bool "sane-airscan" depends on BR2_INSTALL_LIBSTDCPP depends on !BR2_STATIC_LIBS # avahi, gnutls, sane-backends + depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on BR2_TOOLCHAIN_HAS_THREADS # avahi, dbus depends on BR2_USE_WCHAR # avahi, gnutls depends on BR2_USE_MMU # dbus, sane-backends @@ -26,5 +27,6 @@ config BR2_PACKAGE_SANE_AIRSCAN comment "sane-airscan needs a toolchain w/ wchar, dynamic library, threads, C++" depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP