CMAKE - ROOT_DIR= does not exist

ROOT Version: root_v5.34.36 is the result of echo $ROOTSYS
Platform: Ubuntu 20.04

Hello all,

I’m trying to install g4beamline on my Ubuntu machine and I’ve run into some issues. Running the command

cmake …/G4beamline-3.06

yields the result

CMake Error at CMakeLists.txt:94 (message):
ROOT_DIR= does not exist

– Configuring incomplete, errors occurred!
See also “/home/cyrus/G4beamline-3.06/CMakeFiles/CMakeOutput.log”.

Lines 91-96 are

if(G4BL_ROOT)
set(ROOT_DIR "ENV{ROOTSYS}" CACHE PATH "Directory containing Root") if(NOT IS_DIRECTORY {ROOT_DIR})
message(FATAL_ERROR “ROOT_DIR=${ROOT_DIR} does not exist”)
endif()
endif()

I’ve tried and failed some things including nuking the directory and starting again, manually setting the path, editing the .bashrc file, and a few other things but long story short I’m new to this and out of ideas. This might not be the best place to ask but stackoverflow didn’t help and the g4beamline group hasn’t accepted my invite yet. Does anyone have any suggestions for something I could try? I am also willing to provide more information, I think I’ve done everything on the checklist / included relevant info

echo $ROOTSYS” should return “/full/path/to/your/root” directory (e.g., check “ls $ROOTSYS/bin/root-config”).
In principle, “ROOTSYS” should be properly defined after you execute “source /full/path/to/your/root/bin/thisroot.sh” (in the current shell).

echo $ROOTSYS does return the filepath (and same with the ls command you suggested), I was just answering the recommended suggestion of including of what platform / version I have

Make sure you execute (in the same terminal window):

cd /some/working/directory/not/equal/to/where/your/sources/are
source /full/path/to/your/root/bin/thisroot.sh
echo ${ROOTSYS} # just to make sure it is correct
cmake /.../G4beamline-3.06 # assuming this directory keeps your sources

I tried this but I’m still getting the same

CMake Error at CMakeLists.txt:94 (message):
ROOT_DIR= does not exist

error as before

Maybe you need to delete your “working directory” first (to make sure that you start from scratch).

I nuked everything and I’m starting over - that solved those issues and a few other popped up (i.e. they were looking for incorrectly named files so that was as easy as renaming the files correctly).

I got an error about the Geant4 install/directory so I nuked that and am doing a fresh build/install of that too to see if that will also fix the errors - but thanks for the idea that got me passed that particular issue (:

After the Geant4 reinstallation I’ve run into a few more issues, but they were easy enough to fix - but I’m now stuck on

CMake Error at g4bl/CMakeLists.txt:64 (message):
GSL_DIR= does not exist

Google wasn’t particularly helpful - do you have any ideas about this problem?

Try: sudo apt-get install libgsl-dev

It says I’m already using the newest version with 0 updates / upgrades