Hi, I am trying to install GATE on WSL but I am stuck at the step of
ccmake ../Gate-9.4
, and before this step, I am not sure if I should build the directory of gate-build and gate-install within the GATE directory or out of it. When I run the command in the gate-build directory, there is:
CMake Error: The source directory
"/~/Geant4/Gate-9.4" does not exist.
Do I have to make my own Gate-9.4 directory?
_Geant4 Version:geant4-11-02-patch-02
_Operating System:WSL (Ubuntu 22.04.3 LTS)
_Compiler/Version:gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
_CMake Version:cmake version 3.22.1
GATE is a third-party product, so nominally you should contact its support channels for help.
Where are you running ccmake
from in relation to the GATE source directory? If you have done, e.g.
$ cd Gate-9.4
$ mkdir gate-build
$ cd gate-build
$ ccmake ../Gate-9.4
then that should work. The error:
would indicate that you ran ccmake /~/Geant4/Gate-9.4
or similar, or that WSL is somehow resolving the path incorrectly.
I see, when I run what you suggested, then the error becomes
CMake Error: The source directory "/~/Geant4/Gate-9.4/Gate-9.4" does not exist.
so does that mean another Gate-9.4 directory should exist in the gate-build directory?
No, the problem is the path that CMake has been passed as the source directory is somehow getting expanded from a relative path, in your original post cmake ../Gate-9.4
to an absolute path /~/Geant4/Gate-9.4
that doesn’t exist (or maybe isn’t readable).
It’s not clear why that’s happening. Could you post the absolute path on your system to the Gate-9.4
source directory please? Could you also check if there truly is a directory named /~/Geant4/Gate-9.4
present?
Hi, the absolute path is /home/username/jingsyuen/Geant4/Gate (I recloned it and did not rename Gate to Gate-9.4), and in my directory, ~/jingsyuen/Geant4/Gate is present. In the original post, the /~/ was a typo. I am wondering if the error is due to Gate not being in the home directory directly.
O.k., given the paths you have now, I’d expect the following to work:
$ cd /home/username/jingsyuen/Geant4
$ cmake -S./Gate -B./Gate-build
$ cmake --build ./Gate-build
If it doesn’t please post the full output, and make sure to avoid typos.
In cmake -S./Gate -B./gate-build
, I since the directory created was named gate-build, so I changed the command, I am not sure if this is correct, but it created a directory gate-build at the same level as the Gate directory, the output is as follows:
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version "2.4.7", minimum required is "2.4.7")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found Geant4: /home/username/jingsyuen/Geant4/geant4-v11.2.2-install/lib/cmake/Geant4/Geant4Config.cmake (found version "11.2.2")
CMake Error at CMakeLists.txt:130 (FIND_PACKAGE):
By not providing "FindROOT.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ROOT", but
CMake did not find one.
Could not find a package configuration file provided by "ROOT" with any of
the following names:
ROOTConfig.cmake
root-config.cmake
Add the installation prefix of "ROOT" to CMAKE_PREFIX_PATH or set
"ROOT_DIR" to a directory containing one of the above files. If "ROOT"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/home/username/jingsyuen/Geant4/gate-build/CMakeFiles/CMakeOutput.log".
And here the full output log file:
CMakeOutput.txt (55.0 KB)
Please, see and follow the Gate install guide here: 2. Compiling GATE V9.4 — GATE documentation where it notes the need to install ROOT.