Unidata / netcdf-fortran

Official GitHub repository for netCDF-Fortran libraries, which depend on the netCDF C library. Install the netCDF C library first.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nf-config --libdir points to wrong directory

magnusuMET opened this issue · comments

  • netcdf-fortran 4.6.0
  • Rhel8 amd64

When building netcdf-fortran with cmake the installation directory of the library will be at $LIBDIR/lib64, although the nf-config configuration assumes the installation directoy is $LIBDIR/lib (withouth the necessary 64 at the end). I believe https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#module:GNUInstallDirs can be used to set the correct directory.

Thanks!

I have the same issue but nf-config is pointing to lib rather than lib64. Not sure how I can tackle this. Let me know if you need more information from my side.

Thanks for the ping on this; I should be able to make this change pretty easily for cmake builds. The same change for autoconf-based builds is also probably pretty easy, I just need to figure out what it is. Thanks!

I know this is quite an old issue, but what version of netcdf-fortran is being used? nf-config does not appear to have a --libdir argument, which seems like an oversight. Does nf-config --flibs demonstrate the same issue?

Correct, I'm using netcdf-fortran 4.6.2-development (bleeding-edge version from the GitHub repository, commit 5f02e6a). The flag in my case is --flibs that points to /path/to/lib rather than /path/to/lib64 that I instruct explicitly using -DCMAKE_INSTALL_LIBDIR=/path/to/.local/lib64 in addition to -DCMAKE_INSTALL_PREFIX=/path/to/.local/

Thanks! I think I have a fix, I'm testing now.

This should hopefully be corrected now. We're working on getting netCDF-C v4.9.3 out ASAP, after which we'll try to get netcdf-fortran v4.6.2 out right afterwards.

I'll give it a quick test and let you know if everything works out fine on my end.