Build MPlayer

From OpenTom

Jump to: navigation, search

1) You need a working cross toolchain, the binaries arm-9tdmi-linux-gnu-gcc and arm-9tdmi-linux-gnu-as must be in your path.

2) call the 'configure'-script with the following options:

  • --prefix=/usr
  • --target=arm-linux-gnu
  • --cc=arm-9tdmi-linux-gnu-gcc
  • --host-cc=gcc --as=arm-9tdmi-linux-gnu-as
  • --disable-md5sum
  • --disable-pnm
  • --disable-tga
  • --disable-mpdvdkit
  • --disable-libmpeg2
  • --disable-mp3lib
  • --disable-liba52
  • --disable-ftp
  • --disable-internal-matroska
  • --disable-tv
  • --disable-network
  • --disable-edl
  • --disable-dvbhead
  • --disable-libavformat

Here are all the options on one line, to make them easier to copy and paste:

# ./configure --prefix=/usr --target=arm-linux-gnu --cc=arm-9tdmi-linux-gnu-gcc --host-cc=gcc --as=arm-9tdmi-linux-gnu-as --disable-md5sum --disable-pnm --disable-tga --disable-mpdvdkit --disable-libmpeg2 --disable-mp3lib --disable-liba52 --disable-ftp --disable-internal-matroska --disable-tv --disable-network --disable-edl  --disable-dvbhead --disable-libavformat

I had to use these parameters to get video to play back with mplayer-1.0rc2 :

  1. ./configure --prefix=/usr --target=arm-linux-gnu --cc=arm-linux-gcc --host-cc=gcc --as=arm-linux-as --disable-md5sum --disable-pnm --disable-tga --disable-dvdnav --disable-dvdread --disable-dvdread-internal --disable-libmpeg2 --disable-mp3lib --disable-liba52 --disable-ftp --disable-tv --disable-network --disable-dvbhead --disable-libavformat_a --disable-libavformat_so --disable-mmx --disable-mmxext --disable-3dnow --disable-3dnowext --disable-sse --disable-sse2 --disable-ssse3 --disable-shm --disable-altivec --disable-armv5te --disable-armv6 --disable-iwmmxt --disable-fastmemcpy --disable-dynamic-plugins

3) Call 'make'. With some versions of gcc you may encounter the following problem:

arm-9tdmi-linux-gnu-gcc -I../libvo -I../../libvo  -O4   -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -I~/libmad-0.15.1b/  -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o snow.o snow.c 
snow.c: In function `add_yblock_buffered':
snow.c:2588: warning: left shift count is negative
snow.c: In function `add_yblock':
snow.c:2735: warning: left shift count is negative
snow.c: In function `predict_slice_buffered':
snow.c:2811: warning: passing arg 6 of `add_yblock_buffered' discards qualifiers from pointer target type
snow.c: In function `predict_slice':
snow.c:2869: warning: passing arg 5 of `add_yblock' discards qualifiers from pointer target type
snow.c: In function `common_init':
snow.c:3220: warning: assignment from incompatible pointer type
snow.c:3220: warning: assignment from incompatible pointer type
snow.c:3221: warning: assignment from incompatible pointer type
snow.c:3221: warning: assignment from incompatible pointer type
snow.c:3222: warning: assignment from incompatible pointer type
snow.c:3222: warning: assignment from incompatible pointer type
snow.c:3223: warning: assignment from incompatible pointer type
snow.c:3223: warning: assignment from incompatible pointer type
arm-9tdmi-linux-gnu-gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
{standard input}: Assembler messages:
{standard input}:2821: Warning: end of file not at end of a line; newline inserted
{standard input}:3844: Error: address expected -- `ldr r3,'
make[1]: *** [snow.o] Error 1
make[1]: Leaving directory `/mnt/space/home/tk/MPlayer-1.0pre7try2/libavcodec'
make: *** [libavcodec/libavcodec.a] Error 2

This happens, because of the '-O4'-switch, so execute the following commands

# cd libavcodec
# arm-9tdmi-linux-gnu-gcc -I../libvo -I../../libvo  -O2   -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -I~/libmad-0.15.1b/  -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o snow.o snow.c
# cd ..
# make

to continue the build.

Personal tools