Please make sure to follow the instructions for compiling python prior to building swig since swig needs to be built against python.
rhel6 and rhel7
./configure --with-python=/afs/slac/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/python/2.7.12-Miniconda2-4.2.11/bin --with-python3=/afs/slac/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/python/3.6.3-Miniconda3-4.3.31/bin --prefix=/afs/slac/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/swig/3.0.12
Note that the python test suite has been disabled by the swig team, so there is no easy test of the installation.
These are the instructions to build SWIG version 1.3.31 on the various supported platforms at SLAC.
To build SWIG 1.3.31 on leopard make sure to connect to a leopard machine (bldmac02 as of this writing) as the glastrm user.
- Obtain SWIG 1.3.31 from http://sourceforge.net/project/downloading.php?group_id=1645&filename=swig-1.3.31.tar.gz&a=76384819 and save it to /afs/slac/g/glast/ground/GLAST_EXT/leopard-i386-32bit/swig/ if it doesn't exist
- Change directory to /afs/slac/g/glast/ground/GLAST_EXT/leopard-i386-32bit/swig
- Unzip and untar swig-1.3.31.tar.gz
- Change directory to swig-1.3.31
- To be continued
- add GLAST_EXT python to PATH
- ./configure --prefix=<blah>
- make install