#18301: ncurses fails to build with GCC 5.x
-------------------------------------+-------------------------------------
Reporter: leif | Owner: leif
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-6.7
Component: packages: | Resolution:
standard | Merged in:
Keywords: syntax error, cpp | Reviewers:
Authors: Leif Leonhardy | Work issues:
Report Upstream: N/A | Commit:
Branch: | 2201c9cedee5a935dae2c24fdc54a5aa09201bda
u/leif/ncurses_GCC_5.x | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by leif):
* cc: vbraun (added)
Comment:
Meanwhile found an upstream patch for the issue (not yet part of a
"stable" release):
{{{
#!patch
--- ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh 2011-06-04
21:14:08.000000000 +0200
+++ ncurses-5.9-20150418/ncurses/base/MKlib_gen.sh 2014-12-06
19:56:25.000000000 +0100
@@ -2,10 +2,10 @@
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.46 2011/06/04 19:14:08 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.47 2014/12/06 18:56:25 tom Exp $)
#
##############################################################################
-# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.
#
+# Copyright (c) 1998-2011,2014 Free Software Foundation, Inc.
#
#
#
# Permission is hereby granted, free of charge, to any person obtaining a
#
# copy of this software and associated documentation files (the
"Software"), #
@@ -474,11 +474,22 @@
-e 's/gen_$//' \
-e 's/ / /g' >>$TMP
+cat >$ED1 <<EOF
+s/ / /g
+s/^ //
+s/ $//
+s/P_NCURSES_BOOL/NCURSES_BOOL/g
+EOF
+
+# A patch discussed here:
+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
+# introduces spurious #line markers. Work around that by ignoring the
system's
+# attempt to define "bool" and using our own symbol here.
+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
+cat $ED2 >$TMP
+
$preprocessor $TMP 2>/dev/null \
-| sed \
- -e 's/ / /g' \
- -e 's/^ //' \
- -e 's/_Bool/NCURSES_BOOL/g' \
+| sed -f $ED1 \
| $AWK -f $AW2 \
| sed -f $ED3 \
| sed \
}}}
Still think my solution is a bit more robust (and easier to follow ;-) ).
(Haven't actually tried upstream's fix.)
[[BR]]
Cc'ing the spkg maintainer...
--
Ticket URL: <http://trac.sagemath.org/ticket/18301#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.