I run cmake using above command after that I got error as follows:
[ 84%] Building CXX object source/CMakeFiles/G4persistency.dir/persistency/ascii/src/G4tgrEvaluator.cc.o
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:73:10: error: ambiguating new declaration of ‘G4double fsqrt(G4double)’
73 | 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/kajal/software/geant4.10.07.p01/source/global/management/include/G4Types.hh:74,
from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4ios.hh:35,
from /home/kajal/software/geant4.10.07.p01/source/global/management/include/globals.hh:35,
from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4ThreeVector.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:37,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/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);
| ^~~~~~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc: In member function ‘void G4tgrEvaluator::AddCommonFunctions()’:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:14: error: no matching function for call to ‘setFunction(const char [5], float (&)(double) noexcept)’
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~~
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:125:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char, double ()())’ (near match)
125 | void setFunction(const char * name, double (fun)());
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:125:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double ()()’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:135:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char*, double ()(double))’ (near match)
135 | void setFunction(const char * name, double (fun)(double));
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:135:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double ()(double)’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:145:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char*, double ()(double, double))’ (near match)
145 | void setFunction(const char * name, double (fun)(double,double));
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:145:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double ()(double, double)’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:155:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char*, double ()(double, double, double))’ (near match)
155 | void setFunction(const char * name, double (fun)(double,double,double));
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:155:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double ()(double, double, double)’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:165:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char*, double ()(double, double, double, double))’ (near match)
165 | void setFunction(const char * name,
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:165:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double ()(double, double, double, double)’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
In file included from /home/kajal/software/geant4.10.07.p01/source/global/management/include/G4Evaluator.hh:33,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/include/G4tgrEvaluator.hh:38,
from /home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:31:
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:176:8: note: candidate: ‘void HepTool::Evaluator::setFunction(const char, double ()(double, double, double, double, double))’ (near match)
176 | void setFunction(const char * name,
| ^~~~~~~~~~~
/home/kajal/software/geant4.10.07.p01/source/externals/clhep/include/CLHEP/Evaluator/Evaluator.h:176:8: note: conversion of argument 2 would be ill-formed:
/home/kajal/software/geant4.10.07.p01/source/persistency/ascii/src/G4tgrEvaluator.cc:95:24: error: invalid conversion from ‘float ()(double) noexcept’ to ‘double (*)(double, double, double, double, double)’ [-fpermissive]
95 | setFunction(“sqrt”, (fsqrt));
| ~^~~~~~~
| |
| float ()(double) noexcept
make[2]: *** [source/CMakeFiles/G4persistency.dir/build.make:398: source/CMakeFiles/G4persistency.dir/persistency/ascii/src/G4tgrEvaluator.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3275: source/CMakeFiles/G4persistency.dir/all] Error 2
make: *** [Makefile:156: all] Error 2