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

Shapiro, Alex (OTTAWA) Alex.Shapiro at windriver.com
Thu Jun 7 21:22:08 CEST 2007


 
Siarhei,

>Configure just does not have support for c++crosscompiler and host 
>g++ is used to compile *.cpp files (producing object files in host 
>g++ system
>format).

Thanks !
Very nice, the solution is to add the "CXX = $_cc" to configure. Now
mplayer
Linked, thanks!
-- 

><offtopic>
>By the way, Alex, are you using/building some kind of alternative
non-Nokia firmware for Nokia 770?
></offtopic>
I'm using the original Nokia firmware, but with Qtopia-opensource-4.2.1
user interface (instead of Nokia 770 Internet Tablet).

Alex

-----Original Message-----
From: Siarhei Siamashka [mailto:siarhei.siamashka at gmail.com] 
Sent: Wednesday, June 06, 2007 5:34 PM
To: mplayer-dev-eng at mplayerhq.hu
Cc: Shapiro, Alex (OTTAWA)
Subject: Re: [MPlayer-dev-eng] FW: Link error - Relocations in
genericELF(EM: 3)

On Wednesday 06 June 2007 17:58, Shapiro, Alex (OTTAWA) wrote:
> My libmpdemux.a Makefile has the following line:
> SRCS_COMMON-$(STREAMING_LIVE555)       += demux_rtp.cpp
> demux_rtp_codec.cpp

Just did a test with crosscompiling mplayer again and figured out what's
the problem. Configure just does not have support for c++crosscompiler
and host 
g++ is used to compile *.cpp files (producing object files in host 
g++ system
format).

Crosscompiling after configuring with '--disable-live' is fine. But if
you want to enable live support, you need to set CXX variable for gnu
makefile properly (it is used in default implicit rules for compiling
files having .cpp extension). Some kind of patch is attached (not sure
if it can be considered clean as it replaces invocation of 'g++' with
'gcc', but it fixes this particular crosscompilation problem). A better
fix would be probably to add some extra '--cxx=' option to configure,
but I'm not good with shell scripts programming.


Also here are some instructions for those who use gentoo linux and would
like to reproduce/test crosscompilation of all this c++ stuff for ARM
(if anybody is interested of course):

1. Get the crosscompiler installed.
Run
# emerge crossdev
# crossdev --target arm-softfloat-linux-gnueabi

2. Compile live with ARM crosscompiler.
Download the sources of live (http://live555.com/liveMedia/), edit
'config.armlinux' file and change the following variables to:
CROSS_COMPILE=		arm-softfloat-linux-gnueabi-
CPLUSPLUS_COMPILER =	$(CROSS_COMPILE)g++
LINK =			$(CROSS_COMPILE)g++ -o

After editing is done, just run
# ./genMakefiles armlinux
# make

3. Checkout mplayer trunk from SVN, configure and compile it #
CFLAGS="-O2 -mcpu=arm926ej-s" ./configure --enable-cross-compile
--cc=arm-softfloat-linux-gnueabi-gcc --as=arm-softfloat-linux-gnueabi-as
--target=arm-linux --host-cc=gcc
--with-extraincdir=<full_path_to_live_directory>
--with-extralibdir=<full_path_to_live_directory>
# make

That's all

<offtopic>
By the way, Alex, are you using/building some kind of alternative
non-Nokia firmware for Nokia 770?
</offtopic>



More information about the MPlayer-dev-eng mailing list