eic / eic-smear

fast simulation tool originally developed by the BNL EIC task force
GNU General Public License v3.0
2 stars 11 forks source link

Error building on Mac #10

Closed DraTeots closed 2 years ago

DraTeots commented 3 years ago

There is an error while building on Mac. Some libraries are not found:

Build command

cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/Users/cfanelli/Desktop/projects/ESCalate/escalate/eic-smear/eic-smear-1.1.2 -DCMAKE_CXX_STANDARD=17   /Users/cfanelli/Desktop/projects/ESCalate/escalate/eic-smear/src/1.1.2&& cmake --build . -- -j 4&& cmake --build . --target install

here is a brief report of the installation error:

[ 79%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/PerfectID.cxx.o
[ 81%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/PlanarTracker.cxx.o
[ 83%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/RadialTracker.cxx.o
[ 85%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/Smear.cxx.o
[ 87%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/SmearTree.cxx.o
[ 89%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/Tracker.cxx.o
[ 91%] Building CXX object CMakeFiles/eicsmear.dir/src/smear/NumSigmaPid.cxx.o
[ 93%] Building CXX object CMakeFiles/eicsmear.dir/src/erhic/EventFactoryHepMC.cxx.o
[ 95%] Linking CXX shared library libeicsmear.dylib
ld: warning: -pie being ignored. It is only used when linking a main executable
Undefined symbols for architecture x86_64:
  "erhic::File<erhic::EventMilou>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventMilougR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventMilougR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventPepsi>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventPepsigR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventPepsigR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventBeagle>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventBeaglegR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventBeaglegR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventDpmjet>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventDpmjetgR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventDpmjetgR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventPythia>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventPythiagR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventPythiagR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventRapgap>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventRapgapgR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventRapgapgR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventSartre>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventSartregR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventSartregR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventSimple>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventSimplegR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventSimplegR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventDjangoh>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventDjangohgR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventDjangohgR(long, void*) in erhicDict.cxx.o
  "erhic::File<erhic::EventGmcTrans>::File()", referenced from:
      ROOT::new_erhiccLcLFilelEerhiccLcLEventGmcTransgR(void*) in erhicDict.cxx.o
      ROOT::newArray_erhiccLcLFilelEerhiccLcLEventGmcTransgR(long, void*) in erhicDict.cxx.o
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libeicsmear.dylib] Error 1
make[1]: *** [CMakeFiles/eicsmear.dir/all] Error 2
make: *** [all] Error 2
Execution done. Return code = 2
kkauder commented 3 years ago

Just to help me narrow it down, when was the last time you had a successful build (roughly, O(days) or O(weeks)), and did you change anything in the meantime, like upgrade to Big Sur?

DraTeots commented 3 years ago

Well I haven't tried installing it on Mac ever. So unfortunately no prior experience. (I don't have a mac). The user is installing eicsmear for the first time

kkauder commented 3 years ago

Got it. Can you ask them to forward me the cmake output (from scratch; so do rm -r CMake* first, or delete the whole build directory)?

DraTeots commented 3 years ago

I believe this one was made from fresh.

Kolja, I'll check if I can setup/find macos to VM and check it bringing more details

kkauder commented 3 years ago

Thank you. As it is, my only clue is the -pie warning - that flag isn't generated on my (older) mac.

Otherwise, the cmake output and the failing command from

make VERBOSE=1

would be a way for me to look further.

The error appears in the dictionary creation, so please also let me know what ROOT version they're using. Those macros have changed quite a bit over the last few versions. I thought I captured all options, but maybe there's something new again.

DraTeots commented 3 years ago

VMS with macs are not straight forward))) Will be coming up with something tomorrow then.