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

Split C/Fortran netCDF installations may fail with multiple include directories #683

Open
rcabell opened this issue Feb 15, 2023 · 0 comments

Comments

@rcabell
Copy link
Collaborator

rcabell commented Feb 15, 2023

Expected Behavior

Using nc-config in ./configure should include both C and Fortran netCDF include directories.

Current Behavior

Only nc-config --includedir is used, which only finds the netCDF-C include directory. In a combined-include installation, this works fine, but if the netCDF library installation tree is rooted elsewhere (as it is in some module systems, and in Homebrew on Macs), this will fail and required manually defining $NETCDF_INC.

Possible Solution

Use nc-config --fflags to get Fortran-specific include directories and append them to the macros file.

Steps to Reproduce (for bugs)

  1. Build on a system with split C/Fortran netCDF library trees
  2. Try to build without manually defining $NETCDF_INC and $NETCDF_LIB
  3. ????
  4. Sad panda

Notes:

I'm not sure if/how this is handled in CMake, but it's worth looking into. Unfortunately, the CI system still uses the legacy build system.

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

No branches or pull requests

1 participant