Unidata / netcdf-fortran

Official GitHub repository for netCDF-Fortran libraries, which depend on the netCDF C library. Install the netCDF C library first.
Other
235 stars 95 forks source link

make install is installing temporary artifacts #338

Open ArchangeGabriel opened 2 years ago

ArchangeGabriel commented 2 years ago

When building 4.5.4 on Arch Linux, after make install I need to remove these files/directories:

  rmdir /usr/include/CMakeFiles/{netcdff{,_c}.dir,}
  rm /usr/lib/objects-RelWithDebInfo/{nf_,f}test_c/f03lib.c.o
  rmdir /usr/lib/objects-RelWithDebInfo/{{nf_,f}test_c,}
  rm /usr/lib/objects-Release/netcdff_c/nf_{lib,v2compat}.c.o
  rmdir /usr/lib/objects-Release/{netcdff_c,}

They should not be installed.

MuellerSeb commented 2 years ago

On Big-Sur I run into the problem that linking against the conda version of netcdf-fortran since I get a linker error:

ld: library not found for -lnetcdff_c

Maybe this is related.

See: https://github.com/MuellerSeb/mHM-Big-Sur-Tests/runs/5989383476?check_suite_focus=true#step:4:527

WardF commented 2 years ago

Interesting, let me take a look to see if I can duplicate this.

MuellerSeb commented 2 years ago

Maybe this is also related to the FindNetCDF.cmake from https://github.com/NOAA-EMC/CMakeModules. With the FindNetCDF.cmake of https://github.com/geospace-code/nc4fortran it is working.

MuellerSeb commented 2 years ago

It would be nice to have a standard FindNetCDF.cmake for netcdf-fortran that finds it for all provided installation methods.