🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.rc
Article #2730

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

#2730
From: Cheng Li
Date: Mon, 09 Nov 2026 12:40
102 lines
6949 bytes
Source: arb
Version: 7.0+ds-1
Severity: serious
Tags: ftbfs patch

Dear Maintainer,

arb 7.0+ds-1 fails to build from source on i386:

  https://buildd.debian.org/status/fetch.php?pkg=arb&arch=i386&ver=7.0%2Bds-1&stamp=1792765920&raw=0

The visible failure is a link error:

  /usr/bin/i686-linux-gnu-ld.bfd: cannot find adname.o: No such file or directory
  /usr/bin/i686-linux-gnu-ld.bfd: cannot find TreeNode.o: No such file or directory
  make[5]: *** [Makefile:89: ../lib/libARBDB.so] Error 1

but those objects are missing because their compilation failed earlier in the
same parallel build:

  adname.cxx:181:131: error: 'arb_progress::arb_progress(const char*, NUM)
      [with NUM = unsigned int]' is private within this context
  CORE/arb_progress.h:253:38: note: declared private here

There are six such call sites in three files:

  ARB_GDE/GDE_event.cxx:363        -> breaks ARB_GDE.a
  ARBDB/adname.cxx:181, 219, 272   -> breaks libARBDB.so
  ARBDB/TreeNode.cxx:425, 458      -> breaks libARBDB.so

This is not specific to i386, it is specific to 32-bit. CORE/arb_progress.h
makes a template constructor private on purpose, to reject integer types that
could overflow, and then explicitly overloads the wanted ones:

  private:
      // forbid constructing arb_progress with integer types that could overflow in caller code:
      template <typename NUM>          arb_progress(const char *t, NUM n);
      template <typename NUM> explicit arb_progress(NUM n);
  public:
      // explicitely overload wanted ctors:
      explicit arb_progress(char *title) { setup(title, 0); }
      arb_progress(const char *title, unsigned long overall_count) { ... }
      explicit arb_progress(unsigned long overall_count) { ... }

The only public constructor taking a count accepts unsigned long, and all six
call sites pass a size_t:

  adname.cxx:181      tree_count*3                        (printed with %zu)
  adname.cxx:219      config_count                        (printed with %zu)
  adname.cxx:272      colorset_count                      (printed with %zu)
  TreeNode.cxx:425    eliminatedParentLength.size()
  TreeNode.cxx:458    eliminatedParentLength.size()
  GDE_event.cxx:363   dataset.numelements-oldnumelements+1
                      (NA_Alignment::numelements is size_t, GDE_def.h:120)

On LP64 architectures size_t is unsigned long, so the public overload is an
exact match and the code compiles. On ILP32 architectures size_t is unsigned
int, the private template instantiated with NUM = unsigned int is then a
better match than the unsigned long overload, and overload resolution selects
the private one.

arb 6.0.6-8 still built successfully on i386, so this is a regression in
7.0+ds-1.

The patch below adds the matching unsigned int overload, mirroring the
existing unsigned long one:

--- 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(); }

I verified the mechanism and the fix with a minimal reproducer of just that
constructor set (g++ 14.2.0-19, no arb headers involved):

  g++ -m64                -> OK
  g++ -m32                -> is private within this context
  g++ -m32 -DWITH_FIX     -> OK
  g++ -m64 -DWITH_FIX     -> OK

so the added overload fixes 32-bit without changing 64-bit behaviour. I have
not run a full arb build on i386, so the patch is verified at the overload
resolution level only.

Two further notes:

- armhf is affected by the same bug, but it currently fails earlier on the
  bundled RAxML 8.2.3 and -msse3 (#1153055), so this one is masked there.
  Fixing #1153055 will expose it.

- For symmetry the single-argument "explicit arb_progress(unsigned int)" could
  be added as well, but no current call site needs it, so the patch leaves it
  out.

Kind regards,
Cheng Li
Technical Details
Message-ID: <NXwPf-aOve-9@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Cheng Li <shiptux@gmail.com>
Newsgroups: linux.debian.bugs.rc
Subject: Bug#1153516: arb: FTBFS on 32-bit architectures: arb_progress(const char*, unsigned int) is private
Date: Mon, 09 Nov 2026 13:40:01 +0100
Message-ID: <NXwPf-aOve-9@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org  Mon Nov  9 12:35:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.547
Reply-To: Cheng Li <shiptux@gmail.com>, 1153516@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-med-packaging@lists.alioth.debian.org
X-Debian-Pr-Message: report 1153516
X-Debian-Pr-Package: src:arb
X-Debian-Pr-Keywords: ftbfs patch
X-Debian-Pr-Source: arb
X-Gm-Message-State: APuU4Z/VOoi1IMVBsgspOlGB0ohS4oi33OQ0lpLgPKcfLbrZNdvplyUq
	7a1OloDOR0uSVs9ME+sNIvw4Cg659fT8Wk350r1QMJBTG9QEQpt9wjUynz9tUA==
X-Gm-Gg: AYBFou1fAzlZhsmojdSK/2rKsLP4DAvyIy+3grGOmGZBaei2znUyf/uUlH+NZMy1nrE
	Nfe+iHALGK8L0UY4Egtj3fdJyCxKWWYHxou5s6cHrSf6CtQpfJhIUDhvxlZaj+0zJqZPAaU1d0i
	sjI1x6UpkhT50mCaPc+N2oVxJmyUIf/nyx4WDvvD/2+KVE1QuLlV+C9jJ+LjSf5T86qMD7XJFgt
	zu97H5gn/nIko44qWpPOPY6Q0u4aK+htCrVtvK0qIcdLOQ8oToDBSpb2tsmqyTJ2Jr0bhATIfBv
	VYf80pHuDjuX1D5ogRcgpRIsYsBkmanVmVGaWNUAFY+a6N5aOQhdIk2zoh/hT3/7O3hLlqDY4BL
	z/g2AOlPc2DX3dGMShvC9JXSRoCeSLz+EaTOY1M147RX4cBHFhx5yV/9WOb18ZxF0aTIr6v9tJl
	Obs5U9JphG53ygkX+H83CwZZ8yjiuFIbOWkWMfv3yh/ulzZKOlPDZjUYDY+SQMkrQTqbJwMOj+4
	j/KImqysMr9YayKzYVGHQ4uIfLnXkDLEzDkfzeUovL+pjK0n/HRGTzok1Iw3u3vR3lQ1khdsdXl
	Ld4ini2ueIDZmIk8lmorfZT8poiFojJcYwLhlU9/ajJH5b49Vf0G0hTPUYgguFwiB99wucy8Tpk
	nHRpDjsJX
X-Received: by 2002:a05:690e:128e:b0:67c:2488:b2de with SMTP id 956f58d0204a3-67c3d7b72cemr2290847d50.3.1794227529367;
        Mon, 09 Nov 2026 04:32:09 -0800 (PST)
X-Mailer: git-send-email 2.47.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/837685
List-ID: <debian-bugs-rc.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-rc/>
Approved: robomod@news.nic.it
Lines: 102
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon,  9 Nov 2026 21:32:00 +0900
X-Original-Message-ID: <20261109123201.3849065-1-shiptux@gmail.com>