Bug#1123902: brltty FTCBFS: multiple reasons

Helmut Grohne helmut at subdivi.de
Tue Dec 23 20:54:53 GMT 2025


Source: brltty Version: 6.8-4 Tags: patch
User: debian-cross at lists.debian.org
Usertags: cross-satisfiability ftcbfs

brltty fails to cross build from source for a fair number of reasons.

1. Build-Depends are not cross-satisfiable. cython3 is not satisfiable.
   Whilst it may have architecture-dependent behavior, brltty's use is
   ok. Thus it needs to be annotated :native.

2. debian/rules invokes configure directly. In doing so, it misses
   passing --build or --host. Consider using dh_auto_configure.

4. When building the Python extension, the host architecture has to be
   communicated separately via _PYTHON_SYSCONFIGDATA_NAME.

3. Additionally, cross building requires libpython3-all-dev for the
   host architecture. This is not implied in python3-all-dev:any.

5. The Java compiler is being run. Thus a native development kit is
   needed.

6. The EuroBraille driver lacks rules for building the eutp objects.
   Linking eutp fails finding them. I'm not sure how this works in a
   native build. However, adding the missing rule makes it work.

You can find all of the necessary changes in the attached patch. Please
consider applying it as it makes brltty cross buildable.

Helmut
-------------- next part --------------
diff -Nru brltty-6.8/debian/changelog brltty-6.8/debian/changelog
--- brltty-6.8/debian/changelog	2025-11-16 18:58:00.000000000 +0100
+++ brltty-6.8/debian/changelog	2025-12-23 19:33:35.000000000 +0100
@@ -1,3 +1,16 @@
+brltty (6.8-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Annotate tool dependencies :native.
+    + Add issing libpython3-all-dev build dependency.
+    + Pass --build and --host to configure.
+    + Tell Python about the host architecture.
+    + Do not use AC_CHECK_FILE for checking headers.
+    + Define missing rules for EuroBraille driver.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 23 Dec 2025 19:33:35 +0100
+
 brltty (6.8-4) unstable; urgency=medium
 
   [ Helmut Grohne ]
diff -Nru brltty-6.8/debian/control brltty-6.8/debian/control
--- brltty-6.8/debian/control	2025-11-09 23:06:01.000000000 +0100
+++ brltty-6.8/debian/control	2025-12-23 19:33:35.000000000 +0100
@@ -9,13 +9,13 @@
 Build-Depends: debhelper-compat (= 13), debhelper (>= 13.11.7), dh-python, dh-strip-nondeterminism, dh-exec,
                pkgconf, tcl,
                libasound2-dev [linux-any],
-               python3-all-dev:any, python3-setuptools,
-               cython3,
+               libpython3-all-dev, python3-all-dev:native, python3-setuptools,
+               cython3:native,
                libexpat1-dev,
                libgpm-dev [linux-any], libsystemd-dev [linux-any],
                libicu-dev, liblouis-dev,
                libpolkit-gobject-1-dev, libcap-dev [linux-any],
-               default-jdk [!hppa !hurd-any !kfreebsd-any],
+               default-jdk:native [!hppa !hurd-any !kfreebsd-any],
                doxygen, linuxdoc-tools, groff,
                flite1-dev, libncurses-dev,
                libx11-dev, libxt-dev, libxaw7-dev,
diff -Nru brltty-6.8/debian/patches/cross.patch brltty-6.8/debian/patches/cross.patch
--- brltty-6.8/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ brltty-6.8/debian/patches/cross.patch	2025-12-23 19:33:35.000000000 +0100
@@ -0,0 +1,24 @@
+--- brltty-6.8.orig/Bindings/Java/bindings.m4
++++ brltty-6.8/Bindings/Java/bindings.m4
+@@ -94,7 +94,7 @@
+    JAVA_JNI_INC="${java_home_directory}/include"
+    JAVA_JNI_HDR="jni.h"
+    JAVA_JNI_FLAGS=""
+-   AC_CHECK_HEADER([${JAVA_JNI_HDR}], [], [AC_CHECK_FILE(["${JAVA_JNI_INC}/${JAVA_JNI_HDR}"], [JAVA_JNI_FLAGS="-I${JAVA_JNI_INC}"], [JAVA_OK=false])])
++   AC_CHECK_HEADER([${JAVA_JNI_HDR}], [], [AS_IF([test -e "${JAVA_JNI_INC}/${JAVA_JNI_HDR}"], [JAVA_JNI_FLAGS="-I${JAVA_JNI_INC}"], [JAVA_OK=false])])
+ 
+    "${JAVA_OK}" && {
+       set -- "${JAVA_JNI_INC}"/*/jni_md.h
+--- brltty-6.8.orig/Drivers/Braille/EuroBraille/Makefile.in
++++ brltty-6.8/Drivers/Braille/EuroBraille/Makefile.in
+@@ -43,6 +43,10 @@
+ 
+ EU_TRANSFER_OBJECTS = eutp_brl.$O eutp_convert.$O eutp_debug.$O eutp_pc.$O eutp_tools.$O eutp_transfer.$O eutp_main.$O
+ 
++$(EU_TRANSFER_OBJECTS):
++	$(CC) $(CFLAGS) -c $(SRC_DIR)/$(@:.$O=.c)
++
++
+ EU_TRANSFER_TOOL = eutp$X
+ EU_TRANSFER_MAN = $(SRC_DIR)/eutp.1
+ 
diff -Nru brltty-6.8/debian/patches/series brltty-6.8/debian/patches/series
--- brltty-6.8/debian/patches/series	2025-11-09 23:06:01.000000000 +0100
+++ brltty-6.8/debian/patches/series	2025-12-23 19:33:35.000000000 +0100
@@ -5,3 +5,4 @@
 noverbose-bluetooth
 noverbose-usbfs
 git-spd-crash
+cross.patch
diff -Nru brltty-6.8/debian/rules brltty-6.8/debian/rules
--- brltty-6.8/debian/rules	2025-11-16 18:53:06.000000000 +0100
+++ brltty-6.8/debian/rules	2025-12-23 19:33:35.000000000 +0100
@@ -23,6 +23,8 @@
 PYVERS := $(shell py3versions --supported --version)
 
 CONFIGURE_OPTIONS = --exec-prefix=/usr \
+		    --build=$(DEB_BUILD_GNU_TYPE) \
+		    --host=$(DEB_HOST_GNU_TYPE) \
 		    --without-theta --without-swift \
 		    JAVA_JNI_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/jni
 
@@ -46,6 +48,12 @@
 CONFIGURE_OPTIONS+=--without-usb-package
 endif
 
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+PYTHON_CROSS_ENV :=
+else
+PYTHON_CROSS_ENV := _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}
+endif
+
 export JAVA_HOME=/usr/lib/jvm/default-java
 
 binary: binary-indep binary-arch
@@ -88,6 +96,7 @@
 	mkdir -p build-py$*
 	cd build-py$* && \
 	PYTHON=/usr/bin/python$* \
+		$(PYTHON_CROSS_ENV) \
 		../configure \
 		$(CONFIGURE_OPTIONS) \
 		$(DEB_CONFIGURE_OPTIONS)
@@ -136,7 +145,7 @@
 
 	# Bug#1028426
 	@echo blhc: ignore-line-regexp: .*Bindings/Python.*
-	$(MAKE) -C build-py$*/Bindings/Python V=1
+	$(PYTHON_CROSS_ENV) $(MAKE) -C build-py$*/Bindings/Python V=1
 
 	touch $@
 
@@ -162,7 +171,7 @@
 
 	$(MAKE) -C build-brltty install install-messages install-appstream install-polkit INSTALL_ROOT=`pwd`/debian/tmp
 	set -e ; for pyver in $(PYVERS); do \
-		$(MAKE) -C build-py$$pyver/Bindings/Python install INSTALL_ROOT=`pwd`/debian/tmp V=1 ; \
+		$(PYTHON_CROSS_ENV) $(MAKE) -C build-py$$pyver/Bindings/Python install INSTALL_ROOT=`pwd`/debian/tmp V=1 ; \
 	done
 
 	mkdir -p `pwd`/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)


More information about the Pkg-a11y-devel mailing list