Opened 3 years ago

Closed 3 years ago

#19720 closed defect (duplicate)

ncurses fails to compile with gcc 5.1

Reported by: siflfran@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:


Due to a change in the code generated by gcc's C preprocessor, ncurses fails to compile with gcc 5.1. The attached patch (from sourcemage linux) solves this.

Attachments (1)

ncurses-5.9-gcc5_buildfixes-1.patch (1.2 KB) - added by siflfran@… 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by siflfran@…

comment:1 Changed 3 years ago by anonymous

in that patch:
sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2

the major problem with this approach us that the regexp will replace ANY occurrence of the string "bool" even if it occurs as a substring of another word. I suggest adding some trimming context to it:

so that it only matches, for example " bool ", "(bool)", "_bool " and so on, but not "boole" nor "hboolh" nor "blahblahboolblah" nor "9bool5" and so on

thus the sed command should become

sed -r -e 's/([^a-zA-Z0-9].)bool([^a-zA-Z0-9].)/\1P_NCURSES_BOOL\2/g' $TMP > $ED2 


  • the -r parameter is needed to enable extended regular expressions
  • parentheses in the first part define groups that can be reused in the the second part
  • \1, \2, etc. in the second part are references to the groups defined in the first part, starting with group number 1

comment:2 Changed 3 years ago by anonymous

meh..forgot to escape the first regex and the site mangled it thinking it was wikiformatting.. i got the sed command right though.

comment:3 Changed 3 years ago by hauke

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #19592
Please follow SubmittingPatches for patch submission.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.