-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build REST with Geant4 #213
Comments
I will take a look. It should work with Geant4 11.0.1 and older (up to 10.4.3) so this is not an issue. Could you test the build with Detector/Raw/Track/Geant4 libraries enabled? The Geant4 REST module does not require Geant4 to work, only the |
Hi, perhaps we need to improve the documentation. I believe the problems come from an incompatibility between submodules and core libraries. Make sure you download an official image of REST, described here: The trick is to call
Double-check that the main
Likely we should not allow to execute |
BTW, in case you go for |
Thanks for your help! First, I ran the
The next approach for me was to try older version of REST and its libraries. It turns out that the Geant4 module builds fine in v2.3.10 and v2.3.11, but not in v2.3.12. On v2.3.11 I also tested the full build with Detector/Raw/Track/Geant4 and it works fine. When I enable G4 in addition, I'm back to compiler errors. I then proceeded with some more older versions and tried my full build with Detector/Raw/Track/Geant4/G4.
=> In summary: I can build with Geant4 on v2.3.11, but not v2.3.12. The build with G4 fails on all tested versions. |
Probably v2.3.10 and previous are not compatible with the latest Geant4 versions. When I pull the latest master at the
I cannot reproduce you commit hash
|
Okay, that is strange. The commit belongs to v2.3.12 on my git clone.
On v2.3.11 the commit is also different than yours:
|
@zykure I think if you use the Perhaps the issue is related to the C++ standard used to compile ROOT and Geant4. Currently the only supported standard is C++17, but it could work with a lower one, but its not garanteed. REST automatically detects the C++ standard from root, but if you are not using C++17 this may be an issue for some libraries. Can you please show the output of |
@lobis Thanks, looks like that was an issue. The system version of ROOT I was using was compiled with C++11. I compiled ROOT (6.24) with C++17, and also compiled Geant4 (11.1) to make sure it's using the same compiler (although the binaries were using C++17 already).
The build now succeeds with v2.3.11 of REST when I enable Detector/Raw/Track/Geant4. Adding G4 in addition breaks the build because of a missing include file Now when I switch to v2.3.12 again and run ErrorLog_v2.3.12.txt Git status using
|
Glad that it worked. This problem you are describing is because of a missing Geant4 header that is no longer present in the latest version. However there are preprocessor directives in place to handle this and it should not give an error with the restG4 master branch. Perhaps the logic in the CMake is failing, I will look it up. |
Just a quick comment, I do not know what are the side effects of executing
|
Thanks @jgalan ! I tried again just using Looks like I'm all set now, so I will close this issue. Thanks again both of you! |
I'm trying to setup REST on our institute cluster (at KIT). The system is Ubuntu 20.04.3 with GCC 9.4.0 installed. I'm using ROOT version 6.24 and Geant4 version 11.0.1.
I followed the instructions in https://rest-for-physics.github.io/installation and used the
pull-submodules.py
script on the tagged version 2.3.12 of the REST sources. List of git submodules:GitStatus.txt
CMake runs through without errors but the build fails with many compiler errors. A common error is that
string
is undefined (should bestd::string
orTString
) but there are others as well that are less clear. For example "assignment of read-only location" inTRestGeant4Event
and various issues with templated classes. The full error log is here:ErrorLog_Geant11.txt
Using an older version of Geant4 (10.7.3) and ROOT (6.18.04) does not improve the situation.
The build succeeds with just the Detector/Raw/Track modules enabled, so it must have something to do with the Geant4 libraries.
I don't really understand why there are so many compiler errors. They seem to point at some underlying issue but I can't tell what could be wrong. What is the recommended system to use? Maybe I can try my luck with a Docker container.
The text was updated successfully, but these errors were encountered: