BUilding with python error

While building with python its giving me the following error:

/home/apmnair18/Geant4py/geant4-10.6.2/source/persistency/ascii/src/G4tgrEvaluator.cc:79:10: error: ambiguating new declaration of ‘G4double fsqrt(G4double)’
   79 | G4double fsqrt( G4double arg ){  return std::sqrt(arg); }
      |          ^~~~~
In file included from /usr/include/c++/11/cmath:45,
                 from /usr/include/c++/11/complex:44,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/global/management/include/G4Types.hh:71,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/global/management/include/G4ios.hh:38,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/global/management/include/globals.hh:48,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/global/management/include/G4ThreeVector.hh:38,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/persistency/ascii/include/G4tgrEvaluator.hh:42,
                 from /home/apmnair18/Geant4py/geant4-10.6.2/source/persistency/ascii/src/G4tgrEvaluator.cc:35:
/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h:36:20: note: old declaration ‘float fsqrt(double)’
   36 | __MATHCALL_NARROW (__MATHCALL_NAME (sqrt), __MATHCALL_REDIR_NAME2 (sqrt), 1);

Anyone know how to fix this?
Im using Kubuntu 22.04 and geant4 version 10.6.2

Thanks
Anantha Padmanabhan

Geant4 10.6.2 is very old and is/was not supported/tested with GCC 11.2. It’s best to use a newer release, and cross check with the Geant4Py releases here: GitHub - koichi-murakami/g4python: Geant4-Python interface and also there for support with install Geant4Py itself.