Garfield++ error

I am getting the following error reported when installing Garfield++:


For this I reinstalled ROOT again and specifically added -DCMAKE_CXX_STANDARD=17 to the cmake command line. my version of ROOT is 6.30.4. I use the command “root-config --cflags”, and it shows:“-pthread -std=c++17 -m64 -I/home/xuzh/software/root/root_install/include”.
Does this mean my ROOT installation is fine?And what is the problem?

Hi,

Adding @hschindl in the loop.

Best,
D

Hi,
did you build ROOT yourself or are you using a precompiled binary distribution?
Which platform and compiler are you using?

Hello. I installed ROOT by source code. My system is Ubuntu22.04 and my compiler is GCC 11.4.0.

Hm, strange. I don’t have access to a Ubuntu machine, but the Gitlab pipeline based on the “root:6.30.04-ubuntu22.04” Docker image seems to build fine. Normally you shouldn’t need to specify the C++ standard explicitly…
@Danilo any idea what could be wrong?

For this reason I also reinstalled geant4 again, still specifying the C++ standard as 17. Despite the reinstallation of both geant4 and root, the reported error persists. I’m not too well versed in this as I’m new to it as well.

Can you try with a precompiled binary distribution of ROOT?

OK, I will try a precompiled version.

I used a precompiled binary distribution of ROOT(version 6.30.4), it still reported the same errors.

I’ve solved the problem. The solution was to add ‘set(CMAKE_CXX_STANDARD 17)’ to the first line of Garfield++'s CMakeList.txt file, which looks like it needs to force the C++ standard to be specified, rather than having it auto-detect the ROOT’s C++ standard.
Thanks again for your advice and help!

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