I am trying to build HealPIX 3.60 against heasoft 6.26.1. When I configure the c++ package I get the following error from the src/cxx/configure file:
...
checking for g++ option to support OpenMP... none needed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cfitsio... yes
checking for ffgnrwll in -lcfitsio... no
configure: error: could not find the cfitsio library
Something went wrong ...
Quitting configuration script !
As far as I can tell, this function is present in libcfitsio.a, so I don't know how to correct this. Any help is appreciated.
Dan Suson
Anonymous
Did you configure the C++ package via the cantral "configure" script (i.e. the one located in the root directory of the Healpix tarball)?
Can you please upload the file src/cxx/config.log? That might help us narrowing down the problem.
Hi Dan,
can you give a bit more details on your operating system (Linux, MacOS) and your C++ compiler ?
Are you running the Healpix configure script in interactive or automatic mode (with option --auto) ?
In the latter case, make sure to use the patched hpxconfig_functions.sh available at
https://sourceforge.net/p/healpix/code/HEAD/tree/branches/branch_v360r1104/hpxconfig_functions.sh and type
FITSDIR=${HEADAS}/lib FITSINC=${HEADAS}/include ./configure --auto=cxxin the Healpix top directory (assuming your using the
sh,dashorbashshell.Eric
Hi Dan,
did you compile HEASOFT yourself or are you using a pre-compiled version ?
There seems to be 2 problems:
1) in my tests, linking Healpix (C++ or F90) with precompiled cfitsio from Heasoft seems impossible, with the kind of error messages you are seeing
2) on top of that, as described in https://healpy.readthedocs.io/en/1.5.0/install.html even if you compile HEASOFT yourself and survive to step 1 above:
And this time the error message is far from explicit.
It is therefore better to do your own clean compilation and installation of cfitsio from https://heasarc.gsfc.nasa.gov/fitsio/.
While compiling cfitsio, you can spare yourself some future problems by disabling the linking to the
curllibrary, ieadd
--disable-curlto the the cfitsioconfigurestep.Thank you, everyone, for your comments. I'll answer them as best I can.
I'm running Slackware64-current with the Linux 5.4.7 kernel. Currently I'm working with the configure script in interactive mode. Once I know that it will work I will use the automatic mode and pass the values to be modified to the script. The goal is to build a SlackBuilds script that will create an installation package.
As far as HEASOFT goes, I downloaded the latest source code and built it on my system first. I have worked around the rotmatrix issue by creating a patch that renames the HealPIX rotmatrix class hrotmatrix and modifies all of the files that call rotmatrix so they use hrotmatrix instead.
I can rebuild HEASOFT if need be. Why do I need to disable the curl library?
I did not find the file src/cxx/config.log.
Thank you for the help so far.
Hi Dan,
no need to rebuild Heasoft, since you built it yourself the first time.
The offending header files actually are actually
rotmatrix.handpointing.h.Instead of modifying the Healpix sources files, you have 2 possibilities (in both cases, make sure to use the patched hpxconfig_functions.sh (sourceforge.net) )
${HEADAS}, and then install Healpix providing the location of this newly installed cfitsio inFITSDIRandFITSINC.instead of setting
FITSDIR=${HEADAS}/libandFITSINC=${HEADAS}/includein Healpix, setFITSDIR=${HEADAS}/../heacore/PLATFORM/libandFITSINC=${HEADAS}/../heacore/PLATFORM/includewhen running the Healpix configure script,
where PLATFORM is something like
x86_64-pc-linux-gnu-libc2.29depending on your system.DO NOT SKIP THE heacore IN THE PATH !
These new locations are free of the offending
rotmatrix.handpointing.h.The forthcoming releases of Healpix will be more explicit on which header files are needed for C++ and should be free of such conflicts.
As for
libcurl, it is used incfisioto allow the FITS files handling overhttps.It is certainly nice to have, but it creates many problems during the installation of Healpix on systems where libcurl is provided in
anaconda2see bug #96.If the command
curl-config --prefixworks and returns something like/usr, then you should be OK and you can make a standard (=with libcurl enabled) installation ofcfitsio.Cheers,
Eric
I thought (hoped) that I could mark this as closed, but a related problem came up, Before I get to that, thank you, Eric, for how to deal with the previous problems. Your solutions worked perfectly and everything built without a problem. That created my current problem. I am running the configure script via the auto mode. I want it to do a global installation. The command line in the build script is
FITSDIR=${HEADAS}/../heacore/${ARCH}-pc-linux-gnu-libc2.30/lib \
FITSINC=${HEADAS}/../heacore/${ARCH}-pc-linux-gnu-libc2.30/include \
F_SHARED=true \
C_SHARED=true \
PYTHON=/usr/bin/python3 \
ps_com=/usr/bin/okular \
pdf_com=/usr/bin/okular \
gif_com=/usr/bin/gwenview \
./configure -L --auto=all
Unfortunately, the -L command does not build the confdir directory in the Healpix tree. Indeed, I can't find it anywhere. When I run configure by hand it is created. Am I doing something wrong with the configure command or is this a bug?
Thank you,
Dan
Hi Dan,
indeed, there was a bug in
configure: when--autowas set,-Lwas ignored.It should now work properly (putting the profile files into confdir) with
the newly patched
configureavailable at https://sourceforge.net/p/healpix/code/HEAD/tree/branches/branch_v360r1104/configure(and the
hpxconfig_functions.shfrom https://sourceforge.net/p/healpix/code/HEAD/tree/branches/branch_v360r1104/hpxconfig_functions.sh, patched on Feb 24).Cheers,
Eric
Dear Eric,
That seems to have fixed everything. This can be marked as closed.
Sincerely,
Dan