leif wrote:
> On 04/22/2015 05:30 AM, leif wrote:
>> Release of GCC 5.1 is scheduled for Wednesday, April 22nd.
> 
> It's out now:
> 
> https://gcc.gnu.org/ml/gcc/2015-04/msg00287.html
> 
> 
> The errors with ncurses and gf2x remain.  8-/
> 
>> I took the first release candidate and tried to build Sage 6.6 with it:
>>
>>  * ncurses (a superfluous package anyway) fails to build with
>>    a syntax error(!) -- apparently a bug in the preprocessor,
>>                         will hopefully vanish with the final;
>>                         setting CPP to use another one works
>>

It's not a bug, it's a new feature!  (Apparently.)

Fixed.  I'll open a ticket later.


For the impatient:

$ cat
build/pkgs/ncurses/patches/ncurses-5.9.20131221_work_around_broken_GNU_cpp_5.x.patch

Building ncurses with GCC 5.1 (or more precisely, with its 'cpp') fails with
a syntax error, caused by earlier preprocessing.

(I'm not entirely sure whether it's a GCC bug or rather caused by a new
feature which breaks further processing with 'awk' and 'sed';  I *think*
at least the 'awk' inline script "AW2" simply isn't prepared for the changed
output of 'cpp' w.r.t. line directives [1].  Anyway, the patch fixes the
issue.)

[1] https://gcc.gnu.org/gcc-5/porting_to.html


--- ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh      2011-06-04
21:14:08.000000000 +0200
+++ ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh      2015-04-26
00:47:06.911680782 +0200
@@ -62,7 +62,15 @@
 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export
LC_CTYPE;    fi
 if test "${LC_COLLATE+set}"  = set; then LC_COLLATE=C;  export
LC_COLLATE;  fi

-preprocessor="$1 -DNCURSES_INTERNALS -I../include"
+# 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
+        preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
+        ;;
+    *)
+        preprocessor="$1 -DNCURSES_INTERNALS -I../include"
+esac
 AWK="$2"
 USE="$3"



-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to