Geant4 upgrade

Mojca Miklavec mojca at
Mon Sep 30 08:19:54 PDT 2013


I just wanted to say that I upgraded Geant4. The new subports are now
called geant4.9.5 and geant4.9.6 and may be installed side-by-side.
(If anyone wants to test version 10.0 you only need to uncomment/move
a single line.)

The build is now CMake-based and the easiest way to compile you code
is to also provide CMake configuration which should automatically find
Geant4 from MacPorts (it will always take the latest version unless
you specify manually which one you want). The only other thing that is
still needed are the data files when running the simulations. There
are currently two files in /opt/local/libexec/Geant4/Geant4.x.y to
serve the purpose:
- (.csh), auto-generated (but in version 9.5 forgets to set
the data variables)
- (.csh), generated by the port and only sets the data variables

The file sets some other unnecessary variables, so I'm
thinking of eventually replacing that file with what is currently in

You can use
    sudo port select geant4 geant4.9.6
to select which "" and "geant4-config" will be in PATH (for
9.5 or 9.6) and then you can run
to setup the necessary variables.

When using the CMake-based build there is no need to set a zillion of
environmental variables any more, but the variables for data files are
still needed nonetheless.

It is not very likely that many people used the port, but if anyone
did, you might want some extra care when upgrading and please report
any problems that you experience.


More information about the macports-users mailing list