[cmake-developers] [CMake 0011803]: Build failure: 'erase' undefined (ncurses)

Mantis Bug Tracker mantis at public.kitware.com
Sat Feb 5 04:46:48 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11803 
====================================================================== 
Reported By:                Neil Newell
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11803
Category:                   CMakeSetup
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-02-05 04:46 EST
Last Modified:              2011-02-05 04:46 EST
====================================================================== 
Summary:                    Build failure: 'erase' undefined (ncurses)
Description: 
When building CMake on linux, linking failed due to 'erase' (ncurses) being
undefined in e.g cmCursesLongMessage.cxx.

Steps to Reproduce: 
Compile against ncurses-5.7 (GCC 4.4.5 was used but probably not a factor).


Additional Information: 
The issue seems to be because 'erase' is being 'hidden' via an inline function
in a header file, then #undef'd to avoid possible conflict with the STL.

However, in ncurses-5.7 the same logic appears in the ncurses.h header itself;
'erase' is #undef'sd if _cplusplus is defined; as a result it is not defined in
the first place. 

The problem was fixed locally by replacing the 'erase()' call in the header file
Source/CursesDialog/cmCursesStandardInclude.h with its macro expansion of
'werase(stdscr)'. Possibly the same fix should be applied to 'move' (in
'curses_move') although this wasn't a problem in this specific case.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-05 04:46 Neil Newell    New Issue                                    
======================================================================




More information about the cmake-developers mailing list