llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Bootstrap failure "Error: can not do 8 byte pc-relative relocation"

Open pwo opened this issue 17 years ago • 74 comments

Bugzilla Link 5004
Resolution FIXED
Resolved on Feb 15, 2010 18:58
Version trunk
OS FreeBSD
Blocks llvm/llvm-project#4068
CC @asl,@lattner,@davidchisnall,@echristo,@tlattner

Extended Description

Using llvm r82173 and gcc 4.2.1 20070719 as the host compiler the bootstrap of llvm-gcc r82176 fails to bootstrap on FreeBSD/amd64 8.0

/usr/src-local/llvm-gcc/obj/./gcc/xgcc -shared-libgcc -B/usr/src-local/llvm-gcc/obj/./gcc -nostdinc++ -L/usr/src-local/llvm-gcc/obj/x86_64-unknown-freebsd8.0/libstdc++-v3/src -L/usr/src-local/llvm-gcc/obj/x86_64-unknown-freebsd8.0/libstdc++-v3/src/.libs -B/opt/llvm-gcc/x86_64-unknown-freebsd8.0/bin/ -B/opt/llvm-gcc/x86_64-unknown-freebsd8.0/lib/ -isystem /opt/llvm-gcc/x86_64-unknown-freebsd8.0/include -isystem /opt/llvm-gcc/x86_64-unknown-freebsd8.0/sys-include -I/usr/src-local/llvm-gcc/libstdc++-v3/../gcc -I/usr/src-local/llvm-gcc/obj/x86_64-unknown-freebsd8.0/libstdc++-v3/include/x86_64-unknown-freebsd8.0 -I/usr/src-local/llvm-gcc/obj/x86_64-unknown-freebsd8.0/libstdc++-v3/include -I/usr/src-local/llvm-gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -c ../../../../libstdc++-v3/libsupc++/eh_alloc.cc -o eh_alloc.o /var/tmp//ccEBSLfL.s: Assembler messages: /var/tmp//ccEBSLfL.s:757: Error: can not do 8 byte pc-relative relocation /var/tmp//ccEBSLfL.s:772: Error: can not do 8 byte pc-relative relocation /var/tmp//ccEBSLfL.s:793: Error: can not do 8 byte pc-relative relocation gmake[4]: *** [eh_alloc.lo] Error 1 gmake[4]: Leaving directory `/usr/src-local/llvm-gcc/obj/x86_64-unknown-freebsd8.0/libstdc++-v3/libsupc++'

pwo avatar Sep 18 '09 02:09 pwo

mentioned in issue llvm/llvm-bugzilla-archive#5977

asl avatar Nov 27 '21 05:11 asl

Could you apply the patch from http://llvm.org/bugs/attachment.cgi?id=4136 as well ?

Done:

Sending lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp Transmitting file data . Committed revision 96304.

llvmbot avatar Feb 16 '10 02:02 llvmbot

Could you apply the patch from http://llvm.org/bugs/attachment.cgi?id=4136 as well ?

llvmbot avatar Feb 16 '10 02:02 llvmbot

So... finally fixed in commit series r96285-96290

asl avatar Feb 16 '10 00:02 asl

I'm stumped myself. It's not timing out all of the time. And I even have a build which doesn't time out. Maybe it's a "debug" verses "release" build thing? debug also timeouts for me, release - not

asl avatar Feb 16 '10 00:02 asl

... It wasn't timing out last time I worked on it. What happened?

I'm stumped myself. It's not timing out all of the time. And I even have a build which doesn't time out. Maybe it's a "debug" verses "release" build thing?

llvmbot avatar Feb 15 '10 21:02 llvmbot

... It wasn't timing out last time I worked on it. What happened?

echristo avatar Feb 15 '10 20:02 echristo

Created an attachment (id=4223) [details] [details] Updated patch, try 5

Ok, yet another try with one more typo fixed :)

I verified - cp_compat now works :)

It looks good. The only problem I saw was with the "FAIL: g++.dg/eh/cleanup1.C" cleanup1 is nasty - it contains 'just' 4000 cleanups, so, yes, it will definitely time out.

I'm going to say that your last patch works for Darwin. Thanks! :-) Awesome! I'll apply it then.

asl avatar Feb 15 '10 10:02 asl

Created an attachment (id=4223) [details] Updated patch, try 5

Ok, yet another try with one more typo fixed :)

I verified - cp_compat now works :)

It looks good. The only problem I saw was with the "FAIL: g++.dg/eh/cleanup1.C" test. But I've been noticing that it's been compiling really slowly lately. Like, on the order of 36 minutes. So it's basically timing out.

It seems to happen in the front end before it gets to the EH stuff in the llvm-convert.cpp file. I don't have an explanation for it.

I'm going to say that your last patch works for Darwin. Thanks! :-)

llvmbot avatar Feb 15 '10 06:02 llvmbot

Updated patch, try 5 Ok, yet another try with one more typo fixed :)

I verified - cp_compat now works :)

asl avatar Feb 13 '10 19:02 asl

Updated patch attached.

There were 10 regressions in the check-g++. I added the pr5004-4.sum file as an attachment. Thanks! I'll investigate

asl avatar Feb 12 '10 23:02 asl

Updated patch attached.

There were 10 regressions in the check-g++. I added the pr5004-4.sum file as an attachment.

llvmbot avatar Feb 12 '10 23:02 llvmbot

Ok, it turned out to be a silly typo for x86-64 darwin, which leads to assertion you're seeing during test run.

I didn't run the test on darwin - I just compared several assembler outputs to make sure that nothing changed insanely.

Updated patch attached.

Thanks! I'll test this out.

llvmbot avatar Feb 12 '10 21:02 llvmbot

I hope that it was just me running the test incorrectly. How did you run it? Ok, it turned out to be a silly typo for x86-64 darwin, which leads to assertion you're seeing during test run.

I didn't run the test on darwin - I just compared several assembler outputs to make sure that nothing changed insanely.

Updated patch attached.

asl avatar Feb 12 '10 20:02 asl

-ENOATTACH :)

Sorry. Attached. :-) Just to make sure - where did you run the testsuite? On SL?

asl avatar Feb 12 '10 17:02 asl

-ENOATTACH :)

Sorry. Attached. :-)

I hope that it was just me running the test incorrectly. How did you run it?

llvmbot avatar Feb 12 '10 11:02 llvmbot