Source: gdb Version: 17.1-1 Tags: patch User: [email protected] Usertags: cross-satisfiability ftcbfs
gdb fails to cross build from source for three distinct reasons. 1. The build-dependency on gobjc is not satisfiable. It is a toolchain dependendency and needs to specify what the compiler is being used for. Most commonly, one targeting the host architecture is needed. This is achieved by using gobjc-for-host. 2. The build-dependency on python3-dev is not installable. It implies a host architecture Python interpreter. Python extensions should depend on python3-dev:native plus libpython3-dev instead. 3. In bfd/doc, chew.c uses host compiler flags with the build compiler. This fails badly when compiling for amd64 or arm64. I'm attaching a patch that addresses all mentioned issues. Please consider applying it. The part fixing chew.c should be suitable for upstream inclusion. Helmut
diff -Nru gdb-17.1/debian/changelog gdb-17.1/debian/changelog --- gdb-17.1/debian/changelog 2025-12-21 21:09:18.000000000 +0100 +++ gdb-17.1/debian/changelog 2026-01-02 16:00:54.000000000 +0100 @@ -1,3 +1,13 @@ +gdb (17.1-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Cross-translate gobjc build dependency. + + Multiarchify Python build dependency. + + cross.patch: Use host flags for chew.c. + + -- Helmut Grohne <[email protected]> Fri, 02 Jan 2026 16:00:54 +0100 + gdb (17.1-1) unstable; urgency=medium * d/salsa-ci.yml: Ignore debian/experimental branch. diff -Nru gdb-17.1/debian/control gdb-17.1/debian/control --- gdb-17.1/debian/control 2025-12-12 04:19:38.000000000 +0100 +++ gdb-17.1/debian/control 2026-01-02 16:00:54.000000000 +0100 @@ -17,7 +17,7 @@ dejagnu, flex, procps, - gobjc, + gobjc-for-host, mig [hurd-any], # TeX[info] deps texinfo (>= 4.7-2.2), @@ -36,7 +36,8 @@ libmpfr-dev, pkgconf, # Python build - python3-dev, + libpython3-dev, + python3-dev:native, libunwind-dev [ia64], # debuginfod libdebuginfod-dev [linux-any], diff -Nru gdb-17.1/debian/patches/cross.patch gdb-17.1/debian/patches/cross.patch --- gdb-17.1/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gdb-17.1/debian/patches/cross.patch 2026-01-02 16:00:54.000000000 +0100 @@ -0,0 +1,26 @@ +--- gdb-17.1.orig/bfd/doc/local.mk ++++ gdb-17.1/bfd/doc/local.mk +@@ -79,8 +79,8 @@ + + $(MKDOC): %D%/chew.stamp ; @true + %D%/chew.stamp: $(srcdir)/%D%/chew.c %D%/$(am__dirstamp) +- $(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS) \ +- $(WARN_CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ ++ $(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ ++ $(WARN_CFLAGS) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ + -I. -I$(srcdir) -I%D% -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ + $(srcdir)/%D%/chew.c && \ + $(SHELL) $(srcdir)/../move-if-change \ +--- gdb-17.1.orig/bfd/Makefile.in ++++ gdb-17.1/bfd/Makefile.in +@@ -2486,8 +2486,8 @@ coff-tic54x.lo: coff-tic54x.c + + $(MKDOC): doc/chew.stamp ; @true + doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp) +- $(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS) \ +- $(WARN_CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ ++ $(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ ++ $(WARN_CFLAGS) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ + -I. -I$(srcdir) -Idoc -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ + $(srcdir)/doc/chew.c && \ + $(SHELL) $(srcdir)/../move-if-change \ diff -Nru gdb-17.1/debian/patches/series gdb-17.1/debian/patches/series --- gdb-17.1/debian/patches/series 2025-12-21 20:52:24.000000000 +0100 +++ gdb-17.1/debian/patches/series 2026-01-02 16:00:54.000000000 +0100 @@ -2,3 +2,4 @@ fix-blhc-libiberty.patch fix-blhc-chew.patch gfdl-dont-build-manpages.patch +cross.patch

