Re: Trouble compiling CVS with g++=3.2.2

From John R. McPherson
DateMon, 20 Jan 2003 15:18:20 +1300
Subject Re: Trouble compiling CVS with g++=3.2.2
In-Reply-To (33050-24-205-179-149-1043028306-squirrel-library-ucr-edu)
Gordon Paynter wrote:
> Hi all,
> I'm having trouble compiling the CVS version of gsdl with g++-3.2. I've
> included the error below, and I'm wondering if there's something wrong in
> the my internationalisation and/or locales configuration--perhaps some
> library I'm missing? Any suggestions?

> make[2]: Entering directory `/home/paynter/gsdl/src/mgpp/text'
> g++ -c -DHAVE_CONFIG_H -I../../.. -I../lib -I. -g -O2 -DSILENT
> -DSHORT_SUFFIX mgpp_passes.cpp
> In file included from /usr/include/c++/3.2/i386-linux/bits/c++locale.h:39,
> from /usr/include/c++/3.2/bits/localefwd.h:46,
> from /usr/include/c++/3.2/ios:48,
> from /usr/include/c++/3.2/ostream:45,
> from /usr/include/c++/3.2/iostream:45,
> from UCArray.h:27,
> from TextEl.h:25,
> from build.h:29,
> from mgpp_passes.cpp:53:
> /usr/include/libintl.h:81: parse error before `throw'
> make[2]: *** [mgpp_passes.o] Error 1
> make[2]: Leaving directory `/home/paynter/gsdl/src/mgpp/text'
> gsdl>g++ --version
> g++ (GCC) 3.2.2 20030109 (Debian prerelease)
> Copyright (C) 2002 Free Software Foundation, Inc.

We've sometimes had problems like this, and I think it was due to things
getting #defined in some of our header files.
you could try

/home/paynter/gsdl/src/mgpp/text$ g++ -E -DHAVE_CONFIG_H -I../../..
-I../lib -I. -g -O2 -DSILENT -DSHORT_SUFFIX mgpp_passes.cpp

to see what the pre-processor is doing (this shows all the parsing
of the header files etc - search for "bindtextdomain" which is the
prototype in libintl.h that is bailing out).

gsdl/src/mgpp/lib/sysfuncs.h looks very suspicious, especially around
line 341 :)

337 #if ENABLE_NLS
338 #include <libintl.h>
339 #define _(Text) gettext (Text)
340 #else
341 #define textdomain(Domain)
342 #define _(Text) Text
342 #endif

I'm running debian stable so I can't really easily install g++ 3.2...