Building REDUCE

These instructions outline how to build REDUCE from the source code. The process is very similar on all platforms, but it is fairly time-consuming and not easy for the uninitiated. You can download the complete source code, including both the PSL and CSL Lisp systems and full documentation, from the REDUCE project page as either:

  • a pre-packaged distribution via the Files tab, which is easiest and should give you a tested "snapshot";
  • files from the Subversion repository via the Code tab, which will give you the latest bug fixes and updates but may not be fully tested and so may not be completely stable.

For the latest definitive guidance, please see the file README.BUILDING in the trunk of the Subversion repository. Below is a brief outline of the build process.

If you prefer to use a version control system other than Subversion, the REDUCE repository is mirrored at GitHub, where the README lists several other mirrors, and the GitHub REDUCE organization page provides alternative access to a number of closely related projects.

Microsoft Windows

On Microsoft Windows, we currently only explicitly support building using Cygwin, although the resulting compiled version of REDUCE will be a native Windows application that does not require Cygwin to run. Cygwin provides a very similar environment to GNU/Linux, which consists of GNU software running on a Linux kernel, whereas Cygwin consists of GNU software running on a Windows kernel via a Unix-like emulation layer provided by the Cygwin dll.

Outline of the General Build Process

You need to have a sufficiently complete software installation, including the tools required to obtain the source code files and the tools required to build programs. This involves using the appropriate package manager for your platform to download and install the packages required. If the build process fails in any non-obvious way then it probably means that you are missing some necessary build tool.

If you have downloaded a pre-packaged source code archive file Reduce-svnnnnn-src.tar.gz (where nnnn is the revision number), move it to an appropriate directory and unpack it, which you can do using the command

tar axf Reduce-svnnnnn-src.tar.gz

This will generate a sub-directory Reduce-svnnnnn-src containing the REDUCE repository snapshot, which is equivalent to the directory referred to below as reduce-algebra.

If you prefer to download directly from the live Subversion repository you need the "subversion" program svn, which you may have to install explicitly. Once that is available, you can run the command

svn co https://svn.code.sf.net/p/reduce-algebra/code/trunk/

This will download a copy of all the latest files to the sub-directory reduce-algebra.

To create the necessary executables, cd to the reduce-algebra/trunk directory, and then execute the command

./configure --with-csl or ./configure --with-psl (or both)

depending upon which underlying Lisp(s) you prefer to use. Now execute the command

make

and be prepared to wait a long time for the compilation to complete. After this is done, the script file(s) redcsl and/or redpsl, with a .bat extension for Windows, to run REDUCE will be found in the bin subdirectory.

Once you have downloaded the file set using svn, running the command

svn update

in the root of your local copy of the repository will download only those files that have changed since you last updated the repository.