Action #2175

Detect in ./configure whether cfitsio cannot be found

Added by Knödlseder Jürgen over 6 years ago.

Status:NewStart date:08/04/2017
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

In case that the cfitsio library cannot be found the following error occurs during the configuration step:

 checking for swig... /usr/bin/swig
 checking for ./pyext/ctools/tools_wrap.cpp... yes
 checking for ./pyext/ctools/tools.py... yes
 no
 configure: GammaLib found in /dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib and /dsm/manip/cta/CTOOLS/gammalib-1.4.0/include/gammalib.
 checking whether GammaLib has been compiled with OpenMP... yes
 checking for g++ option to support OpenMP... unsupported

The ./configure script signals that OpenMP does not exist, but this is in fact due to a failure to find the cfitsio library. Here is what happens in config.log:
configure:17317: checking whether GammaLib has been compiled with OpenMP
configure:17330: g++ -o conftest -g -O2  -I/dsm/manip/cta/CTOOLS/gammalib-1.4.0/include/gammalib  -L/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib conftest.cpp  -lgamma >&5
/usr/bin/ld: warning: libcfitsio.so.2, needed by /dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so, not found (try using -rpath or -rpath-link)
/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so: undefined reference to `ffgdes'
/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so: undefined reference to `ffukyd'
/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so: undefined reference to `ffgtcl'
...
|   return 0;
| }
configure:17334: result: yes
configure:17349: checking for g++ option to support OpenMP
configure:17364: g++ -o conftest -g -O2  -I/dsm/manip/cta/CTOOLS/gammalib-1.4.0/include/gammalib  -L/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib conftest.cpp  -lgamma >&5
conftest.cpp:30:2: error: 'choke' does not name a type
  choke me
  ^
In file included from conftest.cpp:32:0:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/omp.h:38:3: error: 'omp_lock_t' does not name a type
 } omp_lock_t;
   ^
...
configure:17382: g++ -o conftest -g -O2 -fopenmp  -I/dsm/manip/cta/CTOOLS/gammalib-1.4.0/include/gammalib  -L/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib conftest.cpp  -lgamma >&5
/usr/bin/ld: warning: libcfitsio.so.2, needed by /dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so, not found (try using -rpath or -rpath-link)
/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so: undefined reference to `ffgdes'
/dsm/manip/cta/CTOOLS/gammalib-1.4.0/lib/libgamma.so: undefined reference to `ffukyd'
...
configure:17396: result: unsupported
configure:17558: result: no
configure:17577: error: The GammaLib library has been built with openMP support but OpenMP is not available on this system. Please install OpenMP or re-build GammaLib without OpenMP support.

Adding the cfitsio library to LD_LIBRARY_PATH solved the problem.


Recurrence

No recurrence.

Also available in: Atom PDF