Compilation with ROOT

Dear castor users,

I am new to CASTOR.
I have a plan to reconstruct the simulated results from GATE v.8.2.
I complied CASTOR using CMAKE with defining option in CMakeLists.txt as below:

option( CASToR_64bits “Build CASToR on 64 bits architecture” YES )
option( CASToR_VERBOSE “Print lot of infos from CASToR” YES )
option( CASToR_DEBUG “Enable many additionnal checks in primitive functions” NO )
option( CASToR_BUILD_GATE_UTILITIES “Build GATE tools for CASToR (require ROOT library)” YES )
option( CASToR_BUILD_SAMPLE_UTILITIES “Build toolkits and example codes” NO )
option( CASToR_BUILD_DEVEL “Build devel tools. Must be left unchecked” NO )
option( CASToR_ROOT “Build CASToR with ROOT library” NO )
option( CASToR_SIMD “Build CASToR with SIMD OPTION” NO )
option( CASToR_OMP “Build CASToR with OMP” NO )
option( CASToR_MPI “Build CASToR with MPI” NO )

The cmake compilation was successful with below command in terminal

cmake CMakeLists.txt -DCASTOR_CONFIG=/home/gate/kkm/castor_v3.1.1/config

and with make command the castor-RootToCastor.exe in bin directory.
However, when I execute the castor-RootToCastor.exe as below I got the error massage.

castor-GATERootToCastor -i benchSPECT.root -o test -m benchSPECT_dew.mac -s SPECT_CASTOR_BENCHMARK.geom
***** castor-GATERootToCastor :: CASToR must be compiled with ROOT to read input root files (check installation instructions)
***** Exit function called. Abort with code 1.

I confirmed that root is executed normally as below.

[gate@localhost castor_v3.1.1]$ root

Dear Kim,

From your email I am not sure if you compiled CASToR using ccmake GUI, command-line cmake, or using the CASToR makefile.

Your list of options suggests you used ccmake GUI first. CASToR ROOT option should be set to YES (not the case here), however it should be set on automatically if you set CASToR_BUILD_GATE_UTILITIES to YES after configuring. If you toggle advanced mode in root GUI (using ‘t’), one of the last variable ROOT_CONFIG_EXECUTABLE should indicate the position of your root files. You can check this to be sure CASToR found your root installation, and then generating the ccmake makefile in order to finally compile the code.

Hope this helps,
Thibaut