These seem to be known issues with gcc version >= 5, see [1] and [2].

A possible workaround is to use the attached patch (adapted to fix the 
issue for gcc 5.2.0).

For anyone using ArchLinux with llvm installed and trying to follow 
Volker's suggestion, you may want to try using

$ export LD_PRELOAD=/usr/lib/libstdc++.so.6

before compiling (as suggested in [3]). This will allow you to compile gcc 
4.9.2 without any issues.

Fidel

[1]: http://trac.sagemath.org/ticket/18580
[2]: http://trac.sagemath.org/ticket/18301
[3]: https://aur4.archlinux.org/packages/gcc48/

On Monday, July 27, 2015 at 1:43:54 PM UTC-4, fidelbc wrote:
>
> Hello,
>
> I'm trying to build sage on arch linux:
>
> $ uname -a
> Linux 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015 x86_64 
> GNU/Linux
>
> The packages that seem to fail to build are gf2x and ncurses (please see 
> attached logs).
>
> I usually build sage using
> MAKE="make -j4"
>
> Any help on trying to get the build to succeed are greatly appreciated!
> Fidel
>
> PS I used to be able to build sage without any issues, but after around 
> v6.6 this was no longer the case. Do you think these are OS specific issues?
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
>From 67c76ca18bfba62610a9dc3dfe5215422d836a6c Mon Sep 17 00:00:00 2001
From: fidbc <fidbc.c...@gmail.com>
Date: Wed, 29 Jul 2015 23:56:43 -0400
Subject: [PATCH] Added fix for gcc 5.2.0

---
 build/pkgs/gf2x/spkg-install                                            | 2 +-
 .../ncurses/patches/work_around_changed_output_of_GNU_cpp_5.x.patch     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/pkgs/gf2x/spkg-install b/build/pkgs/gf2x/spkg-install
index ee7e6a0..bf9d2e7 100755
--- a/build/pkgs/gf2x/spkg-install
+++ b/build/pkgs/gf2x/spkg-install
@@ -26,7 +26,7 @@ touch aclocal.m4 configure Makefile.in gf2x/gf2x-config.h.in
 if [ "$SAGE_DEBUG" = "yes" ]; then
     echo "Building a debug version of gf2x."
     export CFLAGS="-O0 -g $CFLAGS"
-elif $CC --version 2>/dev/null |grep 'gcc.* 5[.]1' >/dev/null; then
+elif $CC --version 2>/dev/null |grep 'gcc.* 5[.][12]' >/dev/null; then
     echo "Using compiler flags to work around problems with GCC 5.1 (Trac #18580)"
     export CFLAGS="-O2 -fno-forward-propagate -g $CFLAGS"
 else
diff --git a/build/pkgs/ncurses/patches/work_around_changed_output_of_GNU_cpp_5.x.patch b/build/pkgs/ncurses/patches/work_around_changed_output_of_GNU_cpp_5.x.patch
index af82739..df8cb8a 100644
--- a/build/pkgs/ncurses/patches/work_around_changed_output_of_GNU_cpp_5.x.patch
+++ b/build/pkgs/ncurses/patches/work_around_changed_output_of_GNU_cpp_5.x.patch
@@ -19,7 +19,7 @@ output of 'cpp' w.r.t. line directives [1].  Anyway, the patch fixes the issue.)
 +# Work around "unexpected" output of GCC 5.1.0's cpp w.r.t. #line directives
 +# by simply suppressing them:
 +case `$1 -dumpversion 2>/dev/null` in
-+    5.[01].*)  # assume a "broken" one
++    5.[012].*)  # assume a "broken" one
 +        preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
 +        ;;
 +    *)
-- 
2.5.0

Reply via email to