[Debian-med-packaging] Bug#1153055: arb: FTBFS on non-x86: gcc: error: unrecognized command-line option '-msse3'
Cheng Li
shiptux at gmail.com
Mon Nov 9 12:32:11 GMT 2026
Control: tags -1 + patch
The -msse3 flag is only the first symptom. The bundled RAxML 8.2.3 under
GDE/RAxML8 and GDE/SATIVA has no non-x86 build path at all, for two separate
reasons:
Makefile.PTHREADS.gcc -msse
Makefile.SSE3.PTHREADS.gcc -D__SIM_SSE3 -msse3
Makefile.AVX.PTHREADS.gcc -D__SIM_SSE3 -msse3 -D__AVX, plus -mavx per file
and axml.c itself:
#if ! (defined(__ppc) || defined(__powerpc__) || defined(PPC))
#include <xmmintrin.h>
#endif
So every architecture except PowerPC pulls in an x86 intrinsics header. Just
dropping the SSE3 and AVX variants would not help: the generic PTHREADS variant
passes -msse and compiles the same axml.c.
Both directories are new in 7.0. In 6.0.6 GDE/ contained neither RAxML8 nor
SATIVA, and 6.0.6-8 built on arm64, armhf, i386, riscv64 and s390x; 7.0+ds-1 is
built on amd64 only. So restricting them to x86 does not take away anything
that ever worked on those architectures.
GDE/Makefile already provides the mechanism for this:
# Allow disabling build of packages individually via environment variable
ARB_BUILD_SKIP_PKGS?=""
so the fix needs no patch to upstream code, only debian/rules:
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,16 @@
ARB_64:=0
endif
+# The bundled RAxML 8.2.3 in GDE/RAxML8 and GDE/SATIVA only builds on x86:
+# axml.c includes <xmmintrin.h> on every architecture except PowerPC, and all
+# three build variants pass -msse, -msse3 or -mavx. Skip both on every other
+# architecture, using the mechanism GDE/Makefile already provides. Neither
+# directory existed in 6.0.6, which built on arm64, armhf, i386, riscv64 and
+# s390x, so nothing that used to work is lost.
+ifeq (,$(filter $(DEB_HOST_ARCH_CPU),i386 amd64))
+ export ARB_BUILD_SKIP_PKGS = RAxML8 SATIVA
+endif
+
LD_LIBRARY_PATH := $(ARBHOME)/lib:$(LD_LIBRARY_PATH)
PATH := $(ARBHOME)/bin:$(PATH)
LC_ALL := C
What I have checked: that the filter-out in GDE/Makefile does remove both
.dummy targets for ARB_BUILD_SKIP_PKGS="RAxML8 SATIVA" under GNU make 4.4.1,
and that DEB_HOST_ARCH_CPU resolves to i386 and amd64 on those two and to
riscv64, arm64, arm and s390x elsewhere, so the condition selects the intended
set. I have not run a full arb build on a non-x86 architecture, so the patch is
verified at the build-system level only. It cannot regress those architectures,
since arb currently fails there outright.
One caveat: this will not restore i386 by itself. i386 fails earlier, for an
unrelated reason in CORE/arb_progress.h that affects the 32-bit architectures
only, which I am reporting separately.
More information about the Debian-med-packaging
mailing list