carcassonne has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I'd like to install Term::Visual and to do this, Curses is required. The system is SuSE 9.3. Using perl -MCPAN, I summon the installtion of Curses and it starts with a splash of:

Doing test compiles with the compile command 'cc -DSYM="_C_SYM_" -I/usr/include/curses -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o _C_FILE_ _C_FILE_.c -lncurses>/dev/null 2>&1' function 'waddch' NOT found function 'wechochar' NOT found function 'waddchstr' NOT found function 'waddchnstr' NOT found function 'waddstr' NOT found function 'waddnstr' NOT found
... goes on like that for quite a while ...

And then it starts seeing conflicts:

cc -c -I/usr/include/curses -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g -Wall -pipe -DVERSION=\"1.13\" -DXS_VERSION=\"1.13\" -fPIC "-I/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE" Curses.c In file included from c-config.h:9, from Curses.c:11: /usr/include/ncurses.h:285: error: conflicting types for `WINDOW' /usr/include/curses/curses.h:159: error: previous declaration of `WIND +OW'

.. to finally abort the installation.

SuSE 9.3 libs and includes have both curses and ncurses installed. Has anyone had the same problem and what would be the fix to make Curses.pm happy and eventually be able to use Term::Visual ?

Thanks !

Replies are listed 'Best First'.
Re: Problem installing Curses for Term::Visual
by mdxi (Beadle) on Feb 06, 2006 at 06:15 UTC
    I only know the answer to the first half of your problem. The 'w' variants of curses functions are the "wide" versions . They are for double-wide character support (such as some characters in Asian languages and portions of Unicode).

    Most users whose language doesn't have double width characters won't need this functionality, so distributions typically provide separate "normal" and "wide" ncurses packages. Debian, for instance, has libncurses5 and libncursesw5 (and then the complementary -dev packages).

    Not having these functions doesn't mean your ncurses install is broken; it is to be expected for most users. I'm sorry that I can't explain the rest of your problem.