User Software :: CR-Tools :: Installation on Mac OS X 10.5 (Leopard)
Revised installation notes
Installation on the MacBook Pro — Arthur Corstanje, March 27, 2009
The old guide can be found below with some additional data but is mostly obsolete. As I had to find out how to install, I executed things in a different order; here's what I think it should be. The installation procedure should some time be checked from scratch.
- Start with the notes in section Mac OS X 10.4: That means running
fink configure
to activate the unstable repository. After that, check/edit/sw/etc/fink.conf
so it will contain
Trees: local/main unstable/main unstable/crypto SelfUpdateMethod: cvs SelfUpdateTrees: 10.4
Alternatively, use FinkCommander from the start. It has a GUI and possibly some progress bar, which may save hours in what follows. Then you can also edit these configs in a non-typo-sensitive way…
fink selfupdate
,fink index
,fink scanpackages
.- check your shell profile for the
/sw/bin/init.sh
; it should have a command to execute this. - get the USG repository, do bootstrap (see instructions above).
- run a fix script for
qt4-mac
, which is described at gmane.org - Download a newer version of X11, v2.3.0, the PyQt appears to need that. Found at: xquartz.sourceforge.org. Note that Heino Falcke didn't need to do that (?).
- Then,
make fink-packages
. Some notes about this (Lars?):- This action takes, well, some time… I estimate a total of ~10 CPU-hours flat-out. Meanwhile, it asks for user input at totally unpredictable times (2 minutes to 3 hours interval).
- Being asked for passwords can be disabled by running
sudo make fink-packages
, which I did. Being asked for installing dependent packages can be disabled by a command-line option offink
, but I didn't attempt to put that into the USG's makefile. - I'm not sure Fink will always take the binary distributions if they exist. Heino says it took him much less time. In the
/sw/etc/fink.conf
file, include the following (not yet tested):UseBinaryDist: true
This could save a whole day.
- Check your active Python version. On a terminal run
python –version
. It should say 2.6.x. If not, change your path in your.profile
so/sw/bin
appears before/usr/bin
.- if that doesn't help, go to
/sw/bin
and findpython2.6
. Make a symlink:sudo ln -s python2.6 python
- check again in a new terminal window
- I did install the
py25-packages
listed in the old instructions, but they should not be needed. make root
inusg/build
. This didn't work for me but apparently Lars has fixed that. Takes an hour to compile…- check corresponding lines in $PATH and $ROOTSYS, and/or .profile, if not present, add them (see ROOT installation instructions, no. 4 for Mac OS X).
- alternatively install root from its own
svn
. Don't forget themake install
. I did, and I apparently managed to get a working cr/gui without it.make -j 4
cuts running time in half by enabling multithreading. Don't domake -j 4 install
, that will fail and ruin your build (and there goes another hour). Instead justmake install
.
- Now go for a
make cr
in
usg/build
. It should complete… - Build and install MathGL :
make mathgl
ccmake cr
from/usg/build
. Enable GUI, then generate, exit.- Run yet another
make cr
in order to build CR-Tools with now MathGL support enabled.
- From graphviz.org download and install
graphviz
. It has a Mac OS X installer that does its job in under a minute. - From GUI directory run
python -i hfstart.py
. If it fails on mathgl not found, add the following to PYTHONPATH:export PYTHONPATH = /usg/release/lib/python2.6/site-packages:$PYTHONPATH
Also check that a mathgl library actually sits there.
- Now you should have a working GUI…
Old installation notes
This just first describes what I (Sander ter Veen) did and what I find missing. I hope it doesn't miss any steps and we can later out distill an easier version. BE CAREFUL with the use of SUDO as it may install in different places.
- Install from the Mac OS DVD the developer packages.
This will install GCC version 4.0.1 and Python 2.5.1
- Install Fink from http://www.finkproject.org/download/index.php?phpLang=en Take the latest Intel Binary. Fink is the svn of the Mac to install packages.
I used GCC version 4.0.1, I think there is no need to install a newer GCC version and some installation flags will not work.
We need to change some settings so we can install packages marked unstable, but still needed for USG.
New in fink-0.26: If you run
fink configure
one of the questions will ask whether you want to turn the unstable trees on. You will need to run
fink selfupdate; fink index; fink scanpackages
afterward. Note: you must have either rsync or cvs updating turned on to get new package descriptions.
- You need some default libraries which normally are allready installed on linux. Install GTK+ (1.2.10) and GTK+2 (2.6.10-1003), mysql (5.0.27-1001), GSL (1.9-1), pkgconfig (0.23-1), XML Library with fink.
fink install GTK+ fink install GTK+2 fink install mysql fink install gsl fink install pkgconfig sudo fink install libxml
Initially I also installed the following packages, but now the USG software will do that for you. flex (2.4.5a), bison (2.0.-12), qt4, SWIG, FFTW3
fink install flex fink install bison fink install atlas fink install qt4-mac fink install swig fink install fftw3
I am not sure if you need all of the general libraries, but there was some logging about them and it's good to have them anyways.
- MAYBE USG CAN DO THIS STEP FOR YOU ALSO: After installing fftw3 and libxml you can install root with svn:
svn co http://root.cern.ch/svn/root/trunk root
Set the ROOT environment variables:
# ~/.bachrc or ~/.profile export ROOTSYS=/opt/root export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
restart your terminal (or start another one) go to root directory
./configure macosx make make install
- Now you are ready for the USG software. Get the binary from:
svn co http://usg.lofar.org/svn/code/trunk usg
and follow the general instructions about configuring, making and building.
That is make the path LOFARSOFT to your lofarsoft directory:
cd usg export LOFARSOFT=`pwd` . devel_common/scripts/init.sh
To make it more permanent add to ~./profile
export LOFARSOFT=<path to to root of the USG code tree> . devel_common/scripts/init.sh
Then execute
cd $LOFARSOFT/build ./bootstrap
Test if the qt4 installation works:
make fink-qt4-mac
If qt4 didn't install it is due to a new X11 version which has suspended some files. Follow the instruction on this page to fix it:
http://article.gmane.org/gmane.os.apple.fink.general/27784/match=gnucash
Then install the other fink packages:
make fink-packages
This also asks to remove hdf5 if you had that installed, but you will need to remove hdf5-bin first.
fink remove hdf5-bin
However I used python 2.5.1 in which case you need:
fink install numpy-py25 fink install pyqt4-py25 fink install sip-py25
After this you are ready to
make cr
Additional information:
If it complains about numpy not being up to date. It needs verson 1.1 and you have 1.0.1, then check your PYTHONPATH in env. Mine looks like
PYTHONPATH=/Users/STV/Astro/Programming/usg/release/lib/python:/sw/lib/python2.5/site-packages:/sw/lib/python2.5/site-packages/PyQt4/
But if you use python 2.6 then replace 2.5 by 2.6. You can change it by adding to your ~/.profile file the line
export PYTHONPATH=$LOFARSOFT/usg/release/lib/python/:/sw/lib/python2.5/site-packages:/sw/lib/python2.5/site-packages/PyQt4/
I have succesfully (at least it says 100% built cr) the USG software on a Mac with the use of Python 2.5.1 and GCC version 4.0.1
You may have to reinstall or bootstrap again after you have installed all the finkpackages. At least I did several reinstallments before I got it working. And before this you may also need to execute:
make blitz
On my machince GCC and Python can be found in /usr/bin/
. Newer installations wil be in /usr/local/bin
. If you want to use those put this (or the appropriate directory) earlier in the path.
My path is:
PATH=/Users/STV/Astro/Programming/usg/release/bin:/sw/bin:/sw/sbin:/opt/root/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin
my ~./profile file:
export ROOTSYS=/opt/root export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH test -r /sw/bin/init.sh && . /sw/bin/init.sh export LOFARSOFT=/Users/STV/Astro/Programming/usg . $LOFARSOFT/devel_common/scripts/init.sh PS1=["\t"]"\[\033[1;37m\]\h:\W>\[\033[0m\] "