I’m trying to install Geant4 v 11.0.3 in my local directory on a server at my institution. The cmake and gcc versions maintained in /usr/bin are quite old, so I had to locally install the most recent versions of both of those (cmake version 3.25.0 and gcc version 13.0.0). Once I had done that, I was able to configure geant with “cmake -DCMAKE_INSTALL_PREFIX=/path/to/geant4-v11.0.3-install /path/to/geant4-v11.0.3”.
However, when I then try to compile it, I get a string of errors of the form “‘uint32_t’ in namespace ‘std’ does not name a type” and “‘uint62_t’ in namespace ‘std’ does not name a type”.
Doing some searching on stackexchange, it looks like this may be an issue with gcc no longer including <stdint.h> or by default. However, it looks like those ceased to be included many versions ago, and I’m not sure why the latest version of Geant would require a new version of gcc to be configured, but then fail at compilation because an old version is being used.
I tried forcing inclusion of stdint.h by exporting CC=“/mydirectory/bin/gcc -include stdint.h” and CPP=“/mydirectory/bin/g++”, then repeating “cmake -DCMAKE_INSTALL_PREFIX=/path/to/geant4-v11.0.3-install /path/to/geant4-v11.0.3”, but when I run “make”, I still get the same errors.
Any idea what I’ve done wrong here? Thanks.