Building the SAGE software on Linux requires various tweaks, depending on the distribution being used. The necessary steps to build SAGE for Slackware version 13.0 (including Slackware64) are detailed here.
It is assumed that the software will be installed in a user's home directory. Appropriate changes to the following instructions will be necessary if installing elsewhere.
Prerequisites
It is assumed that a full installation of Slackware has been installed i.e. all package sets. Some additional software is required for full SAGE functionality, namely:
portaudio19
glew
numpy
wxPythonGTK
mpeg2dec
glew
numpy
wxPythonGTK
mpeg2dec
These can either be built from source code (see listing below) or installed using the prebuilt packages available from the UQVislab software repository (see repo details).
Please note that the UQVislab repository also supports slapt-get, so if your system already has slapt-get and slaptgetwrapper packages installed, just add the appropriate (32 or 64bit) SOURCE to your /etc/slapt-get/slapt-getrc file and run:
sudo
slapt-get --update
and thensudo
slapt-get --install portaudio19 glew numpy wxPythonGTK mpeg2dec
Compiling SAGE
1. Set up a SAGE environment, in particular a SAGE_DIRECTORY path and associated program execution and library paths. Edit the .bashrc file in the user's home directory. At the end of the .bashrc file, add the following lines:
export SAGE_DIRECTORY=$HOME/sage3.0
export PATH=${SAGE_DIRECTORY}/bin:${PATH}
if [ -z ${LD_LIBRARY_PATH} ]; then
export LD_LIBRARY_PATH=${SAGE_DIRECTORY}/lib
else
export LD_LIBRARY_PATH=${SAGE_DIRECTORY}/lib:${LD_LIBRARY_PATH}
fi
Now source the .bashrc file from the user's .bash_profile file (it may need to be created), or from the system wide /etc/profile file, by adding the lines:
[ -f
${HOME}/.bashrc ] && . ${HOME}/.bashrc
Test the enhanced user environment by opening a new shell and running the commands:
env | grep SAGE
and
env | grep LD_
and
echo $PATH
These commands should return results consistent with the settings made above. There's no point in continuing until this step has been completed successfully.
2. Now unpack the source tarball and make some small changes to the source code to enable correct compilation. In the home directory, unpack the source tarball e.g.
cd
tar zxvf sage3-03-24-09.tgz
which will create the sage3.0 directory (your SAGE_DIRECTORY)
For the 03-24-09 version of SAGE, a few changes are required. The changes can be made most easily by applying this patch. Alternatively, apply the changes manually.
To apply the patch, run:
cat patch-sage3-03-24-09-slackware.diff | patch -p0
3. The software can now be built from inside the sage3.0 directory:
cd $SAGE_DIRECTORY
make install
Note:
don't go into the src directory to build; do the build from $SAGE_DIRECTORY
don't do a plain make first; go straight to make install
Running SAGE
Issues
libquanta not found:
Although the libquanta.so library is correctly installed in $SAGE_DIRECTORY/lib and LD_LIBRARY_PATH has been set to that location, the libray is sometimes still not found (an error message appears in the sage gui). This can be fixed by creating an /etc/ld.so.conf.d/sage.conf file containing a single line entry consisting of that directory's location in the file system. Unfortunately the $SAGE_DIRECTORY short cut can't be used, rather the full path must be explicitly named e.g.
/home/chris/sage3.0/lib
After creating the appropriate /etc/ld.so.conf.d/sage.conf file, run
sudo /sbin/ldconfig -v
svc not found:
SVC is not compiled in by default. To make it available, go to $SAGE_DIRECTORY/app/svc/src and run:
make install
Contact:
Please send any comments, advice etc., to Chris Willing <c.willing _at_ uq.edu.au>
