Extract it to my local folder root installation: /Users/delaossa/local/root
Configure it:
Compile it:
Up to here everything went very well, but as soon as I open a root session I get the following errors:
[code] $> root
*
W E L C O M E to R O O T *
*
Version 5.34/18 14 March 2014 *
*
You are welcome to visit our Web site *
http://root.cern.ch *
*
ROOT 5.34/18 (heads/v5-34-00-patches@v5-34-17-156-g60f5d99, Apr 02 2014, 15:19:00 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: cannot open file “iostream” (tmpfile):2:
*** Interpreter error recovered ***
Error: cannot open file “DllImport.h” (tmpfile):2:
*** Interpreter error recovered *** [/code]
It seems that ROOT cannot find these headers.
I defined manually the ROOT environment variables:
[code]root [0] TF2 *f2 = new TF2(“f2”,“sin(x)sin(y)/(xy)”,0,5,0,5);
root [1] f2->Draw(“colz”)
Warning in TCanvas::ResizePad: c1 width changed from 0 to 10
* *
* W E L C O M E to R O O T *
* *
* Version 5.34/18 14 March 2014 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************
ROOT 5.34/18 (heads/v5-34-00-patches@v5-34-18-155-gf444e9f, Apr 02 2014, 16:25:27 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TF2 *f2 = new TF2("f2","sin(x)*sin(y)/(x*y)",0,5,0,5);
root [1] f2->Draw("colz")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2]
To set up the environment variable I go in the directory where ROOT is installed and I do:
Basically there are two ways to configure root installation from source:
By means of input flags for the ‘configure’ script, e.g. --prefix, --libdir, etc.
By means of the environment ROOTSYS variable before the run of ‘configure’.
Option 1 is what is given me a lot of troubles.
It is easy to make a mistake with this option unless that you know very well what you are doing.
This is option is useful for some particular installations though, e.g. Homebrew.
Option 2 installs everything (libs, headers, configuration stuff) under the $ROOTSYS directory.
This has been the classic option since always in linux machines.
Now it turns out that it works very well in the mac too!
Instructions:
Extract the source ROOT tree in the location you like. Mine: /Users/delaossa/local/root
Set ROOTSYS to that location:
Go there and just configure (no options):
[Behemoth] ~ $> cd $ROOTSYS
[Behemoth] ~/local/root $> ./configure
Make:
Done:
============================================================
=== ROOT BUILD SUCCESSFUL. ===
=== Run 'source bin/thisroot.[c]sh' before starting ROOT ===
============================================================
[Behemoth] ~/local/root $> . bin/thisroot.sh
[Behemoth] ~/local/root $> root
root [0] TF2 *f2 = new TF2("f2","sin(x)*sin(y)/(x*y)",0,5,0,5);
root [1] f2->Draw("colz")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] .q