Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing proper path to cfitsio. #15

Open
rbmetcalf opened this issue Jul 15, 2019 · 7 comments
Open

Missing proper path to cfitsio. #15

rbmetcalf opened this issue Jul 15, 2019 · 7 comments

Comments

@rbmetcalf
Copy link
Member

I'm going to move this conversation from email to here so there is a record and others can see it (@ntessore ?).

@JulioFig83 said

Since Friday I have been trying to properlly install it and I have come to the same error over and over again, is until I make the /build directory and type ​cmake .. ​I get error:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindCFITSIO.cmake:33 (find_package_handle_standard_args)
cmake/Modules/FindCCfits.cmake:11 (find_package)
CMakeLists.txt:33 (find_package)

I have tried fixing it and I think it might be a problem with the Path to CFITSIO, Friday and today I installed CFITSIO properly and I can even test it and it does work, is just that error that keeps appearing on my screen.

Have you know of someone with the same problem or know how to tackle it? Maybe something with the ​/glamer/cmake/Modules FindCFITSIO.cmake ​file that I can change to find the path?

@rbmetcalf
Copy link
Member Author

Usually it is a problem with CCfits. When you installed CCfits are you sure
it went through without any errors? It might appear to install but not be properly
linked to cfitsio.

Where is your cfitsio installed?

@rbmetcalf
Copy link
Member Author

Both @michalbilek and @gdespali are having trouble linking cfitsio to glamer during the cmake configuration step so I thought it would be good to add this to the issue on this. Maybe the problems are the same and this will create a record that others might benefit from in the future.

First thing @michalbilek is whether there were any errors when you installed cfitsio? And were it is installed?

@ntessore It has always been a mystery to me how to properly set the path to cfitsio or any other library by hand within the cmake system when it is not in a stand location. This is the problem that @gdespali is having.

I have used Conda to install all the dependancies lately and when I do this everything goes fine even when it is a local installation.

@rbmetcalf
Copy link
Member Author

See pull request #16

@michalbilek
Copy link

First thing @michalbilek is whether there were any errors when you installed cfitsio? And were it is installed?

It seems that there were no errors. Here you can see the command I used and its output:
(glamer) bilek@obas-rech-mb:~/glamer/glamer/build$ conda install -c conda-forge ccfits --force-reinstall
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: /home/bilek/miniconda3/envs/glamer
added / updated specs:
- ccfits
Proceed ([y]/n)?
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

This is where my cfitsio files are:
(glamer) bilek@obas-rech-mb:~/glamer/glamer/build$ find / -iname 'cfitsio' 2>/dev/null
/home/bilek/glamer/glamer/cmake/Modules/FindCFITSIO.cmake
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2.tar.bz2
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2/lib/libcfitsio.a
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2/lib/libcfitsio.so.8
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2/lib/libcfitsio.so.8.3.47
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2/lib/libcfitsio.so
/home/bilek/miniconda3/pkgs/cfitsio-3.470-hb60a0a2_2/lib/pkgconfig/cfitsio.pc
/home/bilek/miniconda3/envs/glamer/lib/libcfitsio.a
/home/bilek/miniconda3/envs/glamer/lib/libcfitsio.so.8
/home/bilek/miniconda3/envs/glamer/lib/libcfitsio.so.8.3.47
/home/bilek/miniconda3/envs/glamer/lib/libcfitsio.so
/home/bilek/miniconda3/envs/glamer/lib/pkgconfig/cfitsio.pc
/home/bilek/miniconda3/envs/glamer/conda-meta/cfitsio-3.470-hb60a0a2_2.json
/home/bilek/.local/lib/python3.6/site-packages/lalsuite.libs/libcfitsio-347226ce.so.7.3.45

@gdespali
Copy link

Hi,

we solved the cfitsio issue also. After using the new CMakeList.txt file the error changed. Cmake worked, but not make. The solution was to explicitely add the path of the cfitsio library inside the CMakeList.txt file in SLsimLib folder

@rbmetcalf
Copy link
Member Author

Great! Just don't push that version or it will cause problems on other systems.

@rbmetcalf
Copy link
Member Author

I found that the header path for cfitsio needs to be set in SLsimLin as well as in glamer.

If you have a non standard installation of cfitsio you should be able to find it by setting the environmental variable CFITSIO_DIR to the path to your instillation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants