[csw-maintainers] iswblank() and wctype.h woes (was Re: Updated ncurses available in testing/)

Sebastian Kayser skayser at opencsw.org
Wed Apr 8 02:48:54 CEST 2009


Philip Brown wrote:
> On Tue, Apr 07, 2009 at 01:10:55AM +0200, Sebastian Kayser wrote:
>> Just installed the package on my local build machine and successfully
>> tested watch and ncdu builds against regular ncurses. mcabber building
>> with the ncursesw includes bails out, will have a look at that
>> tomorrow. Maybe it looks obvious to someone.
>>
> 
> looks fairly obvious to me. 
> Solaris system includes are getting looked at before the stuff in
> wncurses dir. This breaks things for ncurses.
> 
> So either you fiddle with your -I optoins to the compiler, or you have to
> take a look at the source code, to juggle order of whatever is causing
> an #include of /usr/include/iso/wctype_c99.h, to come later, instead of
> sooner.

Ok, fixed, multiple reasons. First of all i had been (mis)using a
Solaris 10 machine, so the system headers were different from the build
farm ones. On the build farm the build is fine.

Second - and that was the main "culprit" then - i had worked around the
missing iswblank() on Solaris 8 via the following snippet

# ifndef HAVE_ISWBLANK
# define iswblank(wc) iswctype(wc, wctype("blank"))
# endif

HAVE_ISWBLANK isn't defined by the mcabber autoconf system so it would
just always be included. No problem on Solaris 8 where iswblank() is
missing (and hence not used by any system headers), but on Solaris 10 it
is available and unfortunately i had put the snippet in a place where
the #define replaced system header occurences of iswblank() where
wctype() wasn't yet declared. Thus the observed error messages.

> (or... simply drop trying to use ncurses, and use the system standard
>   curses libs :)

No ncurses issue here ;)

>> source='commands.c' object='commands.o' libtool=no \
>>         DEPDIR=.deps depmode=none /bin/bash ../depcomp \
>>         /opt/studio/SOS11/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I..  -I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include   -I/opt/csw/include -I/opt/csw/include  -I/opt/csw/lib/ncursesw -I/opt/csw/include  -xO3 -xarch=386 -features=no%extinl -I/opt/csw/lib/ncursesw -I/opt/csw/include -I/opt/csw/lib -D_GNU_SOURCE -c commands.c
>> "/usr/include/iso/wctype_c99.h", line 48: syntax error before or at: wctype
>> "/usr/include/iso/wctype_c99.h", line 48: warning: undefined or missing type for: wctype
>> "/usr/include/iso/wctype_c99.h", line 48: warning: syntax error:  empty declaration
>> "commands.c", line 110: cannot recover from previous errors
>> cc: acomp failed for commands.c

I have now moved the snippet after the includes to wctype.h (which fixes
the build even on the Solaris 10 box) and will check with the mcabber
author whether he can include an autoconf check for iswblank().

Sebastian



More information about the maintainers mailing list