Cannot find "root-config" file

We have installed a package called “NPTool” which uses GEANT4 and ROOT. Both are installed successfully and can be executed separately. However on executing NPTool we are getting the following error:

Blockquote

Dhrubas-MacBook-Pro:NPLib dhruba$ cmake ./

Looking for Root:

Root /bin/sh: /Users/dhruba/root/bin/root-config: No such file or directory found

Building all detectors

– Configuring done

– Generating done

– Build files have been written to: /Users/dhruba/nptool/NPLib

Blockquote

Can you please suggest what could be the reason of this error.

Hi,

Is your ROOT installation in /Users/dhruba/root ?

How did you install ROOT?

Cheers,
Enric

NPTool uses a custom CMake FindROOT macro. It seems that the failure is upon execution of root-config when trying to return the version.

message("Looking for Root:")
set(NPTOOL_ROOT_SEARCHPATH 
    $ENV{ROOTSYS}/bin 
    $ENV{PATH}
    /usr/bin  # Debian install
    /opt/local/bin # Macports install
    /usr/local/bin
    )

find_program(NPTOOL_ROOT_CONFIG NAMES root-config PATHS ${NPTOOL_ROOT_SEARCHPATH} )
if(NPTOOL_ROOT_CONFIG MATCHES "NOTFOUND")
  message(FATAL_ERROR "ROOT is not found, check your installation")
endif()

#Appears that it is failing here
exec_program(${NPTOOL_ROOT_CONFIG} ARGS "--version" OUTPUT_VARIABLE NPTOOL_ROOT_VERSION)
...

You could have cmake return the variable ${NPTOOL_ROOT_CONFIG} and see if that is the correct location.

message(STATUS "Searching: ${NPTOOL_ROOT_SEARCH_PATH}")
message(STATUS "Found root-config at: ${NPTOOL_ROOT_CONFIG}")

These are still useful questions to answer as well.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.