public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Error compiling/linking
@ 2005-03-29  1:58 Speed
  2005-03-29  7:59 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Speed @ 2005-03-29  1:58 UTC (permalink / raw)
  To: u-boot

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.

-- 
Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Error compiling/linking
  2005-03-29  1:58 [U-Boot-Users] Error compiling/linking Speed
@ 2005-03-29  7:59 ` Wolfgang Denk
  2005-03-29 11:31   ` Daniel Ann
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2005-03-29  7:59 UTC (permalink / raw)
  To: u-boot

Dear Daniel,

in message <9b7ca65705032817584e803f61@mail.gmail.com> 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.

> 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

> 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_

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Error compiling/linking
  2005-03-29  7:59 ` Wolfgang Denk
@ 2005-03-29 11:31   ` Daniel Ann
  2005-03-29 13:36     ` Wolfgang Denk
  2005-03-31  1:21     ` Debian User
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Ann @ 2005-03-29 11:31 UTC (permalink / raw)
  To: u-boot

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.

On Tue, 29 Mar 2005 09:59:23 +0200, Wolfgang Denk <wd@denx.de> wrote:
> Dear Daniel,
> 
> in message <9b7ca65705032817584e803f61@mail.gmail.com> 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.
> 
> > 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
> 
> > 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_
> 


-- 
Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Error compiling/linking
  2005-03-29 11:31   ` Daniel Ann
@ 2005-03-29 13:36     ` Wolfgang Denk
  2005-03-31  1:21     ` Debian User
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2005-03-29 13:36 UTC (permalink / raw)
  To: u-boot

Dear Daniel,

in message <9b7ca657050329033133e2f746@mail.gmail.com> 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.

> 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.

> 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

-- 
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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Error compiling/linking
  2005-03-29 11:31   ` Daniel Ann
  2005-03-29 13:36     ` Wolfgang Denk
@ 2005-03-31  1:21     ` Debian User
  2005-03-31  5:06       ` Daniel Ann
  1 sibling, 1 reply; 6+ messages in thread
From: Debian User @ 2005-03-31  1:21 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 29, 2005 at 08:31:06PM +0900, Daniel Ann 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.
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Error compiling/linking
  2005-03-31  1:21     ` Debian User
@ 2005-03-31  5:06       ` Daniel Ann
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Ann @ 2005-03-31  5:06 UTC (permalink / raw)
  To: u-boot

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,


On Wed, 30 Mar 2005 17:21:21 -0800, Debian User <acmay@acmay.homeip.net> wrote:
> On Tue, Mar 29, 2005 at 08:31:06PM +0900, Daniel Ann 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.
> > 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.
> 


-- 
Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-31  5:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-29  1:58 [U-Boot-Users] Error compiling/linking Speed
2005-03-29  7:59 ` Wolfgang Denk
2005-03-29 11:31   ` Daniel Ann
2005-03-29 13:36     ` Wolfgang Denk
2005-03-31  1:21     ` Debian User
2005-03-31  5:06       ` Daniel Ann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox