[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build errors on Solaris 2.6 & 7
From: |
Tom G. Christensen |
Subject: |
Re: Build errors on Solaris 2.6 & 7 |
Date: |
Wed, 09 Jan 2013 17:30:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121116 Thunderbird/10.0.11 |
On 01/06/2013 04:11 PM, Tom G. Christensen wrote:
depbase=`echo c-strtod.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC
-DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/tgcw
are/include -D_REENTRANT -g -O2 -MT c-strtod.o -MD -MP -MF $depbase.Tpo
-c -o c-strtod.o c-strtod.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./locale.h:26,
from c-strtod.c:25:
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/locale.h:63:
error: redefinition of 'struct rpl_lconv'
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/locale.h:105:
error: conflicting types for 'rpl_localeconv'
./locale.h:449: error: previous declaration of 'rpl_localeconv' was here
I've looked more at this issue and I now know how it happens.
We get this chain of includes on Solaris 2.6 and 7:
c-strtod.c -> gnulib <locale.h> -> system <locale.h> -> gettext
<libintl.h> -> gnulib <locale.h> -> returns to gettext <libintl.h> ->
returns to system <locale.h> which now defines struct lconv and causes
the error.
For Solaris 2.6 additionally the localeconv() prototype is incompatible
with the gnulib replacement so it complains about that aswell.
From what I can tell this only happens because I have installed gettext
and <libintl.h> is the gettext version that unconditionally includes
<locale.h>.
If I take away the #include in <libintl.h> the problem goes away.
On Solaris 8 and later, struct lconv and localeconv() are defined in a
sub header <iso/locale_iso.h> with its own guard and this is included
from system <locale.h> before <libintl.h>. It does ofcourse return to
system <locale.h> after having parsed gnulib <locale.h> and <libintl.h>
but it only contains some C++ visibility stuff and two macros
(_LastCategory and _ValidCategory) that gnulib does not seem to care about.
-tgc
- Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/06
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/06
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/06
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/06
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/08
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/08
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/09
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/09
Re: Build errors on Solaris 2.6 & 7,
Tom G. Christensen <=
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/09
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/10
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/10
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/12
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/13
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/27
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/13
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/13
- Re: Build errors on Solaris 2.6 & 7, Tom G. Christensen, 2013/01/13
- Re: Build errors on Solaris 2.6 & 7, Paul Eggert, 2013/01/13