Most of the instructions below were taken but slightly changed from the Marlin documenation.
Execute in the following order:
Check out the latest Marlin Java wrapper from svn using:
svn co svn://svn.freehp.org/svn/sandbox/MarlinJava
The rest of the installation goes in the MarlinJava directory, run the setup there:
cd MarlinJava source setup.sh
Download gsl from the GNU ftp site. Then run the following:
tar zxvf gsl-1.8.tar.gz cd gsl-1.8 ./configure --prefix=<marlinpath>/gsl make make install cd .. rm gsl/lib/libgsl.dylib gsl/lib/libgsl.so rm gsl/lib/libgslcblas.dylib gsl/lib/libgslcblas.so
Download CLHEP from the distribution and untar it with the following command:
mkdir clhep tar -C clhep -zxvf clhep-xxxxx.tgz rm clhep/lib/libCLHEP.dylib clhep/lib/libCLHEP.so
Check out the lcio code using
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcio co -r v01-08-vtx lcio cd lcio tools/ant aid cpp f77 cd ..
Make sure you have CERNLIB. We link with /cern/2003.
Make sure you have root and that "root-config" is available in your PATH.
Download gear from Marlins CVSWeb and run:
tar zxvf gear.tar.gz cd gear tools/ant aid.generate [Linux] tools/ant cpp [MacOS X] make -C src/cpp cd ..
Download the above mentioned versions of MarlinUtil, MarlinReco and Marlin from Marlins CVSWeb and run:
tar zxvf Marlin.tar.gz tar zxvf MarlinReco.tar.gz tar zxvf MarlinUtil.tar.gz
In the Marlin directory add the following file with name "userlib.gmk"
USERINCLUDES += -I$(MARLIN)/packages/MarlinUtil/include USERINCLUDES += -Df2cFortran USERINCLUDES += -I$(MARLINJAVA)/gsl/include USERLIBS += -L/cern/2003/lib/ -lmathlib -lkernlib USERLIBS += -lg2c USERLIBS += -L$(MARLINJAVA)/gsl/lib -lgsl -lgslcblas
Make symbolic links to the MarlinReco and MarlinUtil packages
cd Marlin mkdir packages cd packages ln -s ../../MarlinReco ln -s ../../MarlinUtil ln -s ../../PandoraPFA cd ..
Add the line
#define stat64 stat
to the file lcio/src/cpp/include/LCIOTypes.h just before "namespace EVENT".
Link f77 to g77:
(as root) ln -s /usr/local/bin/g77 /usr/local/bin/f77
Add
#include <cmath>
to the files
Remove XMLParser:: (line 166) in include/marlin/XMLParser.h.
Remove MarlinCED:: (line 61, 69 and 73) in packages/MarlinUtil/include/MarlinCED.h
Remove the space between the -L and the identifier and remove the option "-Wl,-whole-archive" and "-Wl,-no-whole-archive" in the following files:
GNUmakefile (identifier MARLINLIB) src/GNUmakefile (identifier LIBS in several places)
Change private into public
Then run
make clean (to get rid of the Linux .a file in PandoraPFA). make
to create lib/libMarlin.a and the other libraries.
In the top-level (MarlinJava) directory to re-create the SWIG generated files (not necessary as these are included in check out of SVN):
mvn -Dswig.force=true
To compile the Java files, the C++ files and to link with all the libraries to produce a working system, type:
mvn
To run the example type:
ExampleVTX.sh