Bug#942113: 3depict: FTBFS on PPC64EL - POWERPC macro not always defined

Olly Betts olly at survex.com
Fri Oct 18 01:11:00 BST 2019


On Fri, Oct 18, 2019 at 07:47:01AM +1300, Olly Betts wrote:
> That helped, but qhull_a.h is also included elsewhere without this
> workaround which caused my upload to FTBFS on ppc64el.  I've extended
> the patch to cover that case too and uploaded again.

My second upload built successfully on all release architectures.

Attached is the debdiff for the combined changes from my NMUs.

Cheers,
    Olly
-------------- next part --------------
diff -Nru 3depict-0.0.22/debian/changelog 3depict-0.0.22/debian/changelog
--- 3depict-0.0.22/debian/changelog	2019-10-05 08:19:56.000000000 +1300
+++ 3depict-0.0.22/debian/changelog	2019-10-18 07:39:16.000000000 +1300
@@ -1,3 +1,18 @@
+3depict (0.0.22-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix another problem causing FTBFS on ppc64el.
+
+ -- Olly Betts <olly at survex.com>  Fri, 18 Oct 2019 07:39:16 +1300
+
+3depict (0.0.22-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS on ppc64el, new patch: undefine-__POWERPC__.patch
+    (Closes: #942113)
+
+ -- Olly Betts <olly at survex.com>  Thu, 17 Oct 2019 16:44:15 +1300
+
 3depict (0.0.22-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru 3depict-0.0.22/debian/patches/series 3depict-0.0.22/debian/patches/series
--- 3depict-0.0.22/debian/patches/series	2019-10-05 08:19:56.000000000 +1300
+++ 3depict-0.0.22/debian/patches/series	2019-10-17 16:47:17.000000000 +1300
@@ -2,3 +2,4 @@
 debian-desktop-naming.patch
 lowercase-textdomain.patch
 desktop-category.patch
+undefine-__POWERPC__.patch
diff -Nru 3depict-0.0.22/debian/patches/undefine-__POWERPC__.patch 3depict-0.0.22/debian/patches/undefine-__POWERPC__.patch
--- 3depict-0.0.22/debian/patches/undefine-__POWERPC__.patch	1970-01-01 12:00:00.000000000 +1200
+++ 3depict-0.0.22/debian/patches/undefine-__POWERPC__.patch	2019-10-18 07:31:35.000000000 +1300
@@ -0,0 +1,41 @@
+Description: Undefine __POWERPC__ if wxWidgets defined it
+ Upstream attempts to work around this problem by defining __POWERPC__ to 1
+ but that breaks compilation too.  Undefine instead, to restore us to the state
+ that GCC is in before wxWidgets messes things up, since that's the state Qhull
+ should expect.  
+ .
+ In spatial.cpp, the header is only included to check a type size under __WIN64
+ so there it's simpler to just conditionalise the include.
+Author: Olly Betts <olly at survex.com>
+Bug-Debian: https://bugs.debian.org/942113
+Forwarded: no
+Last-Update: 2019-10-18
+
+--- a/src/backend/filters/algorithms/convexHull.h
++++ b/src/backend/filters/algorithms/convexHull.h
+@@ -31,7 +31,12 @@
+ 	//assigning a value, causing build fail on powerpc
+ 	#ifdef __POWERPC__
+ 		#pragma push_macro("__POWERPC__")
+-		#define __POWERPC__ 1
++		// Defining to 1 also causes build to fail on check:
++		// #if __MWERKS__ && __POWERPC__
++		// Undefine instead, to restore us to the state that
++		// GCC is in before wxWidgets messes things up, since
++		// that's the state Qhull should expect.
++		#undef __POWERPC__
+ 	#endif
+ 	extern "C"
+ 	{
+--- a/src/backend/filters/algorithms/spatial.cpp
++++ b/src/backend/filters/algorithms/spatial.cpp
+@@ -26,7 +26,9 @@
+ #include <gsl/gsl_randist.h>
+ #include <gsl/gsl_multifit.h>
+ 
++#if defined(__WIN64) && !defined(HAVE_SWEEP_HULL)
+ #include <qhull/qhull_a.h>
++#endif
+ 
+ using std::vector;
+ 


More information about the debian-science-maintainers mailing list