Installing Boost 1.33 on MacOS X

  1. Get the source for boost 1.33 from boost.org.
  1. Unzip the archive, cd into the directory and run
    ./configure --without-libraries=test --with-python-version=2.4 && sudo make install
    
    If you installed Python 2.4 with MacPorts, make sure that the framework include path is set correctly, i.e. /opt/local/Library/Frameworks is searched for frameworks. On Leopard you might want to use Python 2.5. In this case, you have to adapt the version number accordingly.
  1. Copy the following code into a file called fix_boost.py
    from commands import *
    from glob import glob
    import re
    
    for lib in glob( '/usr/local/lib/libboost_*.dylib' ):
    	m = re.match( r'^(.*)-((\d+_?)+)\.dylib$', lib )
    	if m:
    		linkCommand = 'ln -s %s %s'%( lib, m.group( 1 )+'.dylib' )
    		intCommand = 'install_name_tool -id %s %s'%( lib, lib )
    		getstatusoutput( linkCommand )
    		getstatusoutput( intCommand )
    
  1. run the script as root by typing sudo python fix_boost.py