Atlas of Lie Groups and Representations

For more information see C Compilers for the Mac.

Compiling atlas for the Mac using MacPorts

This is the preferred method. For other Mac options see other methods of installing on the Mac.

You are going to install the gcc C compiler (provided by MacPorts), which is preferred for installing atlas and realex. To do so you must first install the XCode C Compiler. See C Compilers for the Mac for an explantion.

(1) Install MacPorts. (If MacPorts is installed on your system go to step (2). Visit macports.org, go to Installing MacPorts, and download the dmg file for your version of MAC OSX (for example 10.7.*=Lion). Double click on the dmg file to install MacPorts. You need to be an administrative user, and will need to enter your password.

(2) Install the XCode C compiler. If you already have XCode installed, go to step (3) (XCode is not installed by default).

The XCode package is huge, and includes a lot of unnecessary tools. We recommend downloading and installing just the XCode command line tools, which have everything you need. Alternatively install the entire Xcode package. In either case you will need a (free) Apple ID.

Once you have installed XCode, or just the command line tools, you will have a C compiler /usr/bin/gcc.

(3) Install the MacPorts (gcc) C Compiler

Open a terminal window (Terminal is available in Applications). All further commands are given from within this window. Give the command:

sudo port install gcc46

to install the the macports version of gcc. If you are using only the command line tools of Xcode (not the full XCode installation) ignore the warning about not finding XCode. After a few minutes you should have /opt/local/bin/gcc-mp-4.7 (the MacPorts C compiler) and /opt/local/bin/g++-mp-4.7 (the MacPorts C++ compiler). Also this directory has been added to your PATH environment variable.

(4) Install readline

Do:

sudo port install readline

to install the readline package.

(5) Set an environment variable, and change your compiler (or go to 5'):

Set the environment variable rl_libs to be "-lreadline -lcurses -L/opt/local/lib".

How to do this depends a bit on your shell. echo $SHELL will tell you your shell. If your shell is bash (and many others) add this line to your .profile file in your home directory (create such a file if id doesn't exist)"

export rl_libs="-lreadline -lcurses -L/opt/local/lib"

For the c-shell and variants do this:

setenv rl_libs "-lreadline -lcurses -L/opt/local/lib"

The default mac compiler, /usr/bin/g++ doesn't work. To change the compiler, do this:

sudo mv /usr/bin/g++ /usr/bin/g++-mac
sudo ln -s /opt/local/bin/g++-mp.4.7 /usr/bin/g++
sudo chmod -h 755 /usr/bin/g++

(5') Alternative: edit the makefile

Instead of editing the environment variable, in the atlasofliegroups directory, edit the makefile to read:

# the default compiler
CXX = g++-mp-4.7

and also edit the line

rlincludes ?= -lreadline -lcurses

to read

rlincludes ?= -lreadline -lcurses -L/opt/local/lib

(to tell the compiler where to find the readline libraries).

(6) Compile atlas and realex

The command

make

should compile both atlas and realex.

If you get an error related to readline see installing the readline package.

If you get an error:

ctanglex: Command not found

see installing cwebx

Compilation options: We recommend compiling with

make verbose=true

Other possibilities are

optimize=false (default is true),
debug=true
readline=false
.

(6) Installing atlas and realex

To install the executables in [installation directory] and put symlinks in [binary directory], type:

make install INSTALLDIR=[installation directory] BINDER=[binary directory]

The default BINDIR is INSTALLDIR/../bin.

Example: To install the executables in /usr/local/atlas, and symlinks in /usr/local/bin, type:

sudo make install INSTALLDIR=/usr/local/atlas

(for which you probably need root access).

Example: To install the executables in /home/userid/software/atlas, and symlinks in /home/userid/bin, type:

make install INSTALLDIR=/home/userid/software BINDIR=/home/userid/bin

Example: Say you unpacked the software in /home/userid/atlas_0.5.1. To leave the software there, and create symlinks in /home/userid/bin, type:

make install

Note that the messages (help) directory must be in the same directory as the atlas executable. Alternatively you can run atlas with the command

atlas MESSAGEDIR

to specify where to find this directory.

The readline package

The software uses the readline package to provide very useful command line tools, including CTRL-p for previous line, tab completion, etc.

To compile atlas with readline you need the development version of readline. To install this under Debian-based systems (including Ubuntu), do

sudo apt-get install libreadline-dev

On redhat-like systems do

sudo yum install libreadline-dev

This line in the makefile tells the software where to find the readline library:

rlincludes = -lreadline -lcurses

On some systems it is necessary to replace -lcurses with -lncurses.

If all else fails you can compile readline using:

make readline=false

to compile the software without readline.

Installing cwebx

If you downloaded a tar/tgz file from the download page at google, you should not need to install cwebx. If you downloaded the software using git, cweb is needed to compile realex. cwebx is included in this distribution in the directory cweb-x3.51, or from www-math.univ-poitiers.fr/~maavl/CWEBx.

Running make should compile cwebx, and produce the executables cweb-x3.51/ctanglex and cweb-x3.51/cweavex. The file sources/interpreter/Makefile tells the compiler to look for these executables. If you move the cweb-x3.51 directory, or want to use different versions you must edit this Makefile.

Also, you need to have a working copy of tex in your path to run cweavex.