Hi,
it looks like CMake doesn’t find your ROOT installation. Did you source the thisroot.sh script before building Garfield++?
Best regards,
Heinrich
PS: the instructions given on the link that you sent don’t seem to be fully up to date (the plain makefile and the garfroot executable don’t exist anymore).
I would recommend following the “official” instructions on the Garfield++ website: http://garfieldpp.web.cern.ch/garfieldpp/getting-started/
or on gitlab:
@mato do you have an idea what could be the issue?
Some people have reported that they managed to solve this by using the binary distribution of ROOT.
You could also try the recipe given here:
The problem is that the ROOT installation is incomplete. As far I can see you did source root-6.18.04/build/bin/thisroot.sh which indicates that you are using the binaries and configuration files produced during the build process. Did you ‘install’ ROOT after building it with make install?
The difference is that the CMake configuration files, such as ROOTConfig.cmake that will chain the target include directories dependencies will assume that you have installed ROOT after building it.
You just need to finish the installation of ROOT specifying the location where you want the installation to be with -DCMAKE_INTALL_PREFIX=/home/afzaal/root-6.18.04/install and issue a make install. Then source /home/afzaal/root-6.18.04/install/bin/thisroot.sh.
Thanks for your response!
Really my root installation is incomplete. But when i give “make install” command
then error is "[100%] Built target hist2workspace
Install the project…
– Install configuration: “RelWithDebInfo”
– Up-to-date: /usr/local/lib
CMake Error at cmake_install.cmake:41 (file):
file INSTALL cannot set permissions on “/usr/local/lib”: Operation not
permitted.
Further more when i give following command after it
"-DCMAKE_INSTALL_PREFIX=/home/afzaal/root-6.18.04/install than error is “No such file or directory”.
Really need solution to complete install root.
Thanks.
Ok but now error is
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error: The source “/home/afzaal/root-6.18.04/build/CMakeLists.txt” does not match the source “/home/afzaal/root-6.18.04/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.
Where i did mistake?
Thank you very much mato! Your responses really helped me a lot. I executed all commands that you told successfully (hope this time ROOT is properly installed).
Cheers