On 01/06/2013 04:47 PM, Paul Eggert wrote:
On 01/06/2013 07:11 AM, Tom G. Christensen wrote:
For Solaris 2.6 only I'm seeing errors like this:
gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC
-DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/
usr/tgcware/include -D_REENTRANT -g -O2 -MT allocator.o -MD -MP -MF $depbase.Tpo -c -o
allocator.o allocator.c&&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./stdlib.h:35,
from allocator.c:4:
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/stdlib.h:164:
error: conflicting types for 'rpl_putenv'
./stdlib.h:836: error: previous declaration of 'rpl_putenv' was here
make[4]: *** [allocator.o] Error 1
$ sed -n '164p'
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/stdlib.h
extern int putenv(const char *);
$ sed -n '836p' stdlib.h
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
It looks like the system stdlib.h is being evaluated again after gnulib
stdlib.h has already been evaluated.
Thanks, could you investigate why that might be? I don't see how it can happen,
from the sources.
I've tried to figure it out, but it is eluding me.
I can say it does not happen in a simpler testdir with just the putenv
module, or putenv + allocator modules.
The output of the following command should be useful
for doing that:
gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC
-DEXEEXT=\"\" -I. -I.. \
-DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/tgcware/include -D_REENTRANT
allocator.c
I assume you mean the preprocessed source? The above just reproduces the
error message.
Similarly for the other failures, though I expect there's a common source of
problems here.
I've uploaded preprocessed (gcc -E) source:
http://jupiterrise.com/tmp/allocator.i
http://jupiterrise.com/tmp/c-strtod.i
http://jupiterrise.com/tmp/localeconv.i
Also, found one more include issue that I'd overlooked:
depbase=`echo dtotimespec.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/tgcware/include -D_REENTRANT -g -O2 -MT dtotimespec.o
-MD -MP -MF $depbase.Tpo -c -o dtotimespec.o dtotimespec.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/sys/signal.h:132,
from
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/signal.h:27,
from ./signal.h:52,
from ./sys/select.h:92,
from
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/sys/types.h:431,
from ./sys/types.h:27,
from /usr/include/sys/time.h:71,
from ./sys/time.h:38,
from
/usr/tgcware/gcc-4.3.6/lib/gcc/sparc-sun-solaris2.6/4.3.6/include-fixed/time.h:102,
from ./time.h:39,
from timespec.h:22,
from dtotimespec.c:25:
/usr/include/sys/siginfo.h:229: error: expected specifier-qualifier-list
before 'timestruc_t'
/usr/include/sys/siginfo.h:284: error: expected specifier-qualifier-list
before 'timestruc_t'
make[4]: *** [dtotimespec.o] Error 1
Source here:
http://jupiterrise.com/tmp/dtotimespec.i
-tgc