---------------------------------------------------------------------- 2020/03/20 K.Fujii v02-01 ---------------------------------------------------------------------- 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-community-devel imake cernlib cmake gcc glibtool m4 autoconf automake poppler-devel libgcrypt-devel libptexenc-devel 2) Get the "ilcinstall" and its MacOSX patch $ sudo mkdir -p /Users/proj/soft/ilcsoft/gcc/src/10.15/v02-01 $ sudo chown -R /Users/proj/soft/ilcsoft/gcc $ cd /Users/proj/soft/ilcsoft/gcc/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 clupatra-v01-03-c++17.patch fastjet-3.3.3-shared.patch fcalcluster-v01-00-01-c++17.patch forwardtracking-v01-14-notest.patch ilcinstall-v02-01-macosx10.15-gcc.patch ilcinstall.02.01.tar.gz ilcutil-v01-06-macosx10.15.patch ildperformance-v01-07-unistd.patch kaltest-v02-05-c++17.patch lccd-v01-05-c++17.patch lcio-v02-13-01-macosx10.15.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 4) Build and install the ilcsoft 4-0) Set default compilers to gcc $ sudo alternatives --config gcc ------------ select gcc! ------------ 4-1) First install base packages. $ cd /Users/proj/soft/ilcsoft/gcc $ 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/ilcinstall-v02-01-gcc.patch $ patch -p1 -s -b < ../src/10.15/v02-01/ilcinstall-v02-01-dyld.patch $ ./ilcsoft-install -i releases/v02-00/release-base.cfg ....... ... before compilation starts, apply the following patches in a new window: ... Open a new terminal and do the following ....... $ pushd ../FastJet/3.3.3 $ patch -p1 -s < ../../src/10.15/v02-01/fastjet-3.3.3-shared.patch $ popd $ pushd ../ilcutil/v01-06 $ patch -p1 -s < ../../src/10.15/v02-01/ilcutil-v01-06-macosx10.15.patch $ popd $ pushd ../root/6.20.00 $ patch -p1 -s < ../../src/10.15/v02-01/root-v6.20.00-cmake.patch $ patch -p1 -s < ../../src/10.15/v02-01/root_v6.18.04-macosx10.14.patch $ popd $ pushd ../sio/v00-00-02 $ patch -p1 -s < ../../src/10.15/v02-01/SIO-00-00-02-macosx10.14.patch $ popd ....... ... after installation, do the following ....... $ 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. -------------------------------------------------------------- 4-2) Then install ilcsoft packages $./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/lccd/v01-05/ $ patch -p1 -s < ../../../src/10.15/v02-01/lccd-v01-05-c++17.patch $ popd $ 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/ILDPerformance/v01-07/ $ patch -p1 -s < ../../../src/10.15/v02-01/ildperformance-v01-07-unistd.patch $ popd $ pushd ../v02-01/ForwardTracking/v01-14/ $ patch -p1 -s < ../../../src/10.15/v02-01/forwardtracking-v01-14-notest.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/Clupatra/v01-03/ $ patch -p1 -s < ../../../src/10.15/v02-01/clupatra-v01-03-c++17.patch $ popd $ pushd ../v02-01/FCalCluster/v01-00-01/ $ patch -p1 -s < ../../../src/10.15/v02-01/fcalcluster-v01-00-01-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/lcio/v02-13-01/ $ patch -p1 -s < ../../../src/10.15/v02-01/lcio-v02-13-01-macosx10.15.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 removed mem_fun, find2nd, register, and random_shuffle supports. # unistd patch includes unistd.h to define R_OK and W_OK. -------------------------------------------------------------- To rebuid a package after modifiying the source code: $ cd $ touch .install_failed.tmp -------------------------------------------------------------- # C++ Note: # (a) bind2nd/mem_funn: +#if 0 std::bind2nd( std::mem_fun (&IConditionsChangeListener::conditionsChanged), _col) +#else + std::bind( std::mem_fn + (&IConditionsChangeListener::conditionsChanged), std::placeholders::_1, _col) +#endif # # (b) register: # Just delete the keyword. # # (c) random_shuffle: +#if 0 +#else +#include +#endif .... +#if 0 std::random_shuffle(bg_files.begin(), bg_files.end()); +#else + std::random_device seed_gen; + std::mt19937 engine(seed_gen()); + std::shuffle(bg_files.begin(), bg_files.end(), engine); +#endif -------------------------------------------------------------- # Note 2: # DD4hep: # - listcomponents compliled with g++ won't work for libDDEvePlugins # and all of libDDG4** if DYLD_LIBRARY_PATH contains /usr/lib before # /opt/osxws/lib so as not to link /usr/lib/libstdc++.dylib instead of # /opt/osxws/lib/libstdc++.dylib.. # For this, I had to patch ilcinstall.02.01/ilcsoft/baseilc.py # to eliminate /usr/lib from DYLD_LIBRARY_PATH: # (see ilcinstall-v02-01-macosx10.15-dyld.patch). -------------------------------------------------------------- 5) Test run # I had to add all the relevant lib directories to DYLD_LIBRARY_PATH # in init_ilcsoft.sh, which is available in LP_Asian_GEM_Module directory # in the MarlinTPC's exapmles directory. # 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 $ cd /Users/proj/soft/ilcsoft/gcc/v02-01/MarlinTPC/v01-06/examples/LP_Asian_GEM_Module/ $ bash $ source init_ilcsoft.sh $ sh manyrun.sh 2000 ....... ... wait until all the runs finish. ....... $ mv r199* Data/ $ mav r200* Data/ $ cd Analysis/ $ root -l GMResol.C ....... 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