Error compiling/linking
I'm trying to compile latest U-boot I downloaded from CVS using the cross compiler I made using crosstool, but getting error without any print outs that I can work with.
First, this is what I'm using to compile,
Redhat 9.0
gcc-3.2.3
glibc-2.2.5
As for u-boot version ? I'd guess u-boot-1.1.2+alpha (its fresh from CVS I got today)
make Sandpoint8245_config
make CROSS_COMPILE=powerpc-linux- all
Below is where the error actually occured. ===============START==================
<No error above this line>
a - virtex2.o
a - xilinx.o
make[1]: Leaving directory /tmp/u-boot-cvs/common' UNDEF_SYM=powerpc-linux-objdump -x lib_generic/libgeneric.a board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
powerpc-linux-ld -Bstatic -T/tmp/u-boot-cvs/board/a3000/u-boot.lds -Ttext 0xFFF00000 -n
$UNDEF_SYM cpu/mpc824x/start.o \
--start-group lib_generic/libgeneric.a
board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /opt/crosstool/powerpc-linux/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/powerpc-linux/3.2.3/nof -lgcc \
-Map u-boot.map -o u-boot
make: *** [u-boot] Error 139
===============END=====================
As you can see, no real helpful message here.
If only there was.. I could have solved it :)
BTW, I was able to compile this using much older compiler (gcc-2.95.3) so.. I guess its not a u-boot issue, but having gone thru the disscusions, I've found only one instance of such error reported, (without any reply) so I figured I'd post it here for any thoughts.
If I've missed any info, let me know..
thanks
PS. I'm getting same error with the u-boot-1.1.2 package also.
Signature · 1 line
Daniel
Dear Daniel,
Quoted 3 lines · in message <[email protected]> you wrote:
I'm trying to compile latest U-boot I downloaded from CVS using the cross compiler I made using crosstool, but getting error without any print outs that I can work with.
General rule: if you don't get any error messages then try running the commands by hand onthe command line.
Quoted 23 lines
UNDEF_SYM=`powerpc-linux-objdump -x lib_generic/libgeneric.a board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.a
fs/cramfs/libcramfs.afs/fat/libfat.afs/fdos/libfdos.afs/jffs2/libjffs2.afs/reiserfs/libreiserfs.afs/ext2/libext2fs.anet/libnet.adisk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.adrivers/sk98lin/libsk98lin.apost/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
powerpc-linux-ld -Bstatic -T/tmp/u-boot-cvs/board/a3000/u-boot.lds-Ttext0xFFF00000-n
$UNDEF_SYMcpu/mpc824x/start.o\
--start-group lib_generic/libgeneric.a
board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.afs/cramfs/libcramfs.afs/fat/libfat.afs/fdos/libfdos.afs/jffs2/libjffs2.afs/reiserfs/libreiserfs.afs/ext2/libext2fs.anet/libnet.adisk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.adrivers/sk98lin/libsk98lin.apost/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L/opt/crosstool/powerpc-linux/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/powerpc-linux/3.2.3/nof-lgcc \
-Map u-boot.map -o u-boot
make: *** [u-boot] Error 139
Quoted 2 lines
As you can see, no real helpful message here.
If only there was.. I could have solved it :)
Most probably either the invocation of "powerpc-linux-objdump" or that of "powerpc-linux-ld" fail with a segmentation violation. Try running these commands step by step on the command line.
I bet there will be an error message from your shell.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He'd heard her use that sweet, innocent tone of voice before. It
meant that, pretty soon, there was going to be trouble.
- Terry Pratchett, _Truckers_Gotcha. I've done exactly what you said, and finally got it compiled. But the way I've done it, is not really comforting if you know what I mean.
After trying the compilation from the command line, I've found out the powerpc-linux-objdump was okay. But had segmentation fault during powerpc-linux-ld.
So, doing rather simple trial and error method, I've got it compiled after removing line which reads "-Map u-boot.map".
So, here is my concern, what exactly have I removed ?
I've got a feeling I'm running around blind folded, so any tips and hints on this would be much appreciated.
Also, if that line is causing the compilation error, where do you think I should start looking ?
Thanks heaps.
Quoted 53 lines · Wolfgang Denk
Dear Daniel,
Quoted 3 lines · in message <[email protected]> you wrote:
I'm trying to compile latest U-boot I downloaded from CVS using the cross compiler I made using crosstool, but getting error without any print outs that I can work with.
General rule: if you don't get any error messages then try running the commands by hand onthe command line.
Quoted 23 lines
UNDEF_SYM=`powerpc-linux-objdump -x lib_generic/libgeneric.a board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.a
fs/cramfs/libcramfs.afs/fat/libfat.afs/fdos/libfdos.afs/jffs2/libjffs2.afs/reiserfs/libreiserfs.afs/ext2/libext2fs.anet/libnet.adisk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.adrivers/sk98lin/libsk98lin.apost/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
powerpc-linux-ld -Bstatic -T/tmp/u-boot-cvs/board/a3000/u-boot.lds-Ttext0xFFF00000-n
$UNDEF_SYMcpu/mpc824x/start.o\
--start-group lib_generic/libgeneric.a
board/a3000/liba3000.a cpu/mpc824x/libmpc824x.a lib_ppc/libppc.afs/cramfs/libcramfs.afs/fat/libfat.afs/fdos/libfdos.afs/jffs2/libjffs2.afs/reiserfs/libreiserfs.afs/ext2/libext2fs.anet/libnet.adisk/libdisk.a rtc/librtc.a dtt/libdtt.adrivers/libdrivers.adrivers/sk98lin/libsk98lin.apost/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L/opt/crosstool/powerpc-linux/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/powerpc-linux/3.2.3/nof-lgcc \
-Map u-boot.map -o u-boot
make: *** [u-boot] Error 139Quoted 2 lines
As you can see, no real helpful message here.
If only there was.. I could have solved it :)Most probably either the invocation of "powerpc-linux-objdump" or that of "powerpc-linux-ld" fail with a segmentation violation. Try running these commands step by step on the command line.
I bet there will be an error message from your shell.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de He'd heard her use that sweet, innocent tone of voice before. It meant that, pretty soon, there was going to be trouble.
- Terry Pratchett, _Truckers_
Signature · 1 line
Daniel
Dear Daniel,
Quoted 4 lines · in message <[email protected]> you wrote:
After trying the compilation from the command line, I've found out the powerpc-linux-objdump was okay. But had segmentation fault during powerpc-linux-ld.
That was what I expected.
Quoted 4 lines
So, doing rather simple trial and error method, I've got it compiled after removing line which reads "-Map u-boot.map".
So, here is my concern, what exactly have I removed ?
Nothing important. that option causes the linker to print a linker map to file "u-boot.map". Normally nobody ever cares about this file, except when you are trying to find out where memory is being spent or how to layout your linker script to optimize flash usage.
Quoted 2 lines
Also, if that line is causing the compilation error, where do you think I should start looking ?
File a bug report to the binutils folks. It must never dump core, no matter which options are given (and especially not on valid options).
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It's hard to make a program foolproof because fools are so ingenious.
Quoted 5 lines · Daniel Ann
After trying the compilation from the command line, I've found out the powerpc-linux-objdump was okay. But had segmentation fault during powerpc-linux-ld.
So, doing rather simple trial and error method, I've got it compiled after removing line which reads "-Map u-boot.map".
Try a touch u-boot.map before the ld command. I have seen some ld's crash when the file isn't there. Never spent much time look at it or reporting it, but it isn't a problem on newer versions so I thought it was known/resolved.
Hi there <debian user>,
I've tried touching the file first, but with no luck. I didnt think this would be the problem since it successfully creates the u-boot.map file.
However, I'm not certain if it created the whole map file or not, but if anyone is interested, last few lines of the map file reads,
////////////////////////////////////////
.rela.got
*(.rela.got)
.rel.ctors
*(.rel.ctors)
.rela.ctors
//////////////////////////////////////
As for now, I've filed bug report for binutil. We'll see if they have better luck with it.
Cheers,
Quoted 12 lines · Debian User
Quoted 5 lines · Daniel Ann
After trying the compilation from the command line, I've found out the powerpc-linux-objdump was okay. But had segmentation fault during powerpc-linux-ld.
So, doing rather simple trial and error method, I've got it compiled after removing line which reads "-Map u-boot.map".Try a touch u-boot.map before the ld command. I have seen some ld's crash when the file isn't there. Never spent much time look at it or reporting it, but it isn't a problem on newer versions so I thought it was known/resolved.
Signature · 1 line
Daniel