Message: Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions 

Forum: Installation and Configuration
Re: Question CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions (Mojca Miklavec)
Re: Warning Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions (Ben Morgan)
Re: None Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions (Mojca Miklavec)
Re: None Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions (Ben Morgan)
Date: 04 Jul, 2013
From: Mojca Miklavec <Mojca Miklavec>

On Thu, 04 Jul 2013 14:03:51 GMT, Ben Morgan wrote:
>
> To play devil's advocate for a minute on at least the first point - We
> encourage and recommend the use of the latest release, which fits with
> the MacPorts update philosophy. The libraries provide the requisite
> functionality to check the version at compile time and hence adapt the
> code to account for changes in API etc. Other issues preventing upgrades
> such as bugs need to be reported to us ASAP so we can create suitable
> patches.

I already have a serious problem getting Gate to work (currently it's happily crashing), and Gate is usually released once per year, the last cycle was even 18 months. With that pace in mind, the next version would be out in March 2014 and until then only version 9.5.p01 would be supported. By that time Geant 10.0 will be the maintstream and 10.1 beta could be released already. The developer community is much smaller than that of Geant4 and I cannot ask the Geant4 team to fix incompatibilities between versions in Gate code ;) Neither can I afford to find patches for all the incompatibilities between different versions, deprecated functions in Geant4 etc.

Gate has recently been published with a public git repository, so this should simplify things, but the problem with incompatibilities will most probably remain.

> > But activating/deactivating still takes a lot of time (particularly if
> > talking about deactivating G4NDL) and starts to get annoying.
> 
> There shouldn't be a need to activate/deactivate datasets if these are
> separate ports.

True. But it's nevertheless inconvenient to keep switching.

> It shouldn't make it more difficult, other than to require the need to
> specify the Geant4_DIR variable. MacPorts CMake would I think
> automatically find the current Geant4 port install if you installed that
> with CMAKE_INSTALL_PREFIX set to the MacPorts root directory.

CMAKE_INSTALL_PREFIX was properly set. The problem is that I changed CMAKE_INSTALL_LIBDIR which puts both dylib and cmake somewhere else (I would only wanted to put dylib files somewhere else and leave cmake files where they are supposed to be by default, but it seems that I will need a patch to achieve that).

Also, I would probably need to specify which version of Geant4 should be used anyway.

> > > That's
> > > especially true since later on you talk about making symlinks - in
> > > essence you'll have to provide a whole "python_select" type layer to
> > > choose the correct version.
> > 
> > Honestly (or should I say luckily?) I'm not yet aware of all the details
> > that need to be fixed in order to be able to run a specific version of
> > Geant4. In the current implementation I created three ports (9.5.p02,
> > 9.6.p02, 10.0.b01), installed them in parallel without clashes, created
> > a port for Gate 6.2 depending on Geant4 9.5, installed it, and it
> > kind-of-works (many examples work, some crash). For that I didn't even
> > have to install any symlink at all. All I had to do was to provide
> > 
> >     -DGeant4_DIR=${prefix}/lib/Geant4/Geant4.9.5/Geant4-9.5.2
> > 
> > and I believe that this should be
> > 
> >     -DGeant4_DIR=${prefix}/lib/Geant4-9.5.2
> 
> As I said, we can review the configurability of the installation paths,
> but this will always be done within the framework of standards
> compliance (i.e. no special cases - those you have to patch yourself).
> The only thing I can recommend at present is to do a (what I would call)
> "multiple qt on linux" style install. Here, you'd set
> CMAKE_INSTALL_PREFIX to ${prefix}/lib/Geant4-version . That gives you a
> common prefix, and isolates everything under one roof, which seems best
> for multiple versions.

Hmmm. That's also an interesting idea. I see now that Python installs everything under

    ${prefix}Library/Frameworks/Python.framework/Versions/2.7/

I'll try to figure out which option seems better.

> O.k., my mistake, I was referring to geant4-config . The shell scripts
> for sourcing are awkward to handle for ensuring relocatability, but I'll
> see if the symlink resolution can be ported across.

I just checked and geant4-config seems to work fine when symlinked.

    > ./geant4-config --prefix
    /opt/local/libexec/Geant4/Geant4.9.6/../../..
    > ./geant4-config --libs
    -L/opt/local/libexec/Geant4/Geant4.9.6/../../../lib/Geant4/Geant4.9.6

I guess that path with "../../../" is intentionally left like that?

> Sourcing the geant4.(c)sh - ignoring data files for the moment -
> shouldn't be needed on Mac and especially Macports, because of the
> setting of the path and library install names.

I think I sourced the files exactly because locations to data files were undefined.

Mojca

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

1 Question: Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions   (Mojca Miklavec - 25 Jul, 2013)
 Add Message Add Message
to: "Re: CMAKE_INSTALL_LIBDIR & proper way for side-by-side installation of multiple Geant4 versions"

 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 ]