Installation of local LarSoft copy on Centos5
Installation of a local LarSoft copy on Centos5
(by T.Strauss: thomas.strauss@cern.ch, 03.08.2010)
The Centos basic install is missing a few libaries, as it is a serverbased linux only, so make sure to get also (via yum install):
- screen, gedit, xemacs, gimp, OpenGL (mesa packages) svn, ssh, libgfortran, CVS, (kde, gnome)
- In case of an Arc client or grid Storage, some Perl libaries needed for grid communication are missing (at least: foundation-perl-libwww-perl.noarch perl-libwww-perl.noarch)
Make sure, that the symbolic links in /usr/lib are truly present, sometimes they were made only as lib**.so.1 so they could not be identifed by some packages as Genie. In the worst case, make the symbolic link yourself (/sbin/ldconfig is not enough).
As LarSoft depends on subpackages as clhep, Geant4, you need to do some changes to get them compiled
- First of all, Geant4 expects a /usr/X11R6/ directory, where the OpenGL libaries are. This doesn't exist in Centos, so you make the directory /usr/X11R6, and put inside:
- the symbolic link lib to /usr/lib
- the symbolic link lib64 to /usr/lib64
- the symbolic link man to /usr/share/man
- the folder bin with the the symbolic links mkfontdir to /usr/bin/mkfontdir and mkfontscale to /usr/bin/mkfontscale
- the folder include the symbolic link X11 to /usr/share/X11
for configuring the different packages refer to the LarSoft Wiki, on lhepat03 all packages where installed into /opt/ directory, as example, for genie, the configuration script was:
- ./configure --prefix=/opt/genie2.6 --enable-viewer --enable-vle-extension --enable-test --enable-vhe-extension --enable-lhapdf --with-pythia6-lib=/opt/pythia6/pythia6/ --with-cern-lib=/opt/clhep/lib/ --with-lhapdf-lib=/opt/lhapdf-5.8.3/lib/ --with-lhapdf-inc=/opt/lhapdf-5.8.3/include/ --with-libxml2-inc=/opt/libxml2-2.7.7/include/libxml2/ --with-libxml2-lib=/opt/libxml2-2.7.7/lib/ --with-log4cpp-inc=/opt/log4cpp-1.0/include/ --with-log4cpp-lib=/opt/log4cpp-1.0/lib/
There is one tricky part during the install, which is the CRY Cosmic Ray Simulation. The LarSoft Wiki tip on creating the libCry.so doesnt work in an automatic mode, the key to success is manually adding the fPIC option to gcc and compile each src/*.h class and than combine the *.o files via -shared -o command to the libCRY.so (see for details: Linux GCC manual)
To install LarSoft itself, follow the LarSoft Wiki. I encountered some trouble after the download concerning the CVS checkout, as there was no update the files in the development release, the solution was to remove the first development release created according to the manual, and redo the lar_update_rel command.
After the installation, one need additional files to run the LarSoft software:
- /grid/ArgonNeut/SPLines/gxspl-NUMI-R2.6.0.xml which is a description of the neutrino cross section for the numi beam
- /grid/ArgonNeut/ArgonResponse/ArgoResponse1.2.root which gives the response of argon
Good luck :)