You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @gsjaardema for bringing this to light. Greg submitted a fix in a PR, but it introduces a new header file which is not needed. config.h should have all the information needed to determine if V2 is built.
tst_vars2.c: In function ‘main’:
tst_vars2.c:568:14: warning: implicit declaration of function ‘nccreate’; did you mean ‘nc_create’? [-Wimplicit-function-declaration]
ncid = nccreate(FILE_NAME, NC_NETCDF4);
^~~~~~~~
nc_create
tst_vars2.c:571:18: warning: implicit declaration of function ‘ncdimdef’; did you mean ‘nc_redef’? [-Wimplicit-function-declaration]
dimid[0] = ncdimdef(ncid, LAT, LAT_LEN);
^~~~~~~~
nc_redef
tst_vars2.c:571:33: error: ‘LAT’ undeclared (first use in this function)
dimid[0] = ncdimdef(ncid, LAT, LAT_LEN);
^~~
tst_vars2.c:571:33: note: each undeclared identifier is reported only once for each function it appears in
tst_vars2.c:571:38: error: ‘LAT_LEN’ undeclared (first use in this function); did you mean ‘DIM1_LEN’?
dimid[0] = ncdimdef(ncid, LAT, LAT_LEN);
^~~~~~~
DIM1_LEN
tst_vars2.c:572:33: error: ‘LON’ undeclared (first use in this function)
dimid[1] = ncdimdef(ncid, LON, LON_LEN);
^~~
tst_vars2.c:572:38: error: ‘LON_LEN’ undeclared (first use in this function); did you mean ‘LAT_LEN’?
dimid[1] = ncdimdef(ncid, LON, LON_LEN);
^~~~~~~
LAT_LEN
tst_vars2.c:575:15: warning: implicit declaration of function ‘ncvardef’; did you mean ‘nc_redef’? [-Wimplicit-function-declaration]
varid = ncvardef(ncid, CXX_VAR_NAME, NC_FLOAT, VAR_DIMS2, dimid);
^~~~~~~~
nc_redef
tst_vars2.c:578:7: warning: implicit declaration of function ‘ncclose’; did you mean ‘nc_close’? [-Wimplicit-function-declaration]
ncclose(ncid);
^~~~~~~
nc_close
tst_vars2.c:581:14: warning: implicit declaration of function ‘ncopen’; did you mean ‘nc_open’? [-Wimplicit-function-declaration]
ncid = ncopen(FILE_NAME, 0);
^~~~~~
nc_open
tst_vars2.c:582:7: warning: implicit declaration of function ‘ncinquire’; did you mean ‘nc_inq_var’? [-Wimplicit-function-declaration]
ncinquire (ncid, &ndims, &nvars, &natts, &recdim);
^~~~~~~~~
nc_inq_var
The config.h in both cases does include this:
/* do not build the netCDF version 2 API */
#define NO_NETCDF_2 1
The macro name is awkward, but it's a historical oddity, so we tolerate it, like the Roman-style robes we make graduates wear.
Greg also very thoughtfully submitted a fix (PR #656), but it unnecessarily introduces the netcdf_meta.h file, which is not needed and should not be used in tests.
I have fixed this on my current branch by using NO_NETCDF_2 where necessary in tst_vars2.c. I have also added some disable-v2 builds to my CI system to prevent it breaking again. ;-)
I will put my branch up for merge sometime next week.
The text was updated successfully, but these errors were encountered:
Thanks @gsjaardema for bringing this to light. Greg submitted a fix in a PR, but it introduces a new header file which is not needed. config.h should have all the information needed to determine if V2 is built.
Here's the error:
The autotools build fails like this:
The config.h in both cases does include this:
The macro name is awkward, but it's a historical oddity, so we tolerate it, like the Roman-style robes we make graduates wear.
Greg also very thoughtfully submitted a fix (PR #656), but it unnecessarily introduces the netcdf_meta.h file, which is not needed and should not be used in tests.
I have fixed this on my current branch by using NO_NETCDF_2 where necessary in tst_vars2.c. I have also added some disable-v2 builds to my CI system to prevent it breaking again. ;-)
I will put my branch up for merge sometime next week.
The text was updated successfully, but these errors were encountered: