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

