public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* error: conflicting types for 'psignal'
@ 2011-03-17 23:47 Michael Zintakis
  2011-03-18  1:41 ` Ian Lance Taylor
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Zintakis @ 2011-03-17 23:47 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-03-18 13:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17 23:47 error: conflicting types for 'psignal' Michael Zintakis
2011-03-18  1:41 ` Ian Lance Taylor
2011-03-18  1:55   ` Michael Zintakis
2011-03-18  2:08     ` Bryan Hundven
2011-03-18  2:17       ` Michael Zintakis
2011-03-18  2:38         ` Michael Zintakis
2011-03-18  4:10           ` Michael Zintakis
2011-03-18  5:21             ` Bryan Hundven
2011-03-18 13:36               ` Michael Zintakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).