Message: Re: geant4-config program Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: geant4-config program 

Forum: Installation and Configuration
Re: None geant4-config program (Guy Barrand)
Date: 12 Oct, 2009
From: Ben Morgan <Ben Morgan>

Hi Guy
On Mon, 12 Oct 2009 10:39:30 GMT, Guy Barrand wrote:
>    Hi
>  It could be fine to arrange to have a "geant4-config" program available (in the bin directory) after a G4 build and installation had been done.
>  This is needed for people that want to build a G4 app but by not using the G4 make system.

This is a "work in progress" at the moment! I hope to have a beta version, if not a fully working version, by the end of the year. This partly ties in with work on a new build system for Geant4, though 'geant4-config' will appear before this.

>  One painful point with G4 is that G4 can be installed with or without "global / granular" libs 
> (which is unique ! I don't know another software having two "lib flavors")
> and with the includes "gathered in one include directory" or not. And this various cases definitely complicate the life of people in their build system to detect the various G4 installation cases.

You've identified the major issue with writing this script cleanly :-)! It can be made to work I think, with some care.

>  I would suggest then that G4 comes with a "geant4-config" programs that provides the "right infos"
> at least for :
>    geant4-config --cflags (or --incs)
>    geant4-config --libs
>  And then up to the geant-config program to look how G4 had been installed and then to return
> the correct infos. For exa for "--libs" to return the "granular flavor" is the global libs are not here.
> The "global flavor" if the granulars are not here. And probably the globals if both are here (because
> the list of the globals is shorter).
>  And about the "--incs" then returns the "-I /include" if existing, the "whole -I list"
> in case a "gathering had not been done" and the G4 sources "are still around after installation", and "none" in case... nothing is found !

This is pretty much the algorithm I'm working to, though there are also "--granular-libs" and "--global-libs" options if both are available and the user specifically wants one or the other. There is also a "--has-" argument to identify if the installation has optional components like vis drivers etc, e.g. "--has-openglx".

>  (Not so clear if the --incs, --libs should return the CLHEP infos. Probably not since CLHEP already
> comes with a clhep-config).
>  (There is the entry 1218 of O.Lahaye that looks similar to this post, but not clear to me if the "pkg-config" mentioned here is the same than "having a geant-config". Then I prefer to have an explicit
> entry for this issue). 

These are partly related - if you're building a Geant4 application you shouldn't need to know that CLHEP is required, or for that matter, any of the other potential dependencies. The pkg-config tool has the functionality to take care of this, though not of Geant4's dependencies provide a pkg-config file (AFAIK).

I'm gradually learning about how to deal with the external dependencies, and it doesn't seem to be a trivial problem across all supported platforms. It will be solvable I'm sure, just needs some time and care!



Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: geant4-config program   (Guy Barrand - 12 Oct, 2009)
(_ None: Re: geant4-config program   (Ben Morgan - 12 Oct, 2009)
 Add Message Add Message
to: "Re: geant4-config program"

 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 ]