Version 1/2 - Next ยป - Current version
admin, 20/03/2012 14:23


MacHomebrewInstall

How to manually compile libavg svn head on Mac OS X using the homebrew package manager.

Homebrew is probably the most nerd friendly package manager for os x but out of the box not suited for building libavg, therefore I proudly present the following ...

detailed build instructions (mostly for 10.6, for 10.5 see below) partially written from memory

YMMV ...

Basic Homebrew stuff

  • Install XCode >= 3.2.2
  • Symlink /usr/lib/libiconv* to /usr/local/lib (This solves many headaches...)
  • Install homebrew
  • I suggest to have at least: brew install git berkeley-db binutils coreutils readline gettext getopt pkg-config
  • Install mac svn binaries from collab.net (best build you can get although it requires an obnoxious registration process)

Prereqs

  • brew install all dependencies as detailed on avg wiki (I added a few transitive dependencies below)
  • brew install libogg libvorbis pango libpng libtiff icu4c libxml2 jasper jam ffmpeg sdl sdl_image sdl_mixer sdl_net sdl_sound sdl_ttf fontconfig expat freetype
  • brew link fontconfig
  • You need this for AVG but watch out it might interact with os x' fontconfig
  • Three packages require some more work
    • brew edit boost s.t. the bootstrap.sh is called with --python-version=2.6
    • brew install boost
    • brew edit graphicsmagick s.t. graphicsmagick++ does not get disabled in the build
    • brew install graphicsmagick
  • for camera support, install dc1394 2.0 manually
    • ./configure --prefix=/usr/local/Cellar/dc1394/Version
    • make && make install && brew link dc1394

Build and Install

  • Fetch HEAD of avg svn trunk and export AVG_PATH = toplevel checkout dir
  • Set up build environment
  • export BOOST_PYTHON_LIB="-L/usr/local/lib -lboost_python-mt"
  • export MAGICK_CFLAGS=$(pkg-config --cflags GraphicsMagick?++)
  • export MAGICK_LIBS=$(pkg-config --libs GraphicsMagick?++)
  • export LDFLAGS=-L/usr/local/lib
  • export CFLAGS=-I/usr/local/include
  • export LIBS=-L/usr/local/lib
  • Configure step is as described in the wiki except for requiring
    • aclocal -I m4 -I /usr/local/share/m4 (due to SDL from /usr/local)
    • ./configure --prefix=/usr/local/Cellar/libavg/svn
  • make && make install
  • brew link libavg
  • export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.6/site-packages/libavg
    • I find this setting weird, but works
  • make check
  • Multimedia, YAY!
  • If you hit libJPEG library dyld fuckup, try
    • export DYLD_INSERT_LIBRARIES=/System/Library/Frameworks/ApplicationServices?.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
    • This is how it's like to be on a mac

Optional

  • export VIDEOCHOOSER_VIDEO_DIR=$AVG_PATH/avg_media/scanner/medien/movies/
  • export AVG_DEPLOY=1 for full screen mode

Mac OS X 10.5

  • Use latest XCode 3.1.X
  • Get Python 2.6 from www.python.org, otherwise you won't get a working version of boost
  • There was an issue with ffmpeg headers:
    • Add #include <stdint.h> to /usr/local/inclue/libavutil/common.h
    • You need additional compile flags which I forgot. Will add later.

Wave Version

I keep this around as a public google wave