[MPlayer-users] mplayer from FreeBSD ports fails to build/compile

Tom Evans tevans.uk at googlemail.com
Wed Aug 10 13:04:02 CEST 2011


On Sat, Jul 30, 2011 at 7:19 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Sat, Jul 30, 2011 at 02:23:09PM +0100, Tom Evans wrote:
>> Use gmake to build. The BROKEN_RELOCATIONS should fix the assembler errors.
>
> That is only by chance and not really the correct solution.
> In particular it will cost you a significant amount of
> performance for CABAC-encoded H.264 files.
> The problem is that FreeBSD by default comes with a 7 years (!!)
> old version of binutils, which is not supported for 64-bit builds.
> If you get a newer version from portage and replace /usr/bin/as
> with a symlink to the newly installed /usr/local/bin/as it will
> compile just fine.

Disclaimer: I'm actually using the mplayer2 git build.

Interesting - I pulled that option from FreeBSD ports Makefile.

So, I updated sources and tried compiling with --as=/usr/local/bin/as
. This failed, when compiling libavcodec/h264_cabac.c with assembler
errors. I tried putting back in -DBROKEN_RELOCATIONS and it also
failed at the same place. I guess something was updated, so even the
dirty hack no longer works.

To make a long story short, this was not the only necessary change. As
well as using a newer binutils, I also needed to use a newer version
of gcc. Installing lang/gcc46, and passing --cc=/usr/local/bin/gcc46
allowed the build to complete.

For the archives, if anyone else is trying to compile mplayer/ffmpeg
on FreeBSD/amd64, here are my configure options:

./configure \
  --as=/usr/local/bin/as \
  --cc=/usr/local/bin/gcc46 \
  --with-freetype-config=/usr/local/bin/freetype-config \
  --with-dvdnav-config=/usr/local/bin/dvdnav-config \
  --with-dvdread-config=/usr/local/bin/dvdread-config \
  --extra-libs=-L/usr/local/lib \
  --prefix=/usr/local \
  --mandir=/usr/local/man


Cheers

Tom


More information about the MPlayer-users mailing list