Message: Re: EXPAT library missing Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: EXPAT library missing 

Forum: Installation and Configuration
Re: None EXPAT library missing (Bethany)
Re: Note Re: EXPAT library missing (Ben Morgan)
Date: 25 Feb, 2013
From: Bethany <Bethany>

> 
> We do ship EXPAT with Geant4 for use in cases where the system doesn't
> provide it - so the short answer is, no, you don't need it installed. On
> Linux though, the configuration defaults to searching for a system
> install of expat because it is generally, though not universally, a
> stock package in most distributions. That default is also used because
> if your application has other components that use EXPAT, you'll
> generally want Geant4 to link against that EXPAT, not the Geant4
> internal one.
> 
> > The error I get looks like this: "Could NOT find EXPAT (missing:
> > EXPAT_LIBRARY EXPAT_INCLUDE_DIR)"
> 
> In this case, your system (probably) does not have EXPAT installed, or
> at least not the development package. It's not completely clear what
> distribution you are running on, but the package will be named something
> like libexpat-devel , and you should have a libexpat.so in /usr/lib{64}
> and an expat.h in /usr/include .
> 
> Either install that package, or you can force Geant4 to build and use
> its internal EXPAT by adding -DGEANT4_USE_SYSTEM_EXPAT=OFF to your cmake
> arguments.
> 
> Hope that helps,
> 
> Ben.

Thanks very much. Using the internal EXPAT seems to be working. I went back and looked at the installation instructions here:

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch02s03.html#sect.AdvancedOptions

from which the relevant bit is here:

"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/

REQUIRES : Expat library and headers."

Now that I know that setting this to OFF tells it to use the internal EXPAT, this makes sense, but I read this many times beforehand and didn't understand that that was what this was meant to say. A line such as you posted here: "you can force Geant4 to build and use its internal EXPAT by adding -DGEANT4_USE_SYSTEM_EXPAT=OFF to your cmake arguments."

would be a great addition to this section of the site for those of us who aren't as familiar with the ins and outs of these things. Thanks again!

 Add Message Add Message
to: "Re: EXPAT library missing"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]