NOAA-EMC / NCEPLIBS-ip

Fortran 90 subprograms to be used for interpolating between nearly all grids used at NCEP.
Other
5 stars 9 forks source link

I'm finding issues when installing NCEPLIBS-ip after installing NCEPLIBS-sp #185

Closed isabelSTst closed 7 months ago

isabelSTst commented 1 year ago

Hello, I'm very new at this and I'm following the instructions given on https://github.com/NOAA-EMC/NCEPLIBS-ip after I successfully install NCEPLIBS-sp following https://github.com/NOAA-EMC/NCEPLIBS-sp . I get an error after writing this command: cmake -DCMAKE_INSTALL_PREFIX=~/BFPS_PYTHON/build_2 ~/BFPS_PYTHON/NCEPLIBS-ip/ (build_2 is a new directory I created because I couldn't use the build directory I created for NCEPLIBS-sp) And I'm obtaining the following error:

CMake Error at CMakeLists.txt:47 (find_package): By not providing "Findsp.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "sp", but CMake did not find one.

Could not find a package configuration file provided by "sp" (requested version 2.3.0) with any of the following names:

spConfig.cmake
sp-config.cmake

Add the installation prefix of "sp" to CMAKE_PREFIX_PATH or set "sp_DIR" to a directory containing one of the above files. If "sp" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

Can please anyone help me? I need that library. Thanks in advance.

isabelSTst commented 1 year ago

Update: I have also tried to install it on the build directory I created for the NCEPLIBS-sp but then I get this error message:

CMake Error at /home/iist/BFPS_PYTHON/build/sp-config.cmake:32 (include): include could not find requested file:

/home/iist/BFPS_PYTHON/build/sp-targets.cmake

Call Stack (most recent call first): CMakeLists.txt:47 (find_package)

CMake Error at /home/iist/BFPS_PYTHON/build/sp-config.cmake:34 (get_target_property): get_target_property() called with non-existent target "sp::sp_4". Call Stack (most recent call first): CMakeLists.txt:47 (find_package)

CMake Error at /home/iist/BFPS_PYTHON/build/sp-config.cmake:42 (get_target_property): get_target_property() called with non-existent target "sp::sp_4". Call Stack (most recent call first): CMakeLists.txt:47 (find_package)

I don't know what else to try please help me.

AlexanderRichert-NOAA commented 1 year ago

Hi Isabel- I think the key is to add the sp install directory (~/BFPS_PYTHON/build) to your CMAKE_PREFIX_PATH when building ip, that way it will know where to look for the sp config files. The following works for me:

git clone https://github.com/NOAA-EMC/NCEPLIBS-sp
mkdir NCEPLIBS-sp/build
cd NCEPLIBS-sp/build
cmake .. -DCMAKE_INSTALL_PREFIX=~/BFPS_PYTHON/build
make install

cd ../..
git clone https://github.com/NOAA-EMC/NCEPLIBS-ip
mkdir NCEPLIBS-ip/build
cd NCEPLIBS-ip/build
cmake .. -DCMAKE_INSTALL_PREFIX=~/BFPS_PYTHON/build_2 -DCMAKE_PREFIX_PATH=~/BFPS_PYTHON/build
make install
AlexanderRichert-NOAA commented 1 year ago

@isabelSTst did you manage to get this worked out?

AlexanderRichert-NOAA commented 7 months ago

This may reflect the issue resolved in https://github.com/NOAA-EMC/NCEPLIBS-ip/pull/204. In any case, closing this issue but please reopen if there the problem persists.