[CMake] Problem Compiling on Solaris 10 x86

Konstantin Andreev andreev at swemel.ru
Tue May 19 04:58:24 EDT 2015


On 18 May 2015 12:01 PM, Konstantin Andreev wrote:

> SUN/Oracle Solaris typically has two `curses' packages installed : traditional Unix `curses' and GNU `ncurses'. Cmake builds itself against headers of GNU `ncurses', but links with Unix `curses' with obvious result above.
>
> To workaround, you could uninstall either Unix `curses' or GNU `ncurses' development package.

On 18 May 2015 20:27, Bill Hoffman wrote:

> Where is the ncurses library?  From your cache it seems that it can not find the ncurses library:

Bill, thank you for attending this. Only what I have posted (the final error message) is from my build :

> ...
> Linking CXX executable ../bin/ccmake
> Undefined  first referenced
>  symbol        in file
> wattr_on   CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o
> wattr_off  CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o
> ...

It's identical to the error message of the topic starter, but I didn't look into the cmake cache. Here is a setup of the `curses':

   * SysV curses

     /usr/include/curses.h            # header (multiarch)
     /lib/libcurses.so*               # 32-bit libraries
     /usr/lib/libcurses.so* -> /lib/* # symlinks to above

   * X/Open curses

     /usr/xpg4/include/curses.h       # header (multiarch)
     /usr/xpg4/lib/libcurses.so*      # 32-bit libraries

   * GNU ncurses

     /usr/include/ncurses/*           # headers (multiarch)
     /usr/gnu/lib/libncurses.so*      # 32-bit libraries
     /usr/gnu/bin/ncurses5-config     # 32-bit config script

Even if it's not easy to guess `ncurses' libs here, it's still looks like a mistake to match ncurses headers to `libcurses.so'.

BTW,

     1. On Unix systems (which Solaris is) it's preferable to use native `curses', because it's mandatory, but GNU `ncurses' is optional. If other things being equal, why create extra dependency?

     2. /usr/sfw is one more place on Solaris where to look into when you search for non-Unix alternates, like `ncurses'.

Konstantin Andreev
Software Engineer
Swemel JSC


More information about the CMake mailing list