* 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
* Re: error: conflicting types for 'psignal'
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
0 siblings, 1 reply; 9+ messages in thread
From: Ian Lance Taylor @ 2011-03-18 1:41 UTC (permalink / raw)
To: Michael Zintakis; +Cc: gcc-help
Michael Zintakis <michael.zintakis@googlemail.com> writes:
> -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
This means that the libiberty configure script decided that your system
did not provide the psignal function, although it apparently does.
Look at libiberty/config.log to see if you can find out why libiberty
thinks your system does not support psignal.
> 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.
I also do not recall.
Ian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 1:41 ` Ian Lance Taylor
@ 2011-03-18 1:55 ` Michael Zintakis
2011-03-18 2:08 ` Bryan Hundven
0 siblings, 1 reply; 9+ messages in thread
From: Michael Zintakis @ 2011-03-18 1:55 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
>> -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
>>
>
> This means that the libiberty configure script decided that your system
> did not provide the psignal function, although it apparently does.
>
It is very interesting what I just found! The crosstool-ng has a patch
for the (older) version of binutils (2.20.1) - I am currently using
2.21, so no patches are applied - called "libiberty-pic.patch", which
adds a single line "cp ${TARGETLIB} ../ ; \" to the Makefile.in in
liberty directory from the main binutils source tree. I am hoping this
patch deals with exactly that problem because much earlier versions of
this patch (for binutils 1.16.1) has a detailed explanation of what you
just summarised in your last paragraph above.
So, I have just moved this patch to my 2.21 tree and will see if it
fixes the problem (I have to wait about 40+ minutes though as this error
appears much later in the whole process when I am building the final
version of the gcc compiler, which is the last step of the whole build up!).
> Look at libiberty/config.log to see if you can find out why libiberty
> thinks your system does not support psignal.
>
The config.log has exit code of 0 and "#define HAVE_PSIGNAL 1" as well
as the actual test returning a result "yes", so I am assuming that
everything is OK.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 1:55 ` Michael Zintakis
@ 2011-03-18 2:08 ` Bryan Hundven
2011-03-18 2:17 ` Michael Zintakis
0 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2011-03-18 2:08 UTC (permalink / raw)
To: Michael Zintakis; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
On Thu, Mar 17, 2011 at 6:55 PM, Michael Zintakis
<michael.zintakis@googlemail.com> wrote:
>
>>> -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
>>>
>>
>> This means that the libiberty configure script decided that your system
>> did not provide the psignal function, although it apparently does.
>>
Michael,
> It is very interesting what I just found! The crosstool-ng has a patch for
> the (older) version of binutils (2.20.1) - I am currently using 2.21, so no
> patches are applied - called "libiberty-pic.patch", which adds a single line
> "cp ${TARGETLIB} ../ ; \" to the Makefile.in in liberty directory from the
> main binutils source tree. I am hoping this patch deals with exactly that
> problem because much earlier versions of this patch (for binutils 1.16.1)
> has a detailed explanation of what you just summarised in your last
> paragraph above.
>
> So, I have just moved this patch to my 2.21 tree and will see if it fixes
> the problem (I have to wait about 40+ minutes though as this error appears
> much later in the whole process when I am building the final version of the
> gcc compiler, which is the last step of the whole build up!).
>
>> Look at libiberty/config.log to see if you can find out why libiberty
>> thinks your system does not support psignal.
>>
>
> The config.log has exit code of 0 and "#define HAVE_PSIGNAL 1" as well as
> the actual test returning a result "yes", so I am assuming that everything
> is OK.
>
>
I'm sure Yann can give a better explanation, but we decided to stop
moving patches to newer versions of source components in crosstool-ng
until we can verify the patches with upstream maintainers.
I guess this would be a great time to ask if we can get this patch
merged upstream or at least check the validity of the patch with Ian.
Either way, thanks for testing the patch. Please let us know how the build goes.
-Bryan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 2:08 ` Bryan Hundven
@ 2011-03-18 2:17 ` Michael Zintakis
2011-03-18 2:38 ` Michael Zintakis
0 siblings, 1 reply; 9+ messages in thread
From: Michael Zintakis @ 2011-03-18 2:17 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
> I'm sure Yann can give a better explanation, but we decided to stop
> moving patches to newer versions of source components in crosstool-ng
> until we can verify the patches with upstream maintainers.
>
I posted a couple of (very) detailed messages regarding my ongoing
experience with crosstool-ng to the crossgcc mailing list (problems, bug
fixes as well as questions and ideas), so I am sure when Yann or anyone
else interested in this will pick them up in due course.
> I guess this would be a great time to ask if we can get this patch
> merged upstream or at least check the validity of the patch with Ian.
>
> Either way, thanks for testing the patch. Please let us know how the build goes.
>
Building (with the new patch) is running at present (about 25+ minutes
to go I reckon), so will post the result. If it fails I may as well
downgrade the binutils to version 2.20.1 because there are quite a few
patches there and I think I might have better luck. I did quite a lot of
modifications to the whole process though, but this is not the thread
for it - when I am done I will post the details on the crossgcc mailing
list. Fingers crossed...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 2:17 ` Michael Zintakis
@ 2011-03-18 2:38 ` Michael Zintakis
2011-03-18 4:10 ` Michael Zintakis
0 siblings, 1 reply; 9+ messages in thread
From: Michael Zintakis @ 2011-03-18 2:38 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
> Fingers crossed...
Nope! Same error:
checking for fabsl declaration...
/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....
yes
checking for fabsl... make[3]: Leaving directory
`/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/powerpc-unknown-linux-gnu/libiberty'
make[2]: *** [all-target-libiberty] Error 2
make[2]: *** Waiting for unfinished jobs....
no
I am backtracking now and using 2.20.1 and see if this cures it...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 2:38 ` Michael Zintakis
@ 2011-03-18 4:10 ` Michael Zintakis
2011-03-18 5:21 ` Bryan Hundven
0 siblings, 1 reply; 9+ messages in thread
From: Michael Zintakis @ 2011-03-18 4:10 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
>
> I am backtracking now and using 2.20.1 and see if this cures it...
Build failed at the same point with the same error even when I used
glibc-2.12.2 and binutils-2.20.1, so there must be something
fundamentally wrong there and at present I have no idea what that is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 4:10 ` Michael Zintakis
@ 2011-03-18 5:21 ` Bryan Hundven
2011-03-18 13:36 ` Michael Zintakis
0 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2011-03-18 5:21 UTC (permalink / raw)
To: Michael Zintakis; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
On Thu, Mar 17, 2011 at 9:09 PM, Michael Zintakis
<michael.zintakis@googlemail.com> wrote:
>
>>
>> I am backtracking now and using 2.20.1 and see if this cures it...
>
> Build failed at the same point with the same error even when I used
> glibc-2.12.2 and binutils-2.20.1, so there must be something fundamentally
> wrong there and at present I have no idea what that is.
>
Moving this conversation back to #crossgcc, as I believe the issue is
with crosstool-ng.
-Bryan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: error: conflicting types for 'psignal'
2011-03-18 5:21 ` Bryan Hundven
@ 2011-03-18 13:36 ` Michael Zintakis
0 siblings, 0 replies; 9+ messages in thread
From: Michael Zintakis @ 2011-03-18 13:36 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Ian Lance Taylor, gcc-help, Yann E. MORIN
>>> I am backtracking now and using 2.20.1 and see if this cures it...
>>>
>> Build failed at the same point with the same error even when I used
>> glibc-2.12.2 and binutils-2.20.1, so there must be something fundamentally
>> wrong there and at present I have no idea what that is.
>>
>>
>
> Moving this conversation back to #crossgcc, as I believe the issue is
> with crosstool-ng.
>
Yes, apologies, I'll take the issues I have there!
^ 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).