Hello all,

Wanted to leave this note for anybody running into gcc8 compiling issues. 
This was built on archlinux using their gcc 8.1.0-1 package. Fortunately 
there are fixes floating around, please see attached patches.

- Python-2.7.14

Error (sorry for the lack of details, lost the log file:-/ ):
/bin/sh: line 5: 25857 Segmentation fault      (core dumped) ...
Fix:
Place attached patch gcc8_python.patch (also available at [1]) under 
$SAGEDIR/build/pkgs/python2/patches. I guess this is now fixed at 2.7.15, 
see [2].


- linbox-1.5.2

Error:
../../linbox/matrix/densematrix/blas-transposed-matrix.h:74:8: error: too 
many template-parameter-lists
  class TransposedBlasMatrix< TransposedBlasMatrix< Matrix > > : public 
Matrix {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix:
Place attached patch gcc8_linbox.patch (also available at [3]) under 
$SAGEDIR/build/pkgs/linbox/patches

Best,
f

[1]: https://mail.python.org/pipermail/python-dev/2018-January/152011.html
[2]: 
https://github.com/python/cpython/commit/0b91f8a668201fc58fa732b8acc496caedfdbae0
[3]: 
https://git.archlinux.org/svntogit/community.git/tree/trunk/linbox-gcc8.patch?h=packages/linbox

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--- linbox-1.5.2/linbox/matrix/densematrix/blas-transposed-matrix.h.orig	2018-05-06 10:35:33.852181382 +0000
+++ linbox-1.5.2/linbox/matrix/densematrix/blas-transposed-matrix.h	2018-05-06 10:35:59.598847558 +0000
@@ -67,9 +67,6 @@
 	/*! TransposedBlasMatrix.
 	 * NO DOC
 	 */
-#if !defined(__INTEL_COMPILER) && !defined(__CUDACC__) & !defined(__clang__)
-	template <>
-#endif
 	template< class Matrix >
 	class TransposedBlasMatrix< TransposedBlasMatrix< Matrix > > : public Matrix {
 
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 55e83eced6..aa906144dc 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t);
 /* for source compatibility with 2.2 */
 #define _PyObject_GC_Del PyObject_GC_Del
 
+/* Former over-aligned definition of PyGC_Head, used to compute the
+   size of the padding for the new version below. */
+union _gc_head;
+union _gc_head_old {
+    struct {
+        union _gc_head *gc_next;
+        union _gc_head *gc_prev;
+        Py_ssize_t gc_refs;
+    } gc;
+    long double dummy;
+};
+
 /* GC information is stored BEFORE the object structure. */
 typedef union _gc_head {
     struct {
@@ -255,7 +267,8 @@ typedef union _gc_head {
         union _gc_head *gc_prev;
         Py_ssize_t gc_refs;
     } gc;
-    long double dummy;  /* force worst-case alignment */
+    double dummy;  /* force worst-case alignment */
+    char dummy_padding[sizeof(union _gc_head_old)];
 } PyGC_Head;
 
 extern PyGC_Head *_PyGC_generation0;

Reply via email to