Message: Re: expat external linking in 9.5.2 and 9.6.3 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: expat external linking in 9.5.2 and 9.6.3 

Forum: Installation and Configuration
Re: Question expat external linking in 9.5.2 and 9.6.3 (Anthony Villano)
Date: 24 Jun, 2014
From: Ben Morgan <Ben Morgan>

On Mon, 23 Jun 2014 17:43:40 GMT, Anthony Villano wrote:
>
> My questions are:
> 
> 1) Is this normal to have different linkages of an external specified
> library in the build and install directories? To me it seems quite odd.

This behaviour is due to CMake's use of RPATH for building vs installing. There's a CMake wiki page covering this. Basically, the default is that the build directory will use full RPATHs when linking, so you should be guaranteed to get the exact libraries you link to. When installing the default is to strip RPATHs, hence your observation that the system RPATH is found.

Both behaviours can be adjusted for your use case by setting the appropriate variables described on the above page when configuring.

> 2) Is there a clean way I can get the appropriate "-L" statement to go
> with the "-lexpat" in my applications? Of course, I want to robustly
> link to the version of expat that my install uses (I was thinking of
> trying to use ldd for that, but I shouldn't have to do that IMO) without
> having to do something contrived like put a simlink in my working
> directory and using "-L." in the GNUMakefile (what I've done to now to
> confirm the installation works).

At present, no, though development for this is in progress so that this can be obtained via the geant4-config program.

 
> 3) I'm not even sure I need expat or where I need it, is there a way to
> confirm if I use it or not and if I can circumvent it? Obviously there
> is some dependency because making my application results in an error
> unless I include -lexpat.

Expat is, to my knowledge, only used in the LEND model of hadronics which is a subsystem of the G4processes library. So it's "always" used, since you'll always use G4processes. However, we are working on modularizing G4processes so this dependence may go way in future.

Cheers,

Ben.

 Add Message Add Message
to: "Re: expat external linking in 9.5.2 and 9.6.3"

 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 ]