export SIMPATH=/Users/zhangce/Applications/FairSoft/install
#export FAIRROOTPATH=/Users/zhangce/Applications/FairRoot/install ## after installing FairRoot
cd /Users/zhangce/Applications
git clone https://github.com/FairRootGroup/FairSoft
cmake -S FairSoft -B FairSoft /build/ -C FairSoft /FairSoftConfig.cmake
cmake --build FairSoft /build/
git clone -b master https://github.com/FairRootGroup/FairRoot.gitcopy MUonE from https://gitlab.cern.ch/mgoncerz/fairmuone/-/releases to the FairRoot directory
cd FairRoot
vi CMakeLists.txt ### add_subdirectory(MUonE)
mkdir buildI had three issues during the 'make':
mkdir install
cd build
cmake -DCMAKE_INSTALL_PREFIX="/Users/zhangce/Applications/FairRoot/install" ../
make -k
target_link_libraries(${target} PUBLIC
Core
fairlogger
Physics
MathCore
ED
yaml-cpp
)
/lib64/libooptools --> lib/libooptools
brew install gfortran
/usr/local/gfortran/lib/
vi VertexGenerators /Mesmer/CMakeFiles/Mesmer.dir/link.txt/usr/bin/clang++ -O2 -g -Wshadow -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 18.6.0 -current_version 18.6.9 -o ../../../../lib/libMesmer.18.6.9.dylib -install_name @rpath/libMesmer.18.6.dylib "CMakeFiles/Mesmer.dir/__/__/__/__/_deps/mesmer_interface-src/code/MuEtree.cc.o" "CMakeFiles/Mesmer.dir/__/__/__/__/_deps/mesmer_interface-src/code/Utils.cc.o" CMakeFiles /Mesmer.dir/G__Mesmer.cxx.o -L/Users/zhangce/Applications/FairSoft/install/lib -Wl,-rpath,/Users/zhangce/Applications/FairSoft/install/lib /Users/zhangce/Applications/FairSoft/install/lib/libCore.so /Users/zhangce/Applications/FairSoft/install/lib/libPhysics.so /Users/zhangce/Applications/FairSoft/install/lib/libMathCore.so mesmer_build-prefix/src/mesmer_build/libmesmerfull.a /opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12/libgcc.a -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/ /usr/local/gfortran/lib/libgfortran.a /usr/local/gfortran/lib/libquadmath.a /Users/zhangce/Applications/FairSoft/install/lib/libRIO.so Basically, the principle is to manually add the missing libs (that can not be found somehow by FairRoot...) similar operation done to: - VertexGenerators/CMakeFiles/MUonEVertexGenerators.dir/link.txt - MUonEGenerators.dir/link.txt In those link.txt, I replaced the -lgfortran with /usr/local/gfortran/lib/libgfortran.a Finally
make installDone! -- CeZhang - 16 Dec 2022