netcdf-fortran icon indicating copy to clipboard operation
netcdf-fortran copied to clipboard

nf-config --libdir points to wrong directory

Open magnusuMET opened this issue 3 years ago • 1 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.

magnusuMET avatar Sep 15 '22 09:09 magnusuMET

Thanks!

WardF avatar Sep 15 '22 21:09 WardF

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.

kasra-keshavarz avatar Nov 28 '23 17:11 kasra-keshavarz

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!

WardF avatar Nov 28 '23 17:11 WardF

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?

WardF avatar Nov 28 '23 17:11 WardF

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/

kasra-keshavarz avatar Nov 28 '23 17:11 kasra-keshavarz

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

WardF avatar Nov 28 '23 17:11 WardF

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.

WardF avatar Nov 30 '23 21:11 WardF

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

kasra-keshavarz avatar Nov 30 '23 21:11 kasra-keshavarz