1

Can I install Geant4 alongside GEANT-3 on my Ubuntu 15.04 (Vivid Vervet)? I have already installed GEANT-3 by the AliRoot installation method shown by Dario Berzano. How can I install Geant4 without making any problems?

Same goes with Root by CERN. The latest pro version is 6.04, while the widely used pro version is 5.34. While I am working on Root 5, can I install and run version 6 alongside version 5?

If I can, how do I do it and why is this possible or if it is not then why so ?

2
  • I took every precaution I could ( meta.unix.stackexchange.com/q/3585/84855 ) before asking it here. Still the downveotes?! It hurts. What went wrong?
    – MycrofD
    Commented Jul 8, 2015 at 17:27
  • There's nothing glaringly wrong with this, and mystery downvotes on a question are impossible to diagnose.
    – goldilocks
    Commented Jul 8, 2015 at 17:43

1 Answer 1

1

I'm not a user of these things so I cannot answer your question precisely, but since you haven't gotten anything else, I can make a few suggestions.

The instructions you linked from the Automatic AliRoot installation page unfortunately depend on a black box installer with very few apparent options. I am guessing Mr. Berzano thought this was a nice thing to do, but as we can see in this case, it perhaps is not so great.

With a normal build/install, you have the option of picking a prefix directory. If you can find a way to do that for this, your problem is solved -- just create, e.g., /opt/geant4 and install into there. That most likely will (aka, should) result in a /opt/geant4/bin and probably a /opt/geant4/lib, among whatever else.

When you then want to use Geant4 instead of 3, use a short shell script like this:

#!/bin/sh

installDir=/opt/geant4
export PATH=${installDir}/bin/:$PATH
export LD_LIBRARY_PATH=${installPath}/lib/

You could then add whatever command you use to start the application and run it that way or you could source it into your current context, source whatever.sh (short form: . whatever.sh). If you just run it, the variables will not apply to that context.

This sets the shell's search path for executables giving the stuff in /opt/geant4 precedence, so if the application is just called geant and you have version 3 already installed normally, executing geant will now invoke /opt/geant4/bin/geant instead if it exists. LD_LIBRARY_PATH does something similar for the linker, which associates executables with whatever libraries they need (I am presuming geant includes some of those).

Note that sourcing and exporting variables will apply only to your current shell and its children (i.e., it is not universal) so you could run both versions at once.

You may want to write to Mr. Berzano and ask him about this issue. There could be a simple way to circumvent the black box installer, if it is simply a wrapper around a more normative "manual" method to which the above logic could be applied. I notice there is an email address if you click through to the "about.me" page linked at the bottom. If you refer to this Q&A, he will understand what I am talking about.

1
  • I will see how it goes and let you know.
    – MycrofD
    Commented Jul 13, 2015 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .