Skip to content

Instantly share code, notes, and snippets.

@gadamc
Created October 18, 2012 11:19
Show Gist options
  • Save gadamc/3911142 to your computer and use it in GitHub Desktop.
Save gadamc/3911142 to your computer and use it in GitHub Desktop.
Install KData on a Mac
Step 1 - Install XCode on your mac. Go to the app store on your computer (or click here: https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12). You might have to sign up for an Apple Developer's ID, which is free.
Step 1b - Install XQuartz. http://xquartz.macosforge.org/landing/
Step 2 - Install Enthought's Python distribution (includes Numpy/SciPy/MatplotLib). http://www.enthought.com/products/epd_free.php. Install the 64-bit distribution (assuming that your mac is relatively new...)
Step 3 - Install Homebrew (this makes it easy to install FFTW and other tools! Homebrew is awesome... )
type this in your command line:
$> ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
... this will do a bunch of stuff
$> brew install fftw
Step 4 - Install ROOT. normally I install from source, but let's try to install from the prebuilt binaries and see what happens!. Make sure to use the "clang" binaries…: http://root.cern.ch/drupal/content/production-version-534
Or, if you want to install from source, here are the steps:
make a directory on your computer
$> mkdir /Users/kefelian/dev (kefelian --> change to whatever username you have)
and make a directory for ROOT (just to keep things organized)
$> mkdir /Users/kefelian/dev/root
move the ROOT file you just downloaded to the /Users/kefelian/dev/root directory. then untar/zip the file
$> cd /Users/kefelian/dev/root
$> tar zxvf root_v5.34.02.macosx64-10.8-i386.tar.gz
this will make a folder called "root-v5-34-00-patches". rename it to v5.34.02
$> mv root-v5-34-00-patches v5.34.02
configure and build ROOT
$> cd /Users/kefelian/dev/root/v5.34.02
$> ./configure --enable-minuit2 --enable-python --enable-fftw3 --with-fftw3-incdir=/usr/local/include/ --with-fftw3-libdir=/usr/local/lib/ --enable-roofit --enable-mathmore --disable-xrootd --enable-builtin-zlib --enable-builtin-lzma
$> make
Step 5 - Install KData
$> cd /Users/kefelian/dev
$> svn co https://kefelian@edwdev-ik.fzk.de:/svn/EDELWEISS/analysis/kdata/trunk kdata
$> cd kdata
$> ./install_kdata (answer the questions: ROOT: /Users/kefelian/dev/root/v5.34.02, or it may be in /usr/local/bin/root if you installed from pre-build binary-- you have to find it. FFTW: /usr/local/lib. curl: /usr/bin)
when compilation is finished, it should tell you to update your shell environment.
If you're using csh/tcsh, update the /Users/kefelian/.cshrc or /Users/kefelian/.tcshrc file by adding this line:
source /Users/kefelian/dev/kdata/config/setup_kdata.csh
or if you're using bash (default shell on Mac)
source /Users/kefelian/dev/kdata/config/setup_kdata.sh
Step 6.
You *should* be done. Problems, contact me: adam.cox@kit.edu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment