Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68606 - crossdev always fails in InstallGccBootstrap because of missing "signal.h"
Summary: crossdev always fails in InstallGccBootstrap because of missing "signal.h"
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: PPC Linux
: High major (vote)
Assignee: Joshua Kinard
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-22 17:48 UTC by Niels Werensteijn
Modified: 2005-03-03 17:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Werensteijn 2004-10-22 17:48:19 UTC
when i use crossdev on my pcc to make a crosscompiler for i686 i get stuck at  InstallGccBootstrap(), Line 1439

I tried both the portage 0.4 version as the latest from cvs.

the actual error:
/var/tmp/portage/crossdevbuild/gcc-3.3.4/buildboothere-i686/gcc/xgcc -B/var/tmp/portage/crossdevbuild/gcc-3.3.4/buildboothere-i686/gcc/ -B/home/crossdev/i686/i686-pc-linux-gnu/bin/ -B/home/crossdev/i686/i686-pc-linux-gnu/lib/ -isystem /home/crossdev/i686/i686-pc-linux-gnu/include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -DHAVE_SYSLOG -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -D_LIBC_PROVIDES_SSP_ -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include  -DL_negdi2 -c ../../gcc/libgcc2.c -o libgcc/./_negdi2.o
In file included from tconfig.h:23In file included from tconfig.h:23,
                 from ../../gcc/libgcc2.c:40:
../../gcc/config/i386/linux.h:253:20: signal.h: No such file or directory
,
                 from ../../gcc/libgcc2.c:40:
../../gcc/config/i386/linux.h:253:20: ../../gcc/config/i386/linux.h:254:26: sys/ucontext.h: No such file or directory
signal.h: No such file or directory
../../gcc/config/i386/linux.h:254:26: sys/ucontext.h: No such file or directory

I also tried to make a ppc compiler on a x86 host. using gcc 3.4.1 (since thats default for ppc):
/var/tmp/portage/crossdevbuild/gcc-3.4.1/buildboothere-ppc/gcc/xgcc -B/var/tmp/portage/crossdevbuild/gcc-3.4.1/buildboothere-ppc/gcc/ -B/home/crossdev/ppc/powerpc-unknown-linux-gnu/bin/ -B/home/crossdev/ppc/powerpc-unknown-linux-gnu/lib/ -isystem /home/crossdev/ppc/powerpc-unknown-linux-gnu/include -isystem /home/crossdev/ppc/powerpc-unknown-linux-gnu/sys-include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -DHAVE_SYSLOG -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -D_LIBC_PROVIDES_SSP_ -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include   -DL_negdi2 -c ../../gcc/libgcc2.c -o libgcc/./_negdi2.o
In file included from ./tm.h:10,
                 from ../../gcc/libgcc2.c:43:
../../gcc/config/rs6000/linux.h:104:20: signal.h: No such file or directory

different source file, same error.


Reproducible: Always
Steps to Reproduce:
1. crossdev.sh --arch=i686

Actual Results:  
/var/tmp/portage/crossdevbuild/gcc-3.3.4/buildboothere-i686/gcc/xgcc
-B/var/tmp/portage/crossdevbuild/gcc-3.3.4/buildboothere-i686/gcc/
-B/home/crossdev/i686/i686-pc-linux-gnu/bin/
-B/home/crossdev/i686/i686-pc-linux-gnu/lib/ -isystem
/home/crossdev/i686/i686-pc-linux-gnu/include -O2  -DIN_GCC -DCROSS_COMPILE   -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include  -fPIC -DHAVE_SYSLOG -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -D_LIBC_PROVIDES_SSP_ -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/config -I../../gcc/../include  -DL_negdi2 -c ../../gcc/libgcc2.c -o
libgcc/./_negdi2.o
In file included from tconfig.h:23In file included from tconfig.h:23,
                 from ../../gcc/libgcc2.c:40:
../../gcc/config/i386/linux.h:253:20: signal.h: No such file or directory
,
                 from ../../gcc/libgcc2.c:40:
../../gcc/config/i386/linux.h:253:20: ../../gcc/config/i386/linux.h:254:26:
sys/ucontext.h: No such file or directory
signal.h: No such file or directory
../../gcc/config/i386/linux.h:254:26: sys/ucontext.h: No such file or directory

 * An Error has occured!

 * Function:    InstallGccBootstrap(), Line 1439
 * Message:     Failed to compile!


Expected Results:  
hoped it would cleanly compile

during the patching phase of gcc (3.3.4-r1) i noticed this warning / errormessage:
 *  Fixing ${S}/ltconfig...
 * PLEASE CHECK /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/ltconfig          
                                                       [ !! ]
Comment 1 Niels Werensteijn 2004-10-25 17:06:16 UTC
I think this thread is relevant:
http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00393.html

Apparently other people think that instead of patching the headers in gcc, we should run a configure on glibc and then make install-headers before doing a gcc bootstrap.

I myself patched the .h files and it worked. But i think this is not a viable option for crossdev, and is should do the glibc header-install thing.
Comment 2 Joshua Kinard gentoo-dev 2004-10-26 02:27:55 UTC
You are pretty correct, the glibc-headers install thing is the RightWay(TM) to do things.  However, there are other ways, too, as the starter of that thread implies.  While other people on that thread are correct in suggesting the right way, the proposed method there was already done for mips in gcc's source.  Whether that little change slipped in during a time of less scrutiny or not, I'm not entirely sure.

I did implement a glibc-headers once, but as mentioned, I ran into glibc being a bit of an obstinate cow, and refusing to work w/o an already existing cross-gcc.  a.k.a., chicken & egg.  I later yanked that code, and figured when the time came to really tackle the problem, I'd figure a solution then.

Since mips already uses the -Dinhibit_libc trick, this is the route I'm probably going to take as well, and it'll be a patch applied only when crossdev runs by passing a 'crossdev' USE flag to apply the patch.  I haven't implemented this yet, but will in the future (not too distant I hope, depends when I get a chance and motivation to toy with crossdev some more).
Comment 3 Niels Werensteijn 2004-10-26 08:55:14 UTC
Well ok :)
i patched my gcc/config/i386/linux.h manualy, and it made gcc compile the bootstraped gcc. Your solution does imply that you might have to patch almost every linux.h (haven't checked). But I suppose some sed script can take care of that.

Now I just have to get glibc to compile :)
Comment 4 SpanKY gentoo-dev 2005-03-03 17:36:42 UTC
<=crossdev-0.4 is no longer supported ... please upgrade to crossdev-0.9 and if
you're still having problems, re-open the bug and re-assign to toolchain@gentoo.org