From 11f74c80996028ea5cdddbc991932d08855da03b Mon Sep 17 00:00:00 2001 From: Anton Gladky Date: Sat, 3 Oct 2026 15:38:15 +0200 Subject: [PATCH] Fix FTBFS on ppc64el: include Eigen before X11 headers Xlib.h (pulled in via spnav.h) defines the macro Complex, which breaks Eigen's AltiVec template code in src/platform/guigtk.cpp. --- debian/changelog | 6 ++++ .../08-Include-Eigen-before-X11-headers.patch | 33 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 40 insertions(+) create mode 100644 debian/patches/08-Include-Eigen-before-X11-headers.patch diff --git a/debian/changelog b/debian/changelog index aea836f..ea02f8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +solvespace (3.2+dfsg-5) UNRELEASED; urgency=medium + + * Include Eigen before X11 headers to fix FTBFS on ppc64el. + + -- Anton Gladky Sat, 03 Oct 2026 15:38:15 +0200 + solvespace (3.2+dfsg-4) unstable; urgency=medium * Reupload with libdxfrw tarball (Closes: #1149826) diff --git a/debian/patches/08-Include-Eigen-before-X11-headers.patch b/debian/patches/08-Include-Eigen-before-X11-headers.patch new file mode 100644 index 0000000..0438a23 --- /dev/null +++ b/debian/patches/08-Include-Eigen-before-X11-headers.patch @@ -0,0 +1,33 @@ +Description: Include solvespace.h before spnav.h in the GTK frontend + spnav.h includes , which does "#define Complex 0". When Eigen + is included afterwards, its AltiVec backend (used on ppc64el) fails to + compile because it uses "bool Complex" as a template parameter name. + Include solvespace.h, and therefore Eigen, before the X11 headers. +Author: Anton Gladky +Forwarded: no +Last-Update: 2026-10-03 + +Index: src/platform/guigtk.cpp +--- a/src/platform/guigtk.cpp ++++ b/src/platform/guigtk.cpp +@@ -32,6 +32,11 @@ + # include + #endif + ++// Include solvespace.h (and thus Eigen) before spnav.h: the latter pulls in ++// , which defines macros such as `Complex` that break Eigen's ++// AltiVec template code on ppc64el. ++#include "solvespace.h" ++ + #if defined(HAVE_SPACEWARE) + # include + # include +@@ -48,8 +53,6 @@ + # endif + #endif + +-#include "solvespace.h" +- + namespace SolveSpace { + namespace Platform { + diff --git a/debian/patches/series b/debian/patches/series index cb9afd1..40ee8ce 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ 05-Adjust-extlib-include-path.patch 06-Build-with-system-mimalloc.patch 07-Support-Eigen-5.patch +08-Include-Eigen-before-X11-headers.patch -- 2.39.5