[Debian-med-packaging] Bug#1153516: arb: FTBFS on 32-bit architectures: arb_progress(const char*, unsigned int) is private

Cheng Li shiptux at gmail.com
Mon Nov 9 13:40:07 GMT 2026


Hi Andreas,

The patch in Git replaces the unsigned long overload instead of adding the
unsigned int one next to it. debian/patches/fix-i386-build.patch as
committed in 282faf2:

  -    arb_progress(const char *title, unsigned long overall_count) { ... }
  +    arb_progress(const char *title, unsigned int overall_count) { ... }

Both have to stay public, because the call sites use both types.
ARB_GDE/GDE_arbdb_io.cxx:236 passes numberspecies, which is declared
unsigned long in the parameter list at GDE_arbdb_io.cxx:49, and that is the
first error in the job you linked:

  GDE_arbdb_io.cxx:236:73: error: 'arb_progress::arb_progress(const char*,
  NUM) [with NUM = long unsigned int]' is private within this context

With unsigned long no longer published, that argument instantiates the
private template with NUM = unsigned long, which is an exact match and so
beats the integral conversion to unsigned int. Same mechanism as the
original bug, other type.

Which also means the committed patch does not fix i386: it moves the failure
from the six size_t sites to the unsigned long one. I rechecked with the
same minimal reproducer as in my report, now modelling both call shapes:

                              amd64    i386
    7.0+ds-1, unpatched        ok     FTBFS    (the six size_t sites)
    add unsigned int           ok      ok
    replace unsigned long     FTBFS   FTBFS    (GDE_arbdb_io.cxx:236)

Corrected debian/patches/fix-i386-build.patch below. I checked it applies
cleanly to CORE/arb_progress.h as of 282faf2.

Author: Cheng Li <shiptux at gmail.com>
Last-Update: 2026-11-09
Bug-Debian: https://bugs.debian.org/1153516
Description: Add matching unsigned int overload, mirroring the existing unsigned long one
 CORE/arb_progress.h makes the templated constructors private on purpose, to
 reject integer types that could overflow, and then publishes the wanted
 overloads explicitly. Only unsigned long was published, so on ILP32
 architectures a size_t argument instantiates the private template with
 NUM = unsigned int and overload resolution picks it. Publish the unsigned
 int overload as well; the unsigned long one has to stay, because
 ARB_GDE/GDE_arbdb_io.cxx:236 passes an unsigned long.

--- a/CORE/arb_progress.h
+++ b/CORE/arb_progress.h
@@ -256,6 +256,7 @@
     // explicitely overload wanted ctors:
     explicit arb_progress(char *title) { setup(title, 0); }
     arb_progress(const char *title, unsigned long overall_count) { arb_assert(overall_count<=LONG_MAX); setup(title, overall_count); }
+    arb_progress(const char *title, unsigned int overall_count) { arb_assert(overall_count<=LONG_MAX); setup(title, overall_count); }
     explicit arb_progress(unsigned long overall_count) { arb_assert(overall_count<=LONG_MAX); setup(NULp, overall_count); }
 
     void allow_title_reuse() { used->allow_title_reuse(); }

Nothing is in the archive yet, so there is nothing to undo.

Kind regards,
Cheng Li



More information about the Debian-med-packaging mailing list