When I source the new geant4.csh made by cmake from my .tcshrc, I get the error ARGS: Subscript out of range. A google search for this message revealed discussions about a similar error in ROOT, in which it was explained that the self-location code used in the script requires the script to be sourced from a shell prompt, not from within another script. As I complained on the ROOT forum, I think this defeats one of the key purposes of having this script in the first place: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=11742&p=59559 Could it please be edited so that it can once again be sourced from a login script? Thanks, Jason
We'll look at fixing this, though other use cases do require the self-location functionality.
For information, I am having exactly the same problem on a SLES11 64bit machine with tcsh shell. I have a set of custom scripts for the initialisation of Geant4 and all related libraries and ancillary software. The script geant4.csh works fine only if I source it directly from the tcsh prompt, but it fails if sourced indirectly (from my general Geant4 init tcsh scripts). The problem is a showstopper, actually, as there is no way to source geant4.csh directly from the prompt for batch jobs.
Fixed in r58945 [cmake-V09-05-18]. The scripts can now be sourced inside others, and in this case you either have to do cd script_dir ; source geant4.csh or source script_dir/geant4.csh script_dir This need to supply extra info is due to the limitations of the C-shell. If the script can locate itself using the above, it will print an error message, but will not fail or make any changes to the environment. Should be in 9.6.0beta.