build failure for Decl'NetCDF sequential version on Fedora 32
See https://github.com/pdidev/pkgs/runs/1728872510?check_suite_focus=true
$ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ../plugins/decl_netcdf
[...]
-- Looking for NetCDF using cmake config file
-- Looking for NetCDF using nc-config
-- Looking for NetCDF using nc-config -- found
-- Found NetCDF: /usr/lib64/libnetcdf.so (found version "4.7.0")
[...]
The actual error:
/tmp/BUILD/pdi-master/plugins/decl_netcdf/dnc_netcdf_file.cxx:394:45: error: 'NC_COLLECTIVE' was not declared in this scope; did you mean 'LC_COLLATE'?
394 | nc_try(nc_var_par_access(dest_id, var_id, NC_COLLECTIVE),
| ^~~~~~~~~~~~~
| LC_COLLATE
/tmp/BUILD/pdi-master/plugins/decl_netcdf/dnc_netcdf_file.cxx:394:10: error: 'nc_var_par_access' was not declared in this scope
394 | nc_try(nc_var_par_access(dest_id, var_id, NC_COLLECTIVE),
| ^~~~~~~~~~~~~~~~~
/tmp/BUILD/pdi-master/plugins/decl_netcdf/dnc_netcdf_file.cxx: In member function 'void decl_netcdf::Dnc_netcdf_file::get_attribute(decl_netcdf::Dnc_netcdf_file::nc_id, decl_netcdf::Dnc_netcdf_file::nc_id, const decl_netcdf::Dnc_attribute&)':
/tmp/BUILD/pdi-master/plugins/decl_netcdf/dnc_netcdf_file.cxx:416:36: warning: unused variable 'scalar_type' [-Wunused-variable]
416 | if (const PDI::Scalar_datatype* scalar_type = dynamic_cast<const PDI::Scalar_datatype*>(&array_type->subtype())) {
| ^~~~~~~~~~~
/tmp/BUILD/pdi-master/plugins/decl_netcdf/dnc_netcdf_file.cxx:410:35: warning: unused variable 'scalar_type' [-Wunused-variable]
410 | if (const PDI::Scalar_datatype* scalar_type = dynamic_cast<const PDI::Scalar_datatype*>(&ref_w.type())) {
| ^~~~~~~~~~~