acts-project / acts

Experiment-independent toolkit for (charged) particle track reconstruction in (high energy) physics experiments implemented in modern C++
https://acts.readthedocs.io
Mozilla Public License 2.0
103 stars 165 forks source link

Error while building Geant4 plugin #3557

Open nibir98 opened 2 weeks ago

nibir98 commented 2 weeks ago

I get this error while building acts with Geant4 plugin error: 'using enum' only available with '-std=c++20' or '-std=gnu++20' 71 | using enum AxisType;

Specifically set cxx type to c++ 20 in the CMakeLists.txt file

set(CMAKE_CXX_STANDARD 20) # Use 17 for C++17 or 20 for C++20 set(CMAKE_CXX_STANDARD_REQUIRED YES) # Ensure the standard is strictly enforced set(CMAKE_CXX_EXTENSIONS NO) # Avoid using compiler-specific extensions set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")

Is it possible that this could be due to conflicts with other dependencies?

asalzburger commented 2 weeks ago

Did you build your externals (including Geant4) also with C++20?

nibir98 commented 2 weeks ago

A possible reason could be that I'm using a G4 build on the Fermilab machines (the CXX_STANDARD is 17). I'm also seeking suggestions on how to get started with ACTS and what the minimum build requirements are to run a full chain analysis. My goal is to implement ACTS in our straw-based detector to reconstruct muons. We have the complete simulation chain, and I want to explore various reconstruction options, such as KF, KCF, and GCF, from ACTS. If it’s not too much trouble, could you please provide contact information for the ACTS team so that I may reach out directly?

paulgessinger commented 2 weeks ago

Hey @nibir98, there's a team on the CERN Mattermost here, that's usually a good place to start.

Unfortunately, C++20 is a basic requirement at this point. Is there any way you can get a version of G4 that's compiled with C++20?