~ 2 min read

Installing MPlayer on Snow Leopard

Here’s a heads up for anyone installing MPlayer on Snow Leopard. I’ve been playing a fair amount with tools recently and inevitably ending up running round in circles in installing, compiling, setting flags etc. Here’s a quick one liner param for anyone compiling mplayer (and freetype as its dependency) which people on Snow Leopard may find useful.

You’ll first need to download latest versions of freetype and mplayer. Uncompress both.

cd freetype
sudo make CXXFLAGS="-m64"
sudo make install

(Check here that the command “file /usr/local/lib/libfreetype.dylib” returns “Mach-O 64-bit dynamically linked shared library x86_64″)

cd mplayer-checkout-2010-06-14/
tar -xjvf mplayer-checkout-snapshot.tar.bz2
sudo make install

The killer here for me was sudo make CXXFLAGS=”-m64″. Without it, mplayer’s make command failed with “ld: warning: in /usr/local/lib/libfreetype.dylib, file is not of required architecture”. I’ve encountered problems like this before, where the file is compiled for 32 Bit leopard rather than 64, but they’re usually solved with setting a CFLAGS variable.