I think the problem I'm seeing is just a pidgin bug - python does define
_XOPEN_SOURCE_EXTENDED on Linux but it doesn't seem that it needs to on
OpenBSD so I don't think pidgin should rely on it.

FreeBSD/NetBSD ports don't build the console UI for pidgin so possibly
it just hasn't been tested with ncursesw.

I still can't reproduce your problem Landry, don't know why :-/.


On Wed, Aug 25, 2010 at 02:44:48PM +0100, Nicholas Marriott wrote:
> On Wed, Aug 25, 2010 at 09:27:55AM +0100, Nicholas Marriott wrote:
> > On Wed, Aug 25, 2010 at 10:01:49AM +0200, Landry Breuil wrote:
> > > On Wed, Aug 25, 2010 at 08:48:05AM +0100, Nicholas Marriott wrote:
> > > > Hi
> > > > 
> > > > On Tue, Aug 24, 2010 at 11:05:46PM +0200, Landry Breuil wrote:
> > > > > On Mon, Aug 23, 2010 at 01:04:25PM +0000, Christian Weisgerber wrote:
> > > > > > Landry Breuil <lan...@rhaalovely.net> wrote:
> > > > > > 
> > > > > > > >       http://nicm.ath.cx/~nicholas/ncursesw.tar.gz
> > > > > > > 
> > > > > > > I'll run a bulk with it if noone beats me to it.
> > > > > > 
> > > > > > Here's a list of candidates that are likely to be affected:
> > > > > > 
> > > > > > audio/herrie.log:cc -c ./src/audio_file.c -O2 -pipe  
> > > > > > -I/usr/local/include -DAPP_NAME=\"herrie\"      
> > > > > > -DAPP_VERSION=\"2.2\"     -I/usr/local/include 
> > > > > > -I/usr/local/include/ncursesw     -I/usr/local/include/ncurses 
> > > > > > -DCURSES_HEADER=\<ncurses.h\> -I/usr/local/include/glib-2.0 
> > > > > > -I/usr/local/lib/glib-2.0/include -pthread 
> > > > > > -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
> > > > > > -DBUILD_HTTP -DBUILD_SCROBBLER -I/usr/local/include -DBUILD_MP3 
> > > > > > -DBUILD_RES_INIT -DBUILD_SNDFILE -DBUILD_NLS -DBUILD_VORBIS 
> > > > > > -DBUILD_AO  -o audio_file.o
> > > > > > audio/ncmpc.log:checking for initscr in -lncursesw... no
> > > > > > audio/pms.log:checking for working ncursesw... no
> > > > > > comms/c3270.log:checking for newterm in -lncursesw... no
> > > > > > databases/mysql.log:checking for tgetent in -lncursesw... no
> > > > > > devel/tig.log:checking for ncursesw/ncurses.h... no
> > > > > > editors/zile.log:checking for working ncursesw... no
> > > > > > games/clines.log:checking for initscr in -lncursesw... no
> > > > > > graphics/libcaca.log:checking for initscr in -lncursesw... no
> > > > > > lang/ghc.log:checking for setupterm in -lncursesw... no
> > > > > > lang/swi-prolog.log:checking for main in -lncursesw... no
> > > > > > mail/abook.log:checking for initscr in -lncursesw... no
> > > > > > mail/mutt/snapshot.log:checking for waddnwstr in -lncursesw... no
> > > > > > mail/mutt/stable.log:checking for waddnwstr in -lncursesw... no
> > > > > > misc/dialog.log:checking if you want the wide-curses features... no
> > > > > > misc/lifelines.log:checking for tparm in -lncursesw... no
> > > > > 
> > > > > Fails with ../../src/hdrs/mycurses.h:8:29: error: ncursesw/curses.h: 
> > > > > No
> > > > > such file or directory
> > > > 
> > > > I don't think we're going to install this so this needs to be fixed in
> > > > the port I guess.
> > > 
> > > Yes probably.
> > > 
> > > > > 
> > > > > > net/mcabber.log:checking for waddnwstr in -lncursesw... no
> > > > > > net/pidgin.log:checking for initscr in -lncursesw... no
> > > > > 
> > > > > fails because it looks for a 'get_wch' #define in ncurses.h
> > > > > all depending ports don't build.. should be wget_wch instead ?
> > > > 
> > > > Hmm. get_wch is a macro but it should be there. Does it define
> > > > _XOPEN_SOURCE_EXTENDED?
> > > 
> > > The configure test run is more or less:
> > > 
> > > #define _XOPEN_SOURCE_EXTENDED
> > > #include </usr/include/ncurses.h>
> > > 
> > > int
> > > main ()
> > > {
> > > #ifndef get_wch
> > > # error get_wch not found!
> > > #endif
> > > ;
> > > return 0;
> > > }
> > > 
> > > conftest.c:126:8: error: #error get_wch not found!
> > 
> > Odd, because if I run this test it is fine. Maybe it is defining
> > NCURSES_NOMACROS somewhere, although that would seem silly if it is
> > going to do this test...
> > 
> > > 
> > > Run make configure in net/pidgin for more details..
> > 
> > I'll try it once I get home from work.
> 
> 
> Hmm. I can't reproduce this on amd64, make configure passes:
> 
> checking for initscr in -lncursesw... yes
> checking for update_panels in -lpanelw... yes
> checking /usr/include/ncursesw/ncurses.h usability... no
> checking /usr/include/ncursesw/ncurses.h presence... no
> checking for /usr/include/ncursesw/ncurses.h... no
> checking /usr/include/ncurses.h usability... yes
> checking /usr/include/ncurses.h presence... yes
> checking for /usr/include/ncurses.h... yes
> checking if /usr/include/ncurses.h supports wide characters... yes
> 
> And the build fails later instead looking for cchar_t:
> 
>  cc -DHAVE_CONFIG_H -I. 
> -I/usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt -I../.. -pthread 
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
> -I/usr/include/ -Wall -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED 
> -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED -Waggregate-return 
> -Wcast-align -Wdeclaration-after-statement -Wendif-labels 
> -Werror-implicit-function-declaration -Wextra -Wno-sign-compare 
> -Wno-unused-parameter -Wformat-security -Winit-self -Wmissing-declarations 
> -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wundef 
> -I/usr/local/include/libxml2 -I/usr/local/include 
> -I/usr/local/include/python2.5 -I/usr/local/include -I/usr/include/ncursesw 
> -O2 -pipe -MT gntwm.lo -MD -MP -MF .deps/gntwm.Tpo -c 
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c  -fPIC -DPIC 
> -o .libs/gntwm.o
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c: In function 
> 'work_around_for_ncurses_bug':
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c:169: error: 
> 'cchar_t' undeclared (first use in this function)
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c:169: error: 
> (Each undeclared identifier is reported only once
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c:169: error: 
> for each function it appears in.)
> /usr/ports/pobj/pidgin-2.7.3/pidgin-2.7.3/finch/libgnt/gntwm.c:169: error: 
> expected ';' before 'ch'
> ...
> 
> For which this might be the culprit in finch/libgnt/gntwm.c:
> 
> #ifdef USE_PYTHON
> #include <Python.h>
> #else
> #define _GNU_SOURCE
> #if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && 
> !defined(__OpenBSD__)
> #define _XOPEN_SOURCE_EXTENDED
> #endif
> #endif
> 
> Looks like it expects Python to turn on _XOPEN_SOURCE_EXTENDED, but I
> rebuilt Python and it still seems to be off in Python2.5/pyconfig.h,
> despite this:
> 
> $ ldd /usr/local/lib/python2.5/lib-dynload/_curses.so
> /usr/local/lib/python2.5/lib-dynload/_curses.so:
>         Start            End              Type Open Ref GrpRef Name
>         000000020fa88000 000000020fe9b000 dlib 1    0   0      
> /usr/local/lib/python2.5/lib-dynload/_curses.so
>         0000000203593000 00000002039ec000 rlib 0    1   0      
> /usr/lib/libncursesw.so.12.0
> 
> Maybe someone with better knowledge of Python/pidgin able to look and
> see what is going on?
> 
> > 
> > > 
> > > > 
> > > > And I just realised I forgot to add the few extra w man pages :-/.
> > > > 
> > > > > 
> > > > > > print/texlive/base.log:checking if you want the wide-curses 
> > > > > > features... no
> > > > > > productivity/calcurse.log:checking for initscr in -lncursesw... no
> > > > > > shells/zsh.log:checking for ncursesw/ncurses.h... no
> > > > > 
> > > > > Fails at
> > > > > curses.c:717: error: 'cchar_t' undeclared (first use in this function)
> > > > 
> > > > Again seems like it is probably missing _XOPEN_SOURCE_EXTENDED.
> > > 
> > > It is defined in Src/system.h
> > > 
> > > #ifndef ZSH_NO_XOPEN
> > > # ifdef ZSH_CURSES_SOURCE
> > > #  define _XOPEN_SOURCE_EXTENDED 1
> > > # else
> > > #  ifdef MULTIBYTE_SUPPORT
> > > /*
> > >  * Needed for wcwidth() which is part of XSI.
> > >  * Various other uses of the interface mean we can't get away with just
> > >  * _XOPEN_SOURCE.
> > >  */
> > > #   define _XOPEN_SOURCE_EXTENDED 1
> > > #  endif /* MULTIBYTE_SUPPORT */
> > > # endif /* ZSH_CURSES_SOURCE */
> > > #endif /* ZSH_NO_XOPEN */
> > > 
> > > but ZSH_NO_XOPEN is defined to 1... given by this configure.ac snippet
> > > 
> > > [[case "$host_os" in
> > >   *openbsd*|*freebsd5*|*freebsd6.[012]*|*aix*)
> > >   zsh_cv_no_xopen=yes
> > 
> > So it probably isn't defining it, but is then using cchar_t (under
> > HAVE_SETCCHAR which must be detected a different way since it is under
> > _XOPEN_SOURCE_EXTENDED in ncurses.h) which is a no-go.
> > 
> > > 
> > > Landry

Reply via email to