[MPlayer-dev-eng] FW: Link error - Relocations in generic ELF(EM: 3)

Shapiro, Alex (OTTAWA) Alex.Shapiro at windriver.com
Wed Jun 6 02:33:29 CEST 2007


Hi Carl, Siarhei,

First I'd like to mention that the svn version I'm working, downloaded 5
days ago.

>I don't have a cross compiler on my linux system (and I couldn't find 
>anything like "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" using 
>Google), so I can't try myself, but I think a few answers may help:

The "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" is part of my ARM
toolchain that I'm using for Linux projects for my NOKIA-770. Before the
compilation starts, there is a stage that we unpacking, extracting
mplayer-checkout-snapshot.tar.bz2, creating patch list (may 3 small
patches that I created from rc1), patching, checking all configure flags
against makefile ("Makefile from workspace-nokia770_layer-dist-mplayer")
and generating config.mak & config.h files with following configuration:

>What configure line are you using?

./configure --target=arm-linux --host-cc=gcc --enable-debug
--disable-freetype --enable-network
--with-extraincdir=/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Pla
tform_prj/host-cross/arm-wrs-linux-gnueabi/lib/live
--with-extralibdir=/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Pla
tform_prj/host-cross/arm-wrs-linux-gnueabi/lib/live --disable-ftp
--disable-faad-internal --disable-dvdread --disable-tv --disable-tv-v4l1
--disable-tv-v4l2 --enable-fbdev --disable-mencoder --disable-gui
--disable-win32dll --disable-x11

>You mention "Makefile from workspace-nokia770_layer-dist-mplayer" -
does 
>this mean you use a patched Makefile, not the one provided by svn
checkout?

After the configuration stage finish, the compilation starts with the
Makefile that provided by svn checkout.

Are you suggesting that there are patches from svn that have to be
applied as well?

>Does the compilation succeed if you use --disable-live (or don't 
>provide the necessary include directory)?

I tried adding "--disable-live" and removing
"--with-extraincdir=$(HOST_CROSS_LIB_DIR)/live" and
"--with-extralibdir=$(HOST_CROSS_LIB_DIR)/live", the compilation and
link are successfully finished! The link output (link-out.txt) is
attached.

>If I understand that correctly, you suspect the linking stage not using
the correct 
>toolchain. Did you try to link manually by copying the line and
changing the 
>beginning to use the correct path?

I checked if *.a files are compiled for ARM architecture (using 'readelf
-h somefile.a') as suggested by Siarhei. It compiled for ARM
architecture, see results is in attached readelf.txt file.

With the correct toolchain: (no output = linkage succeed)
[dsodemo at WindRiverVM build]$
arm-wrs-linux-gnueabi-armv5tel-glibc_small-ranlib
./mplayer-checkout-2007-06-01/libavcodec/libavcodec.a
[dsodemo at WindRiverVM build]$

With incorrect toolchain:
[dsodemo at WindRiverVM build]$
/home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/
arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld
./mplayer-checkout-2007-06-01/libavcodec/libavcodec.a
/home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/
arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld:
warning: cannot find entry symbol _start; not setting start address
[dsodemo at WindRiverVM build]$


Thanks,
Alex

-----Original Message-----
From: mplayer-dev-eng-bounces at mplayerhq.hu
[mailto:mplayer-dev-eng-bounces at mplayerhq.hu] On Behalf Of Carl Eugen
Hoyos
Sent: Tuesday, June 05, 2007 4:35 PM
To: mplayer-dev-eng at mplayerhq.hu
Subject: Re: [MPlayer-dev-eng] FW: Link error - Relocations in generic
ELF(EM: 3)

Hi!

Shapiro, Alex (OTTAWA <Alex.Shapiro <at> windriver.com> writes:

> I have a link error with my released version of mplayer package. At 
> the end of compilation with (my arm toolchain) "ccache 
> arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and 
> immediately failed with the following error:

I don't have a cross compiler on my linux system (and I couldn't find
anything like "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" using
Google), so I can't try myself, but I think a few answers may help:

You mention "Makefile from workspace-nokia770_layer-dist-mplayer" - does
this mean you use a patched Makefile, not the one provided by svn
checkout?

Does the compilation succeed if you use --disable-live (or don't provide
the necessary include directory)?

What configure line are you using?

[...]

> The path
> /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gc
> c/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ 
> is pointing to 
> /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/arm-wrs-linux
> -g nueabi/bin (it's  my  native Linux toolchain), when actually it 
> should point to (my arm toolchain)  in:
> /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin.

If I understand that correctly, you suspect the linking stage not using
the correct toolchain. Did you try to link manually by copying the line
and changing the beginning to use the correct path?

Carl Eugen

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: readelf.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070605/f0154d48/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: link-out.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070605/f0154d48/attachment-0001.txt>


More information about the MPlayer-dev-eng mailing list