GEANT4.9.6 with gdml installation problem

Hi everyone!
I have an error during geant4.9.6 building with gdml option:

/usr/include/xercesc/framework/XMLFormatter.hpp:180:17: error: ‘XMLCh’ does not name a type
  180 |         , const XMLCh* const            docVersion
      |                 ^~~~~

/usr/include/xercesc/framework/XMLNotationDecl.hpp:217:5: error: ‘fBaseURI’ was not declared in this scope; did you mean ‘setBaseURI’?
  217 |     fBaseURI = XMLString::replicate(newId, fMemoryManager);
      |     ^~~~~~~~
      |     setBaseURI
/usr/include/xercesc/framework/XMLNotationDecl.hpp:217:37: error: cannot convert ‘const int* const’ to ‘const char*’
  217 |     fBaseURI = XMLString::replicate(newId, fMemoryManager);
      |                                     ^~~~~
      |                                     |
      |                                     const int* const
/usr/include/xercesc/framework/XMLEntityDecl.hpp:465:42: error: cannot convert ‘const int* const’ to ‘const char*’
  465 |     fNotationName = XMLString::replicate(newName, fMemoryManager);
      |                                          ^~~~~~~
      |                                          |
      |                                          const int* const
/usr/include/xercesc/framework/XMLEntityDecl.hpp:465:5: error: ‘fNotationName’ was not declared in this scope; did you mean ‘setNotationName’?
  465 |     fNotationName = XMLString::replicate(newName, fMemoryManager);
      |     ^~~~~~~~~~~~~
      |     setNotationName

The errors occured around 90% of building process.

The final output is:

-- verifying file...
-- Downloading... done
-- extracting...
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 96%] No update step for 'G4NDL'
[ 96%] No patch step for 'G4NDL'
[ 96%] No configure step for 'G4NDL'
[ 96%] No build step for 'G4NDL'
[ 96%] No install step for 'G4NDL'
[ 96%] Completed 'G4NDL'
[ 96%] Built target G4NDL
make: *** [Makefile:156: all] Error 2

I’m using xerces-c++ 3.2.3-5 from standard repo (pacman package manager).


  • cmake 3.22.1
  • gcc 11.1.0
  • GNU make 4.3

It was perfect installation of geant4.11.0 with such a parameters and -GEANT_USE_GDML=ON

Tried build with xerces 3.2.0 & 3.2.2, gcc 4.3.6
also tried Ubuntu 20.04 (with apt) and another machine.

The installation of this version of geant succeeded couple month ago, but now is not and I have no idea why. Also I tried installation of geant4.10.0 with gdml option with no success (same errors).

1 Like

Version 9.6 is no longer supported, so I’m not sure we can be a lot of assistance here. The errors appear to be coming from Xerces-C though - can you locate the actual .cc file in Geant4 which causes the compilation failure?

Thank you for answer!
I will try to find this file, it may take a while.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.