This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: internel error compiling X


Marc Britten wrote:
I built a toolchain based off of crosstool 0.28 rc23 using the default ARM options (uncommented demo-arm.sh) to build gcc3.4.

I'm currently attempting to crosscompile X.org using these directions.
http://www.handhelds.org/minihowto/building-x.html (I needed to link the arm-unknown-linux-gnu-* to * to get X to build)

That sounds fishy, but then I've never cross-built X!


after a long time (you know X builds) I get this

/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin//`echo gcc|sed "s%.*/%%"` -c -O3 -fsigned-char -I. -I../../include/extensions -I../.. -I../../exports/include -Dlinux -D__arm__ -D__arm32__ -U__arm -Uarm -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DXVENDORNAME='"The X.Org Foundation"' -DXVENDORNAMESHORT='"X.Org"' -fPIC xkbout.c
xkbout.c: In function `XkbWriteXKBGeometry':
xkbout.c:936: error: insn does not satisfy its constraints:
(insn:HI 2033 2790 2791 85 (set (reg:SI 1 r1 [ <variable>.name ])
(mem/s:SI (post_modify:SI (reg:SI 3 r3)
(plus:SI (reg:SI 3 r3)
(const_int 48 [0x30]))) [15 <variable>.name+0 S4 A32])) 125 {*arm_movsi_insn} (nil)
(expr_list:REG_INC (reg:SI 3 r3)
(nil)))
xkbout.c:936: internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1549
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [xkbout.o] Error 1

This looks like a gcc bug. Here's what to do:


First, do a google search for the error message
   "internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1549"
(notice I removed any mention of the source file you were compiling).
The first hit looks good; it's
   http://gcc.gnu.org/ml/gcc-bugs/2004-05/msg01800.html
This links to
   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15499
The short name for this page is
   http://gcc.gnu.org/PR15499
It is in state 'unconfirmed'.
You should add a note to that bug saying how you got the error.

You should then also attach a minimal preprocessed test case if possible.
First step is to make a little shell script that reproduces
the problem.  e.g.

#!/bin/sh
cd directory-make-was-in-when-it-quit-but-you-removed-that-part-of-the-log :-)
/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/gcc -c -O3  \
 -fsigned-char  -I. -I../../include/extensions
  -I../.. -I../../exports/include   -Dlinux -D__arm__ -D__arm32__ -U__arm
 -Uarm -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE
 -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE
 -DFUNCPROTO=15 -DNARROWPROTO -DXVENDORNAME='"The X.Org Foundation"'
 -DXVENDORNAMESHORT='"X.Org"'  -fPIC xkbout.c

Once that works, add the option -save-temps, and copy the resulting xkbout.i
to your home directory.  Then verify that it causes the same crash, e.g.

/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/gcc -c -O3  \
 -fsigned-char -fPIC xkbout.i

Once you've achieved that, start trying to remove more and more of the xkbout.i
file while preserving the crash.  (Hint: remove everything after the crash first.)
Once you have xkbout.i whittled down as small as you can while still seeing
the gcc crash, *then* you're ready to attach it to the gcc bug report
at http://gcc.gnu.org/PR15499

This takes some patience but it's worth it, as the smaller the .i file,
the more likely a compiler developer will actually read it and fix the problem!
Sometimes it takes me hours to whittle them down, but I've gotten them as
small as four lines, and the problem really jumps out then.  100 lines is
also an ok size.  1000 is not quite as good.
- Dan

--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]