---------------------------------------------------------------------- 2020/03/18 K.Fujii v02-01 now using clang/clang++ ---------------------------------------------------------------------- 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 cmake 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/clang/src/10.15/v02-01 $ sudo chown -R /Users/proj/soft/ilcsoft/clang $ cd /Users/proj/soft/ilcsoft/clang/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 fcalcluster-v01-00-01-c++17.patch forwardtracking-v01-14-notest.patch ilcinstall-v02-01-macosx10.15-clang.patch ilcinstall.02.01.tar.gz ildperformance-v01-07-unistd.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 4) Build and install the ilcsoft 4-0) Set default compilers to clang $ sudo alternatives --config gcc select clang! 4-1) First install base packages. $ cd /Users/proj/soft/ilcsoft/clang $ 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-clang.patch $ ./ilcsoft-install -i releases/v02-00/release-base.cfg $ pushd ../root/6.20.00/ $ patch -p1 -s < ../../src/10.15/v02-01/root-v6.20.00-cmake.patch $ popd $ 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/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/lccd/v01-05/ $ patch -p1 -s < ../../../src/10.15/v02-01/lccd-v01-05-c++17.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 # Note: # c++17 removed mem_fun, find2nd, register 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 -------------------------------------------------------------- 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-05.tar.gz $ cd v01-05 $ 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