Closed llvmbot closed 15 years ago
Yes. Thanks.
So it's fixed, right?
Looks like fix for pr3954 has fixed this problem as well.
This bug comes to life again during compilation of llvm-gcc-4.2! Sorry.
svn version : 67763
I encountered the assertion failure while compiling my project using llvm based x86_64->ARM cross compiler. I attached is a simplified versions of .bc and .ll.
Thanks.
Both test cases should have been fixed by r64745. Please check.
bit code of libgcc2.c I also get the following assertion failure during my attempt to build an x86_64->ARM cross compiler.
bitcode of regex.c Hi Evan,
Hopefully this is right :)
Can you attach a bitcode file? Just re-run xgcc ... -c with -emit-llvm. Thanks.
Reduced testcase; regex.i will be attached.
/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/bin/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/lib/ -c -O2 -g -O2 -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat regex.i -o regex.o
Thanks Chris - I feel silly now (s/--with-llvm/--enable-llvm/) :)
That got me much further, and I ran into http://llvm.org/bugs/show_bug.cgi?id=896, so I had to add --disable-shared to the flags.
With the new flags:
../configure --prefix=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install --enable-languages=c,c++ --enable-checking --disable-bootstrap --disable-multilib --disable-shared --target=arm-linux --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --with-build-sysroot=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/ --enable-llvm=$LLVMOBJDIR
I eventually run into:
Checking multilib configuration for libstdc++-v3...
Checking multilib configuration for libiberty...
make[2]: Entering directory /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/arm-linux/libiberty' if [ x"" != x ]; then \ /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/bin/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/lib/ -isystem /home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/include -isystem /home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2 --sysroot=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/ -I. -I../../../libiberty/../include -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat ../../../libiberty/regex.c -o pic/regex.o; \ else true; fi /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/bin/ -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/lib/ -isystem /home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/include -isystem /home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/arm-linux/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2 --sysroot=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/ -I. -I../../../libiberty/../include -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat ../../../libiberty/regex.c -o regex.o cc1: /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm/lib/CodeGen/RegisterScavenging.cpp:273: void llvm::RegScavenger::forward(): Assertion
(isReserved(Reg) || isUnused(Reg) || IsImpDef || isImplicitlyDefined(Reg) || isLiveInButUnusedBefore(Reg, MI, MBB, TRI, MRI)) && "Re-defining a live register!"' failed.
../../../libiberty/regex.c:8126: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[2]: *** [regex.o] Error 1
Should I file a separate report for this, and what information would be most useful to you guys?
If you are crashing in jump.c, then you have a non-llvm gcc. Make sure to pass --enable-llvm properly.
-Chris
This might be a piece of the puzzle: it seems to be the only significant difference between stock gcc 4.2's jump.c and llvm-gcc's:
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/jump.c?r1=43927&r2=43926&pathrev=43927
Extended Description
Hi all,
I'm quite new to this, so hopefully this is a real bug and not my fault :)
I'm trying to compile cross-compile llvm-gcc trunk for arm-linux from my Kubuntu 8.04 x86 Linux install, and have run into many build errors, including what appears to be an internal compiler error.
Firstly, the commit:
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?r1=54175&r2=54174&pathrev=54175
seems to have removed some stuff necessary for arm.c and arm.md to compile on a non-Darwin host - in particular, the definitions of MACHO_DYNAMIC_NO_PIC_P, ENCODED_SHORT_CALL_ATTR_P and ENCODED_LONG_CALL_ATTR_P. Reverting some of these changes allows us to proceed (see attached patch).
After that, I ./configure llvm-gcc trunk from an obj/ subdir as follows (the full path to this obj/ dir is /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc) :
./configure --prefix=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install --enable-languages=c,c++ --enable-checking --disable-bootstrap --disable-multilib --target=arm-linux --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --with-build-sysroot=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install/ --with-llvm=$LLVMOBJDIR
(the same configuration, passed to stock gcc 4.2, leads to a successful cross compilation, so I think this is llvm-gcc-specific).
Running make eventually descends into /home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/gcc/ and tries to run the "xgcc" executable that has been created on crtstuff.c and an internal compiler error is generated. After getting the preprocessed stuff and ditching all the -I and -D flags, I've reduced the call to the relatively self-contained:
/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc -B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/ -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fPIC -c crtstuff-preprocessed.c -o crtbeginS.o
(crtstuff-preprocessed.c is attached) and the following error is produced:
../../gcc/crtstuff.c: In function ‘__do_global_dtors_aux’: ../../gcc/crtstuff.c:334: internal compiler error: in mark_jump_label, at jump.c:1144 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions.
The corresponding call, adapted for cross-compilation of the stock gcc 4.2, works without incident.
If you need any more info, please let me know :)