Source: gauche
Version: 0.9.15-p2+20241205-4.1
Tags: patch
User: [email protected]
Usertags: ftcbfs

gauche fails to cross build from source. The immediate failure is due to
not finding libatomic-ops. The relevant configure check is pessimistic
about atomic compiler intrinsics and opts for libatomic-ops as a
fallback. The gcc provided by Debian does provide suitable intrinsics,
so telling configure about that choice explicitly makes it move forward.

Later, the build system expect a native gauche to be installed to run
scheme code during build. This is specific to cross building and we need
to ensure that gauche as well as the dbm module are available. This is
expressed as a recursive build dependency annotated with the <cross>
profile. Since it is a positive profile, it does not affect native
builds.

Please consider applying the attached patch as it makes gauche cross
buildable.

Helmut
diff -Nru gauche-0.9.15-p2+20241205/debian/changelog 
gauche-0.9.15-p2+20241205/debian/changelog
--- gauche-0.9.15-p2+20241205/debian/changelog  2026-01-01 19:37:57.000000000 
+0100
+++ gauche-0.9.15-p2+20241205/debian/changelog  2026-01-29 10:41:52.000000000 
+0100
@@ -1,3 +1,12 @@
+gauche (0.9.15-p2+20241205-4.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Explicitly disable libatomic-ops.
+    + Add self-dependency for cross building.
+
+ -- Helmut Grohne <[email protected]>  Thu, 29 Jan 2026 10:41:52 +0100
+
 gauche (0.9.15-p2+20241205-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru gauche-0.9.15-p2+20241205/debian/control 
gauche-0.9.15-p2+20241205/debian/control
--- gauche-0.9.15-p2+20241205/debian/control    2026-01-01 19:37:57.000000000 
+0100
+++ gauche-0.9.15-p2+20241205/debian/control    2026-01-29 10:41:52.000000000 
+0100
@@ -3,7 +3,9 @@
 Priority: optional
 Maintainer: NIIBE Yutaka <[email protected]>
 Uploaders: YAEGASHI Takeshi <[email protected]>, Jens Thiele <[email protected]>
-Build-Depends: dpkg-dev (>= 1.22.5), debhelper (>= 13~), libgdbm-dev (>= 1.18),
+Build-Depends: dpkg-dev (>= 1.22.5), debhelper (>= 13~), gauche:native <cross>,
+        gauche-gdbm:native <cross>,
+        libgdbm-dev (>= 1.18),
        libtool, pkgconf, zlib1g-dev, netbase, texinfo, libcrypt-dev,
        openssl, libmbedtls-dev, debhelper-compat (= 13)
 Standards-Version: 4.5.1
diff -Nru gauche-0.9.15-p2+20241205/debian/rules 
gauche-0.9.15-p2+20241205/debian/rules
--- gauche-0.9.15-p2+20241205/debian/rules      2024-12-17 06:25:34.000000000 
+0100
+++ gauche-0.9.15-p2+20241205/debian/rules      2026-01-29 10:41:51.000000000 
+0100
@@ -17,6 +17,7 @@
        dh_auto_configure -- --libdir=\$${prefix}/lib 
--libexecdir=\$${prefix}/lib \
          --enable-multibyte=utf-8 --enable-ipv6 --enable-threads=pthreads \
          --with-slib=/usr/share/slib --with-tls=mbedtls \
+         --with-libatomic-ops=none \
          EXTRA_TEST_LIBS=-lpthread
 
 override_dh_auto_build:

Reply via email to