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

Siarhei Siamashka siarhei.siamashka at gmail.com
Wed Jun 6 23:34:25 CEST 2007


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 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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxx-crosscompile-configure-fix.diff
Type: text/x-diff
Size: 284 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070607/385d6e29/attachment.diff>


More information about the MPlayer-dev-eng mailing list