Bug #1091

GammaLib setup problem

Added by Knödlseder Jürgen about 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:01/21/2014
Priority:ImmediateDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:00-08-01
Duration:

Description

Mattia Fornasa <> reported the following problem:

Dear Jurgen,
I’m Mattia Fornasa, post-doc at the School of Physics and Astronomy of the University of Nottingham and I’m writing you with a question about GammaLib and the ctools.

I’ve downloaded the last version of both and installed them in my laptop (Ubuntu 12.04), no errors appeared at the moment of compilation.
However now, after having included the new environment variable in my .bashrc, I get the following error message every time I open a terminal:

/usr/local/gamma/bin/gammalib-setup: 83: [: /usr/local/gamma/syspfles/ctbin.par : unexpected operator

Attached you have my gammalib-setup file. I’m not an expert but I cannot figure out the problem.
I’m sorry to bother you, it seems to be a problem with GammaLib more than ctools, but I thought you could help me out anyway.
Thanks and have a nice day
Mattia

gammalib-setup (5.97 KB) Knödlseder Jürgen, 01/21/2014 02:58 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 10 years ago

  • % Done changed from 0 to 10

This made me recognized that the continuous integration server is not checking the configuration script. Relevant steps have been added to the gammalib and ctools build jobs (nightly build, integration build and release build)

#2 Updated by Knödlseder Jürgen about 10 years ago

I did not manage to add a script check to Jenkins as the script in fact does not produce an error, but only prints an error message that does not impact the execution of the script at the end.

The error comes from missing hyphens. They have been added to the gammalib-setup and ctools-setup scripts:

  # updates any existing PFILES if syspfiles are newer
  for filename in $HOME/pfiles/*.par
  do
    parfile=`basename $filename`
    sys_parfile=$prefix/syspfiles/$parfile
    if [ -e "$sys_parfile" ]; then
      if test "$sys_parfile" -nt "$filename" 
      then
        cp -f "$sys_parfile" "$filename" 
      fi
    fi
  done

#3 Updated by Knödlseder Jürgen about 10 years ago

  • Status changed from New to In Progress
  • Target version set to 00-08-01
  • % Done changed from 10 to 100

Scripts changed. Tests ongoing.

#4 Updated by Knödlseder Jürgen about 10 years ago

  • Status changed from In Progress to Feedback

I added a test script named testconf.sh.in to gammalib and ctools to allow testing of the configuration script once the packages have been installed. The script has been proven to reveal the reported errors in the script during continuous integration. The test revealed in addition a problem with the manpath variable that is not set on OpenSolaris. The setup scripts have been modified so that configuration on OpenSolaris is now also working (possibly nobody ever tried GammaLib/ctools on OpenSolaris).

Now put to Feedback to monitor for further problems, but assume that everything is okay now.

#5 Updated by Knödlseder Jürgen about 10 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF