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

Cannot find NetCDF #188

Closed
afernandezody opened this issue Apr 2, 2021 · 2 comments
Closed

Cannot find NetCDF #188

afernandezody opened this issue Apr 2, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@afernandezody
Copy link

Hello,
The NCEPLIBS installation is not finding netCDF:

[ 28%] Performing configure step for 'w3emc'
-- Found bacio: /opt/praetorium/NCEP/bacio-2.4.1/lib/libbacio_4.a (found version "2.4.0")
-- Found w3nco: /opt/praetorium/NCEP/w3nco-2.4.1/lib/libw3nco_4.a (found version "2.4.0")
-- Found nemsio: /opt/praetorium/NCEP/nemsio-2.5.2/lib/libnemsio.a (found version "2.5.1")
-- Found sigio: /opt/praetorium/NCEP/sigio-2.3.2/lib/libsigio.a (found version "2.3.0")
CMake Error at CMakeModules/Modules/FindNetCDF.cmake:225 (message):
  Unable to properly find NetCDF.  Found static libraries at:
  /opt/praetorium/NCEPLIBS/download/nceplibs-w3emc/NetCDF_C_LIBRARY-NOTFOUND
  but could not run nc-config:
Call Stack (most recent call first):
  CMakeLists.txt:29 (find_package)


CMake Error at CMakeModules/Modules/FindNetCDF.cmake:225 (message):
  Unable to properly find NetCDF.  Found static libraries at:
  /opt/praetorium/NCEPLIBS/download/nceplibs-w3emc/NetCDF_Fortran_LIBRARY-NOTFOUND
  but could not run nc-config:
Call Stack (most recent call first):
  CMakeLists.txt:29 (find_package)


CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find NetCDF (missing: NetCDF_INCLUDE_DIRS NetCDF_LIBRARIES
  Fortran)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/Modules/FindNetCDF.cmake:291 (find_package_handle_standard_args)
  CMakeLists.txt:29 (find_package)


-- Configuring incomplete, errors occurred!

The command nc-config is up and running (netCDF 4.8.0-development). I have tried to declare the netCDF lib(rary) and include paths as either cmake variables or regular environmental variables, but maybe I'm just not using the right names. Thanks.

@afernandezody afernandezody added the bug Something isn't working label Apr 2, 2021
@edwardhartnett
Copy link
Contributor

Did you set CMAKE_PREFIX_PATH to include the netCDF install directory?

@afernandezody
Copy link
Author

It seems that that was the missing piece. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants