-
Notifications
You must be signed in to change notification settings - Fork 114
Building GalSim with the LSST stack
Notes from Chris Walter for building Galsim for LSST members using anaconda 2.1 and the Winter 2014 DM stack. The stack+anaconda should contain all dependencies except for TMV which you will need to build yourself.
Update: Later versions of the LSST DM stack fix the problem with the anaconda library (if you let LSST install anaconda for you, that is), so none of the below machinations with install_name_tool
are necessary.
Useful references related to problems with GalSim and boost and boost generally:
http://stackoverflow.com/questions/23771608/trouble-installing-galsim-on-osx-with-anaconda https://svn.boost.org/trac/boost/ticket/9141
Make sure that you have setup the DM stack and:
setup boost
setup scons
setup fftw
Install TMV (>= 0.72 from http://code.google.com/p/tmv-cpp/). For example:
scons install PREFIX=/Users/walter/LSST/GalSim/tmv-0.72
Go to your anaconda library directory. For example:
cd LSST/anaconda/lib/
Look at the python library from anaconda:
otool -L libpython2.7.dylib
You will see the first entry (libpython2.7.dylib) has no full path this is going to cause the loader to grab the system version instead and mess things up. You need to fix this:
install_name_tool -id $PWD/libpython2.7.dylib libpython2.7.dylib
Now if you do the otool -L libpython2.7.dylib
the first entry should
have the full path.
Now make the same change to the stack supplied boost library. Go to your stack boost library directory:
cd $BOOST_DIR/lib
install_name_tool -id $PWD/libboost_python.dylib libboost_python.dylib
There is one more change you need to make. You need to tell the stack's boost which system python to use. It is also currently entered without a path.
An example:
install_name_tool -change libpython2.7.dylib /Users/walter/LSST/anaconda/lib/libpython2.7.dylib libboost_python.dylib
Download GalSim (from https://github.com/GalSim-developers/GalSim/releases)
Now build Galsim. For example:
scons TMV_DIR=/Users/walter/LSST/GalSim/tmv-0.72 FFTW_DIR=$FFTW_DIR