Trying to install ROOT on my desktop...

NOTES on compiling framework for ROOT6 / GEANT4 / GCC 4.8.5
-----------------------------------------------------------

Motivation: New machine. Want to run STAR codes on my desktop so that
I am independent of rcas (and don't need to wait as long to build / link /
run at 4PM). Would like to have most recent version(s) of ROOT available. So
let's try to set them up and compile our code. At least to flush out any
issues we may have.

* StEmcGeom contains a dependency to pams/global/.../math_constants.h
Propose to refactor and potentially retire math_constants.h.

* mysql seems to be incompatible (need to install proper package and recomp)

* Cannot build StBFCHain w/out commenting out the bfcopt2html processsing

* Missing "Api.h" used in /StRoot/StDbBroker/StDbBroker.cxx
** But compiles just fine without it... asked Dmitry.
** This is a ROOT header file.
** Dmitry tells me broker builds bridge between ROOT dictionaries and DB
*** Fixes problems / inconsistencies between
*** The Api.h provides low level access to the dicitonaries
*** DbBroker may have difficulties @ root6
*** DbMaker can be made ROOT independent
** Victor is confident I can comment this missing header out

* Existing macro (loadAgML.C) will not compile, of course
* Much simpler macro fails as well. bfc is not defined.
void agml() {
gROOT->LoadMacro("bfc.C");
gROOT->ProcessLine("bfc()");
}
* ROOT search paths are not correct, this is a local install issue.

* Additionally, a root6 build / compile will fail at this time
** bfc.C does not compile under root5
** In order to go to root6, we will need to make all of our macros compilable.
*** This will include macros in StarDb(!)
*** Unless CINT is still supported? (not promising)
*** Could we do an intermediate step to one of the 5.99 releases?

* Try to build 5.99.06
** Wow... that is so much slower to construct
** And dies near the end (possibly OpenGL?)
*** Yes, appears to have been due to opengl
** And... it crashses when I try to run. Shoot:s/oo/i.

* So... we should probably just compile 5.34/xx and be done with it.
** We are at version 5.34/30. Check that one out and compile
** First issue... bin/thisroot.sh doesn't work the same way as in later release
*** When I start tcsh, I need to setenv ROOTSYS ...
*** No... need to "source" the .csh file to set things up properly
**** source /scratch/jwebb/local/root/bin/thisroot.csh
**** Also note... need to switch to 64bits...

* Important
Recall that we need files from $ROOTSYS/etc
** rootlogon.C
** rootlogoff.C (meh)
** system.rootrc
*** This last one sets up paths for, e.g., bfc.C

* Ok, on with the build...
** Problem with curl... added libcurl-devel libraries... seem to fix
** Problem with log4cxx skipping incompatible /opt/star/lib/liblog4cxx.so
sudo yum install log4cxx-devel
... works now. So why do we need the /opt/star/ package?
** Still have the libmysql problem when compiling root4star
** St_geom_Maker ... QT dependence... remove
** need to compile ROOT w/ Vc support because of CA...
** Have built most libraries by now... try to run bfc.C

* Problem #1
undefined symbol: _ZN8TDataSet6BrowseEP8TBrowser

This can be resolved by running root interactively and creating a TDataSet.
So probably we are preloading a library in our environment which I am missing
in mine. Will need to investigate.

* Problem #2
root |0| TDataSet d;
root |1| .x bfc.C
...
dlopen error: /opt/star/lib/liblog4cxx.so: wrong ELF class: ELFCLASS32

liblog4cxx is defaulting to the /opt/star area, not the 64bit system library.

If I load it explicitly...
root |0| TDataSet d;
root |1| gSystem->Load("/usr/lib64/liblog4cxx.so");
root |2| .x bfc.C

Now I get through to
undefined symbol: _ZTI19StTerminateNotified

When StChain is loaded.