Search code examples
configurationinstallation

Geant4 does not find Expat library


I'm trying to install Geant4 10.00 on Linux Mint 15. I have the unzipped geant4 file geant4.10.00.p01 in the directory I made:

/home/.../Geant4

along with the required build file geant4.10.00-build. I'm at the cmake command part and getting this error

~/Geant4/geant4.10.00-build $ cmake -DCMAKE_INSTALL_PREFIX=/home/.../Geant4/geant4.10.00.p01-install /home/.../Geant4/geant4.10.00.p01
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
  Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindEXPAT.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/Modules/Geant4OptionalComponents.cmake:71 (find_package)
  CMakeLists.txt:78 (include)


-- Configuring incomplete, errors occurred!

Seems like I ought to download some things.

Thanks for any help!


Solution

  • From the Geant4 documentation:

    GEANT4_USE_SYSTEM_EXPAT (DEFAULT : ON)

    If set to ON, build Geant4 with an external install of Expat. In this case, the Expat headers and library will be searched for under the standard system paths. If these are not sufficient to locate the required Expat installation, see the Advanced EXPAT_INCLUDE_DIR and EXPAT_LIBRARY options.

    Whilst Expat is installed on the vast majority of systems, it may be missing in certain instances. In these cases, simply switch this option to OFF and Geant4 will build and use its internal version of Expat.

    REQUIRES : Expat library and headers.