Bug#1119129: libgda5 FTCBFS: multiple reasons
Helmut Grohne
helmut at subdivi.de
Mon Oct 27 05:05:13 GMT 2025
Source: libgda5
Version: 5.2.10-7
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
libgda5 fails to cross build from source for three relatively distinct
reasons.
It fails running vapigen. This tool recently gained a host prefix to
accommodate cross building, but libgda5 uses it by its unprefixed name.
Changing AC_PATH_PROG to AC_PATH_TOOL fixes this in a
backwards-compatible way.
Next up, the gtk-doc scanner fails. This is a common theme and mostly
unfixable. However, libgda5 - like many other packages - separates its
documentation into an arch:all package. As such, there is no need to run
the scanner during an arch-only build and disabling gtk-doc both speeds
up such a build and helps cross building. Using reproducible builds, I
verified that this change does not alter output artifacts.
Last but not least, it fails to discover mysql support, because it only
queries mysql_config and that happens to not work during cross building.
We prefer using pkg-config for it, so I suggest adding pkg-config as
another possible detection mechanism.
You'll find all mentioned changes in the attached patch. Once applying
it, libgda5 cross builds successfully.
Helmut
-------------- next part --------------
diff -Nru libgda5-5.2.10/debian/changelog libgda5-5.2.10/debian/changelog
--- libgda5-5.2.10/debian/changelog 2025-09-14 01:04:47.000000000 +0200
+++ libgda5-5.2.10/debian/changelog 2025-10-10 21:55:01.000000000 +0200
@@ -1,3 +1,13 @@
+libgda5 (5.2.10-7.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Look for vapigen using AC_PATH_TOOL.
+ + Look for libmysqlclient using pkg-config.
+ + Disable gtk-doc in arch-only build.
+
+ -- Helmut Grohne <helmut at subdivi.de> Fri, 10 Oct 2025 21:55:01 +0200
+
libgda5 (5.2.10-7) unstable; urgency=medium
* Fix dh_missing for the architecture-independent build
diff -Nru libgda5-5.2.10/debian/patches/cross.patch libgda5-5.2.10/debian/patches/cross.patch
--- libgda5-5.2.10/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ libgda5-5.2.10/debian/patches/cross.patch 2025-10-10 21:55:01.000000000 +0200
@@ -0,0 +1,50 @@
+--- libgda5-5.2.10.orig/configure.ac
++++ libgda5-5.2.10/configure.ac
+@@ -522,7 +522,7 @@
+ enable_vala=no
+ fi
+
+-AC_PATH_PROG(VAPIGEN, [vapigen], [no])
++AC_PATH_TOOL(VAPIGEN, [vapigen], [no])
+
+ if test x$VAPIGEN = xno -a x$enable_vala = xyes
+ then
+--- libgda5-5.2.10.orig/m4/mysql.m4
++++ libgda5-5.2.10/m4/mysql.m4
+@@ -95,19 +95,23 @@
+ [mysql_loclibdir=$withval])
+
+ # try with the default available mysql_config
+- if test $try_mysql = true -a "x$mysql_test_dir" = x
+- then
+- AC_PATH_PROGS(MYSQL_CONFIG, mysql_config mysql_config5)
+- if test "x$MYSQL_CONFIG" != x
+- then
+- pkgmysql=yes
+- MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
+- MYSQL_LIBS=`$MYSQL_CONFIG --libs`
+- mysql_version=`$MYSQL_CONFIG --version`
+- else
+- mysql_test_dir="/usr /usr/local /opt/gnome"
+- fi
+- fi
++ AS_IF([test $try_mysql = true -a "x$mysql_test_dir" = x],[
++ PKG_CHECK_MODULES([MYSQL],[mysqlclient],[
++ pkgmysql=yes
++ mysql_version=`$PKG_CONFIG --modversion mysqlclient`
++ ],[
++ AC_PATH_PROGS(MYSQL_CONFIG, mysql_config mysql_config5)
++ if test "x$MYSQL_CONFIG" != x
++ then
++ pkgmysql=yes
++ MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
++ MYSQL_LIBS=`$MYSQL_CONFIG --libs`
++ mysql_version=`$MYSQL_CONFIG --version`
++ else
++ mysql_test_dir="/usr /usr/local /opt/gnome"
++ fi
++ ])
++ ])
+
+ # try to locate mysql_config in places in $mysql_test_dir
+ if test $try_mysql = true
diff -Nru libgda5-5.2.10/debian/patches/series libgda5-5.2.10/debian/patches/series
--- libgda5-5.2.10/debian/patches/series 2025-09-14 01:04:47.000000000 +0200
+++ libgda5-5.2.10/debian/patches/series 2025-10-10 21:54:47.000000000 +0200
@@ -5,3 +5,4 @@
gcc-14-compat-1075169.patch
enable-ssl-ca-993592.patch
error-function-declaration-without-prototype.patch
+cross.patch
diff -Nru libgda5-5.2.10/debian/rules libgda5-5.2.10/debian/rules
--- libgda5-5.2.10/debian/rules 2025-09-14 01:04:47.000000000 +0200
+++ libgda5-5.2.10/debian/rules 2025-10-10 21:55:01.000000000 +0200
@@ -36,7 +36,7 @@
--enable-introspection \
--enable-vala \
--disable-crypto \
- --enable-gtk-doc
+ --$(if $(filter libgda-5.0-doc,$(shell dh_listpackages)),en,dis)able-gtk-doc
execute_after_dh_auto_install:
# Drop trml2{html,pdf} python2 tools, build system in future 6.0/master
More information about the pkg-gnome-maintainers
mailing list