Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

[NetCDFF] Update to v4.5.4 and link to NetCDF v4.8

Open giordano opened this issue 2 years ago • 1 comments

giordano avatar Jan 30 '22 23:01 giordano

Quite frankly, I'm totally lost about the failure on Windows. configure is failing to compile this program

/* confdefs.h */
#define PACKAGE_NAME "netCDF-Fortran"
#define PACKAGE_TARNAME "netcdf-fortran"
#define PACKAGE_VERSION "4.5.4"
#define PACKAGE_STRING "netCDF-Fortran 4.5.4"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "netcdf-fortran"
#define VERSION "4.5.4"
#define NF_RELAX_COORD_BOUND 1
#define ENABLE_CDF5 1
#define HAVE_F2008 1
#define HAVE_TS29113_SUPPORT 1
#define TEMP_LARGE "."
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_SYS_TIME_H 1
#define STDC_HEADERS 1
#define LT_OBJDIR ".libs/"
#define _FILE_OFFSET_BITS 64
#define NF_INT1_T byte
#define NF_INT2_T integer*2
#define NF_INT8_T integer*8
#define NCBYTE_T byte
#define NCSHORT_T integer*2
#define HAVE_LIBM 1
#define HAVE_NETCDF_H 1
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
char nc_open ();
int
main (void)
{
return nc_open ();
  ;
  return 0;
}

with the command

sandbox:${WORKSPACE}/srcdir/netcdf-fortran-4.5.4 # cc -std=gnu11 -o conftest.exe -g -O2   conftest.c -lnetcdf  -lm
/tmp/ccFGePlh.o: In function `main':
/workspace/srcdir/netcdf-fortran-4.5.4/conftest.c:44: undefined reference to `nc_open'
collect2: error: ld returned 1 exit status

but libnetcdf-19.dll has the symbol:

sandbox:${WORKSPACE}/srcdir/netcdf-fortran-4.5.4 # nm ${libdir}/libnetcdf-19.dll | grep '\<nc_open\>'
0000000066f4601b T nc_open

So why would it fail??

Edit additional datapoints:

  • netcdff 4.5.3 with netcdf 4.7 works
  • netcdff 4.5.3 with netcdf 4.8 doesn't work either, so I'm starting to suspect there is something wrong with the windows build of netcdf 4.8, but I can't quite understand what

Edit 2: #3731 looks relevant.

giordano avatar Jan 31 '22 00:01 giordano