Atlas of Lie Groups and Representations | ||
For more information see
C Compilers for the Mac.
You
are going to install the gcc C compiler (provided by MacPorts), which is preferred for
installing Fokko and atlas. 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 the XCode command line tools, you
will have a C compiler /usr/bin/gcc. You can test this in a terminal window by typing
gcc -v
The response should be something like
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr...
(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 gcc49
to install the the Macports version of gcc. Be sure to be connected
to the internet at this point! (Other Macports versions
of gcc starting with 4.4 should also work; if you have or download a
different version, you'll need to change "4.9" appropriately
below.) 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 [or a few
hours: some MacPorts things can take a VERY long time. Safest to do
this overnight, connected to a power source] you should
have /opt/local/bin/gcc-mp-4.9 (the MacPorts C compiler)
and /opt/local/bin/g++-mp-4.9 (the MacPorts C++ compiler).
You can check these things in a terminal window by typing
ls /opt/local/bin/g*
Also the directory /opt/local/bin 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 it doesn't exist)
export rl_libs="-lreadline -lcurses -L/opt/local/lib"
For the c-shell and variants, add this line to your .cshrc file in your home directory:
setenv rl_libs "-lreadline -lcurses -L/opt/local/lib"
The default mac compiler, /usr/bin/g++ doesn't work.
To change the compiler on OS 10.10 and earlier, do this:
sudo mv /usr/bin/g++ /usr/bin/g++-mac
In OS 10.11 (El Capitan) and later, you cannot modify /usr/bin
files. You must therefore make sure that /opt/local/bin
precedes /usr/bin in your PATH. If you're lucky, Macports
took care of this for you. To check, open a new terminal window (the
new window ensures that Macports' changes take effect) and type
printenv PATH
The result will be a long list of directories separated by colons:
something like
/opt/local/bin:...:/usr/bin
This example shows the good case that /opt/local/bin comes
first. If they are in the other (bad) order, you'll need to modify
the .profile or .cshrc file in your home directory
to fix the problem; consult your local geek or email us for help.
Finally, you need to make the Macports compiler available with the name g++:
sudo ln -s /opt/local/bin/g++-mp-4.9 /opt/local/bin/g++
(5') Alternative: edit the Makefile
Instead of editing the environment variable, in
the atlasofliegroups directory, edit the Makefile to read:
# the compiler to use, including language switch
and also edit the line
rl_libs ?= -lreadline
to read
rl_libs ?= -lreadline -lcurses -L/opt/local/lib
(to tell the compiler where to find the readline libraries).
(6) Compile Fokko and atlas
The command
make
(issued while you are in the atlasofliegroups directory where
the Makefile is) should compile both Fokko and
atlas.
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 optimize=true
Other possibilities are
debug=true
make install INSTALLDIR=[installation directory]
BINDIR=[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
(This example only works up to OS 10.10, and you 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.6. 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 Fokko executable. Alternatively
you can run Fokko with the command
Fokko MESSAGEDIR
to specify where to find this directory.
The software cwebx is needed to compile atlas. If you downloaded a tgz file
from the
downloads page, you should not need to install cwebx. If you
downloaded the software from
github
using git, then cwebx is included in the directory
cwebx, or available from
www-math.univ-poitiers.fr/~maavl/CWEBx.
Running make in the directory cwebx should compile cwebx, and produce the executables
cweb/ctanglex and
cweb/cweavex. The file sources/interpreter/Makefile tells the
compiler
to look for these executables. If you move the cwebx directory,
or want to use different versions, you must edit this Makefile.
You need to have a working copy of tex in your PATH to run
cweavex.
|