Any idea what might cause this error?
I am getting it during build up of the (full) gcc (4.5.2). The make log is:
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/xgcc
-B/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/bin/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/lib/
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/include
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sys-include
-c -DHAVE_CONFIG_H -g -Os -I.
-I/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/../include -W -Wall
-Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic
/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/strsignal.c -o strsignal.o
/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/strsignal.c:554:1:
error: conflicting types for 'psignal'
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h:150:13:
note: previous declaration of 'psignal' was here
make[3]: *** [strsignal.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/powerpc-unknown-linux-gnu/libiberty'
yes
checking for log10l... make[2]: *** [all-target-libiberty] Error 2
make[2]: *** Waiting for unfinished jobs....
Quick check with grep reveals that there are a couple of variants of
signal.h defined, though I have no idea what might be the one which
triggers this message.
[mz@test1 install]$ find . | grep signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/asm-generic/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/asm/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/linux/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/sys/signal.h
[mz@test1 install]$ grep -r psignal
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/
| more
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h:extern
void psignal (int __sig, __const char *__s);
The source file strsignal.c:554 has this:
-------------------------------------------
#ifndef HAVE_PSIGNAL
void
psignal (int signo, char *message)
{
if (signal_names == NULL)
{
init_signal_tables ();
}
if ((signo <= 0) || (signo >= sys_nsig))
{
fprintf (stderr, "%s: unknown signal\n", message);
}
else
{
fprintf (stderr, "%s: %s\n", message, sys_siglist[signo]);
}
}
#endif /* ! HAVE_PSIGNAL */
------------------------------------------
So, I presume that if HAVE_PSIGNAL has not been defined for some reason
(which I think is what causes this error, I might be wrong though!) the
definition in strsignal.c differs from the one already found by gcc.
Ian, if you are reading this when I searched google for possible causes
I found your post (http://www.spinics.net/lists/gcchelp/msg28087.html),
but it was unclear to me as to whether this problem was solved in the
end or what was the root cause for this error.