---------------------------------------------------------------------- 2020/03/21 K.Fujii v02-01 now using gcc and g++ ---------------------------------------------------------------------- URL: https://github.com/iLCSoft?page=1 1) Install the required packages: $ sudo apt-get update $ sudo apt-get install yum $ sudo yum install mysql-devel imake gsl-devel gsl-static clhep geant4 root cernlib xerces-c cmake gcc libtool m4 autoconf automake poppler-devel libgcrypt-devel libptexenc-devel fastjet fjcontrib ocaml whizard boost-devel lcio eigen python3-devel 2) Get the "ilcinstall" and its MacOSX patch $ sudo mkdir -p /Users/proj/cdc/soft/MarlinTPC/src/10.15/v02-01 $ sudo chown -R /Users/proj/cdc/soft/MarlinTPC $ cd /Users/proj/cdc/soft/MarlinTPC/src/10.15/v02-01 # get the source files from the github above. # make them into tarballs for later convenience. $ ls HowToInstall.osx LP_Asian_GEM_Module.tar.gz ced-01-09-03.tar.gz dd4hep-v01-11-02-macosx10.15.patch ilcinstall.02.01.tar.gz ilcutil-v01-06.tar.gz ilcutil-v01-06-macosx10.15.patch kaltest-v02-05-c++17.patch lccd-v01-05-c++17.patch marlintpc-rootfileproc.patch marlintpc-v01-06-eigen.patch marlintpc-v01-06-not0.patch marlinutil-v01-15-01-c++17.patch root-v6.20.00-cmake.patch tpcinstall-full-v02-01-macosx10.15.patch tpcinstall-v02-01-macosx10.15.patch 3) Install dependent libraries 2-0) Set default compilers to gcc $ sudo alternatives --config gcc ----------- select gcc! ----------- 3-1) ilcutil-v01-06 $ cd /Users/proj/cdc/soft/MarlinTPC/src/10.15/v02-01 $ mkdir -p /Users/proj/cdc/soft/MarlinTPC/ilcutil $ tar -zxvf ilcutil-v01-06.tar.gz -C /Users/proj/cdc/soft/MarlinTPC/ilcutil $ pushd /Users/proj/cdc/soft/MarlinTPC/ilcutil/v01-06 $ patch -p1 -s < ../../src/10.15/v02-01/ilcutil-v01-06-macosx10.15.patch $ mkdir build $ cd build $ cmake .. $ make $ make install $ popd 3-2) ced-v01-09-03 $ mkdir -p /Users/proj/cdc/soft/MarlinTPC/CED $ tar -zxvf ced-v01-09-03.tar.gz -C /Users/proj/cdc/soft/MarlinTPC/CED $ pushd /Users/proj/cdc/soft/MarlinTPC/CED/v01-09-03 $ mkdir build $ cd build $ cmake -DILCUTIL_DIR=/Users/proj/cdc/soft/MarlinTPC/ilcutil/v01-06 .. $ make $ make install $ popd 3-3) CondDBMySQL_ILC-0-9-7 $ mkdir -p /Users/proj/cdc/soft/MarlinTPC/CondDBMySQL $ tar -zxvf CondDBMySQL_ILC-0-9-7.tar.gz -C /Users/proj/cdc/soft/MarlinTPC/CondDBMySQL $ pushd /Users/proj/cdc/soft/MarlinTPC/CondDBMySQL/CondDBMySQL_ILC-0-9-7 $ mkdir build $ cd build $ cmake -DILCUTIL_DIR=/Users/proj/cdc/soft/MarlinTPC/ilcutil/v01-06 .. $ make $ make install $ popd 3-3) Need some fixup # After installation apply some patches, if you haven't: $ pushd ../geant4/10.06/lib $ ln -s Geant4-10.6.0 Geant4-10.6 -------------------------------------------------------------- # Note: # - The symlink, Geant4-10.6 is necessary to let cmake find Geant4Config.cmake. # - The modification should be made to the RPMs. -------------------------------------------------------------- 4) Build and install the ilcsoft 4-1) Install ilcsoft packages $ cd /Users/proj/cdc/soft/MarlinTPC $ tar -zxvf src/10.15/v02-01/ilcinstall.02.01.tar.gz $ cd ilcinstall.02.01/ $ patch -p1 -s -b < ../src/10.15/v02-01/tpcinstall-v02-01-macosx10.15.patch $ patch -p1 -s -b < ../src/10.15/v02-01/tpcinstall-v02-01-macosx10.15-dyld.patch $ ./ilcsoft-install -i releases/v02-00/release-osx.cfg ....... ... before compilation starts, apply the following patches in a new window: ... Open a new terminal and do the following $ pushd ../v02-01/MarlinUtil/v01-15-01/ $ patch -p1 -s < ../../../src/10.15/v02-01/marlinutil-v01-15-01-c++17.patch $ popd $ pushd ../v02-01/lccd/v01-05/ $ patch -p1 -s < ../../../src/10.15/v02-01/lccd-v01-05-c++17.patch $ popd $ pushd ../v02-01/KalTest/v02-05/ $ patch -p1 -s < ../../../src/10.15/v02-01/kaltest-v02-05-c++17.patch $ popd $ pushd ../v02-01/MarlinTPC/v01-04/ $ patch -p1 -s < ../../../src/10.15/v02-01/marlintpc-v01-06-not0.patch $ patch -p1 -s < ../../../src/10.15/v02-01/marlintpc-v01-06-eigen.patch $ patch -p3 -s < ../../../src/10.15/v02-01/marlintpc-rootfileproc.patch $ popd $ pushd ../v02-01/DD4hep/v01-11-02/ $ patch -p1 -s < ../../../src/10.15/v02-01/dd4hep-v01-11-02-macosx10.15.patch $ popd -------------------------------------------------------------- # Note: # c++17 dropped mem_fun, bind2nd, register, random_shuffle supports. # forbids 'address of' operation on a reference to nullptr. # - mem_fun -> mem_fn : clupatra/lccd # - bind2nd -> bind : lccd # - random_shuffle -> shuffle (with random_device + mt19937) : fcalcluster # - register -> '' : marlinutil # - nullptr dereference forbidden : kaltest # KalTest: smoothing, inverse filter stopped working. -------------------------------------------------------------- To rebuid a package after modifiying the source code: $ cd $ touch .install_failed.tmp -------------------------------------------------------------- 5) Test run # I had to add all the relevant lib directories to DYLD_LIBRARY_PATH # in init_ilcsoft.sh # I also had to reboot the system with Cmd+R (or Opt+Cmd+R) and do # the following to allow DYLD_LIBRARY_PATH # csrutil disable 6) KalTest in Xcode 6-1) Build root with clang++ $ sudo alternatives --config gcc .. to select clang $ cd $ mkdir root $ cd root $ tar -zxvf /root_v6.20.00.source.tar.gz $ cd mv root-6.20.00 6.20.00 $ cd 6.20.00 $ mkdir build_root $ cd build_root $ cmake -DCMAKE_INSTALL_PREFIX=`pwd`/.. .. $ make -j8 $ make install 6-2) Then build ilcutil with that root $ cd $ mkdir ilcutil $ cd ilcutil $ tar -zxvf /ilcutil-v01-06.tar.gz $ cd v01-06 $ mkdir build $ cd build $ source ../../../root/6.20.00/bin/thisroot.sh $ cmake .. $ make $ make install 6-3) Prepare Xcode project for KalTest $ cd $ mkdir kaltest $ tar -zxvf /kaltest-v02-03.tar.gz $ cd v02-03 $ mkdir build $ source ../../root/6.20.00/bin/thisroot.sh $ cmake -G Xcode -DILCUTIL_DIR= .. 6-4) Build and run KalTest with Xcode # v02-04 does not work (no display) # reverted to v02-03 ---------------------------------------------------- To get the head version do the following, instead: $ svn co https://svnsrv.desy.de/public/marlintpc/trunk 5) Then build and install MarlinTPC If you have libjpeg-devel and libtiff-devel installed, uninstall them since they conflict with the system provided libraries: $ rpm -e libjpeg-devel libtiff-devel Then build MarlinTPC: $ cd /Users/proj/cdc/soft/MarlinTPC $ tar -zxvf src/r3390.tar.gz $ cd r3390 $ tar -zxvf ../src/analysis.tar.gz $ mkdir build $ cd build $ cmake -C ../../../v01-17-04/ILCSoft.cmake .. $ make install $ cd .. $ tar -zxvf ../src/LP_Asian_GEM_Module.tar.gz -C examples 7) You can also try CEDViewer In order to use CEDViewer, you need to start a CED server, glced, first. $ source ../../../v01-17-04/init_ilcsoft.sh $ glced -world_size=100. Then open a new termnal window and type $ cd /Users/proj/cdc/soft/MarlinTPC/r3390/examples/LP_Asian_GEM_Module $ Marlin reconstructLCTPCRawData.xml Hit "h" in the viewer window for "help". In order to get trunk version of ilcsoft, first get the trunk version of ilcinstall by typing $ svn co https://svnsrv.desy.de/public/ilctools/ilcinstall/trunk