Bug #1993

on making ctools, ‘extname_energies’ is not a member of ‘gammalib’ error

Added by Kelley-Hoskins Nathan about 7 years ago. Updated about 7 years ago.

Status:RejectedStart date:04/06/2017
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

I fetched, rebased and merged my nkelhos/gammalib fork and re-cloned the general ctools/ctools, but when I go to make the ctools, I get this error. I’m not sure why extname_ebounds isn’t in the gammalib namespace, or if its a gammalib or ctools error.

$ cd $CTOOLS
$ ./autogen.sh
$ make clean
$ ./configure --prefix=$PWD LDFLAGS=-L$FITSSYS/lib CPPFLAGS=-I$FITSSYS
$ make clean
$ make -j 4
...
make[3]: Entering directory `/nv/pc1/nkelleyh3/software/ctools/src/support'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..   -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib  -g -O2 -fopenmp -MT support.lo -MD -MP -MF .deps/support.Tpo -c -o support.lo support.cpp
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..   -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib  -g -O2 -fopenmp -MT ctool.lo -MD -MP -MF .deps/ctool.Tpo -c -o ctool.lo ctool.cpp
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..   -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib  -g -O2 -fopenmp -MT ctobservation.lo -MD -MP -MF .deps/ctobservation.Tpo -c -o ctobservation.lo ctobservation.cpp
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..   -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib  -g -O2 -fopenmp -MT ctlikelihood.lo -MD -MP -MF .deps/ctlikelihood.Tpo -c -o ctlikelihood.lo ctlikelihood.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib -g -O2 -fopenmp -MT ctobservation.lo -MD -MP -MF .deps/ctobservation.Tpo -c ctobservation.cpp  -fPIC -DPIC -o .libs/ctobservation.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib -g -O2 -fopenmp -MT ctool.lo -MD -MP -MF .deps/ctool.Tpo -c ctool.cpp  -fPIC -DPIC -o .libs/ctool.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib -g -O2 -fopenmp -MT ctlikelihood.lo -MD -MP -MF .deps/ctlikelihood.Tpo -c ctlikelihood.cpp  -fPIC -DPIC -o .libs/ctlikelihood.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib/include/gammalib -g -O2 -fopenmp -MT support.lo -MD -MP -MF .deps/support.Tpo -c support.cpp  -fPIC -DPIC -o .libs/support.o
ctool.cpp: In member function ‘GEbounds ctool::create_ebounds()’:
ctool.cpp:545:31: error: ‘extname_ebounds’ is not a member of ‘gammalib’
             if (file.contains(gammalib::extname_ebounds)) {
                               ^
ctool.cpp:554:36: error: ‘extname_energies’ is not a member of ‘gammalib’
             else if (file.contains(gammalib::extname_energies)) {
                                    ^
ctool.cpp:556:25: error: ‘class GEbounds’ has no member named ‘set’
                 ebounds.set(GEnergies(ebinfile));
                         ^
ctool.cpp:561:35: error: ‘extname_ebounds’ is not a member of ‘gammalib’
                                   gammalib::extname_ebounds+"\", " 
                                   ^
ctool.cpp:563:35: error: ‘extname_energies’ is not a member of ‘gammalib’
                                   gammalib::extname_energies+"\" found in FITS " 
                                   ^
ctool.cpp:594:25: error: ‘class GEbounds’ has no member named ‘set’
                 ebounds.set(GEnergies(ebinfile));
                         ^
make[3]: *** [ctool.lo] Error 1

Recurrence

No recurrence.

History

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

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 10

It seems that GammaLib has not been updated, the things that are missing are things I added very recently. Try to update GammaLib first.

#2 Updated by Kelley-Hoskins Nathan about 7 years ago

I updated it from my fork, and I have different problems when I switch over to devel instead of 1520-dm-profiles (I dont know why I didn’t mention it earlier). I think I’ve just been messing up the merges and rebases or something, since git seems to think everything’s intact:

$ git remote -v
origin    https://cta-gitlab.irap.omp.eu/nkelhos/gammalib.git (fetch)
origin    https://cta-gitlab.irap.omp.eu/nkelhos/gammalib.git (push)

$ git fetch origin

$ git status
On branch devel
Your branch is up-to-date with 'origin/devel'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    bin/
    include/gammalib/
    lib/
    share/

nothing added to commit but untracked files present (use "git add" to track)

$ git branch -a
  1520-dm-profiles
* devel
  remotes/origin/1111-implement-GSkyRegionRing
  remotes/origin/1113-implement-altaz-pointing
  remotes/origin/1121-implement-GSkyRegionMap
  remotes/origin/1327-VERITAS-Support
  remotes/origin/1432-fix_psf_king_zero_params
  remotes/origin/1508-support-config-file-analysis
  remotes/origin/1520-dm-profiles
  remotes/origin/1876-correct-containment-radius
  remotes/origin/HEAD -> origin/devel
  remotes/origin/devel
  remotes/origin/integration
  remotes/origin/master
  remotes/origin/release
  remotes/origin/spi

I’m thinking its not a good practice for me to keep a branch out for this long (months). I’m not sure what to do. Can we merge nkelhos/gammalib/1520-dm-profiles into gammalib/gammalib/1520-dm-profiles, then I can delete my fork nkelhos/gammalib and refork gammalib/gammalib again?

#3 Updated by Kelley-Hoskins Nathan about 7 years ago

For the moment, I’ve switched to just using gammalib/gammalib, which works without problems, so I think something went wrong with my rebasing/merging of nkelhos/gammalib. I’m not even sure there were any changes in nkelhos/gammalib/1520-dm-profiles, so I may just throw it away and start with a fresh fork of gammalib/gammalib.

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

  • Status changed from In Progress to Feedback
  • Assigned To deleted (Knödlseder Jürgen)

I switch the status to Feedback. Please let me know if you have still problems.

#5 Updated by Kelley-Hoskins Nathan about 7 years ago

Alright, something’s still not working right. I do:

$ git clone https://cta-gitlab.irap.omp.eu/ctools/ctools.git .
$ ./autogen.sh
$ make distclean
$ ./configure --prefix=$PWD LDFLAGS=-L$FITSSYS/lib/  CPPFLAGS=-I$FITSSYS
$ make -j 4
...
ctool.cpp: In member function ‘GEbounds ctool::create_ebounds()’:
ctool.cpp:545:31: error: ‘extname_ebounds’ is not a member of ‘gammalib’
             if (file.contains(gammalib::extname_ebounds)) {
                               ^
ctool.cpp:554:36: error: ‘extname_energies’ is not a member of ‘gammalib’
             else if (file.contains(gammalib::extname_energies)) {
                                    ^
ctool.cpp:556:25: error: ‘class GEbounds’ has no member named ‘set’
                 ebounds.set(GEnergies(ebinfile));
                         ^
ctool.cpp:561:35: error: ‘extname_ebounds’ is not a member of ‘gammalib’
                                   gammalib::extname_ebounds+"\", " 
                                   ^
ctool.cpp:563:35: error: ‘extname_energies’ is not a member of ‘gammalib’
                                   gammalib::extname_energies+"\" found in FITS " 
                                   ^
ctool.cpp:594:25: error: ‘class GEbounds’ has no member named ‘set’
                 ebounds.set(GEnergies(ebinfile));
                         ^
make[3]: *** [ctool.lo] Error 1

But I still run into the same problems. The gammalib I’m using is gammalib/nkelhos/1520-dm-profiles.

#6 Updated by Knödlseder Jürgen about 7 years ago

The problem is that your GammaLib needs an update. The things that are missing are things that are new in GammaLib, here specifically

gammalib::extname_ebounds

#7 Updated by Kelley-Hoskins Nathan about 7 years ago

Did those changes get merged to gammalib/gammalib/1520-dm-profiles? I just made a clean fork (deleted my old fork) of 1520-dm-profiles today, and I still have the same missing ebounds error.

#8 Updated by Knödlseder Jürgen about 7 years ago

No, I have not touched this branch since a long time. You have to rebase the branch on devel.

#9 Updated by Kelley-Hoskins Nathan about 7 years ago

Ah, alright. its sometimes hard to keep track of what code is where. I’ve rebased gammalib, but ctools is now erroring out about a missing GCTAEventList::has_phase() function.

Making all in ctphase
make[3]: Entering directory `/nv/pc1/nkelleyh3/software/ctools/src/ctphase'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/support  -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib-nkelhos/include/gammalib  -g -O2 -fopenmp -MT ctphase.lo -MD -MP -MF .deps/ctphase.Tpo -c -o ctphase.lo ctphase.cpp
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/support -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib-nkelhos/include/gammalib -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib-nkelhos/include/gammalib  -g -O2 -fopenmp -MT ctphase-main.o -MD -MP -MF .deps/ctphase-main.Tpo -c -o ctphase-main.o `test -f 'main.cpp' || echo './'`main.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/support -I/nv/hp11/nkelleyh3/data/software/cfitsio -I/nv/hp11/nkelleyh3/data/software/gammalib-nkelhos/include/gammalib -g -O2 -fopenmp -MT ctphase.lo -MD -MP -MF .deps/ctphase.Tpo -c ctphase.cpp  -fPIC -DPIC -o .libs/ctphase.o
ctphase.cpp: In member function ‘void ctphase::phase_events(GCTAObservation*)’:
ctphase.cpp:561:13: error: ‘class GCTAEventList’ has no member named ‘has_phase’
     events->has_phase(true);
             ^
make[3]: *** [ctphase.lo] Error 1

Any ideas what pack of code has this has_phase() function?

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

I merged in the has_phase() method yesterday, so I guess you need again to rebase gammalib on devel.

#11 Updated by Kelley-Hoskins Nathan about 7 years ago

  • Status changed from Feedback to Resolved

Alright, I think I’ve gotten everything updated now. The ebounds and has_phase errors are both gone (whew).

#12 Updated by Knödlseder Jürgen about 7 years ago

  • Status changed from Resolved to Rejected
  • % Done changed from 10 to 0

Great !

Also available in: Atom PDF