Closed awegrzyn closed 6 years ago
I think I had this one the other day (but using a "custom" cmake configuration from my IDE, not using alibuild), and it was because some libs for the simulation was not found (Geant3,Geant4,Geant4VMC,pythia6,pythia8, there should be relevant messages in the cmake configure stage)
In the CMake configure stage, do you see the line : -- Simulation environment found
?
Nope I get this instead:
DEBUG:O2:O2:0: -- Could NOT find GLFW (missing: GLFW_INCLUDE_DIR GLFW_LIBRARIES)
DEBUG:O2:O2:0: -- Simulation environment not found : at least one of the variables G4RUNLIB, G3RUNLIB, VMCLIB, Pythia6_FOUND or PYTHIA8_FOUND was not set correctly.
cmake -L
gives:
G3RUNLIB:FILEPATH=G3RUNLIB-NOTFOUND
G4RUNLIB:FILEPATH=G4RUNLIB-NOTFOUND
but Geant4_DIR
, Geant3_DIR
is correctly set...
Yes, finding the right way to configure the cmake call for G* libs is kind of a pain... as the right combination of CMAKE_PREFIX_PATH (in theory to indicate the locations of
A working solution/inspiration (not rocket science at all but the result of trial and error...) might hopefully be found in https://github.com/aphecetche/scripts/blob/master/cmake/cmake-configure-o2.sh
I just tested aliBuild build o2 --defaults=o2
on my MAC (10.11.6) with latest alidist + O2/dev and it goes through. Can you check your versions and mention them in the ticket? Please also mention how you compile.
I did rm -rf *
and compiled from scratch and it fails with the same error :(
I just run aliBuild build O2 --default o2
that's it.
I realize this won't solve your immediate problem, but the logic for deciding whether or not we have all we need for simulation is quite convoluted (and apparently fragile) IMO.
We have in O2Dependencies.cmake the lines :
guess_append_libpath(geant321 "${Geant3_DIR}")
find_package(Geant3 NO_MODULE)
(plus equivalent for G4, etc...) and guess_append_libpath
is already doing a find_library
.
Why can't we just use the cmake variables set by the find_package function ? (Geant3_FOUND, etc...) instead of relying on a second find_library ?
As debugged with @awegrzyn, this particular problem is due to having the system protection enabled on MacOS which prevents correct setup of LD_LIBRARY_PATH
, which in turn did not enable the internal variable HAVESIMULATION
.
@ktf, @dberzano : Do we support building with system protection on? If not, alibuild should probably fail from the start.
Independently on that, I will try to make the HAVESIMULATION
detection more robust.
@sawenzel It works, thanks!
As I've been working with o2-dataflow
defaults I forgot that system protection needs to be disabled.
I think alibuild does support SIP enabled after the changes from @syamasak .
So indeed in principle what should be done is to have simulation detection logic which is more reliable.
How about simply have the user set -DHAVESIMULATION
or something similar when they want simulation enabled? After all, anyone building with alibuild already does that choice by selecting o2 vs o2-dataflow.
Any idea?