Bug#1095475: paraview: FTBFS with NetCDF 4.9.3

Sebastiaan Couwenberg sebastic at xs4all.nl
Sat Feb 8 15:45:27 GMT 2025


Control: tags -1 patch

The attached patch fixes the issue by using NC_FillValue instead.

Kind Regards,

Bas

-- 
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
-------------- next part --------------
diff -Nru paraview-5.13.2+dfsg/debian/patches/netcdf-4.9.3.patch paraview-5.13.2+dfsg/debian/patches/netcdf-4.9.3.patch
--- paraview-5.13.2+dfsg/debian/patches/netcdf-4.9.3.patch	1970-01-01 01:00:00.000000000 +0100
+++ paraview-5.13.2+dfsg/debian/patches/netcdf-4.9.3.patch	2025-02-08 11:58:28.000000000 +0100
@@ -0,0 +1,558 @@
+Description: Replace _FillValue by NC_FillValue for NetCDF 4.9.3.
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/Plugins/CDIReader/Reader/CDIReader.xml
++++ b/Plugins/CDIReader/Reader/CDIReader.xml
+@@ -230,7 +230,7 @@
+                          number_of_elements="1"
+                          default_values="0">
+         <Documentation>
+-	  Choose the Value to use for masking instead of missval/_FillValue.
++	  Choose the Value to use for masking instead of missval/NC_FillValue.
+         </Documentation>
+       </DoubleVectorProperty>
+ 
+--- a/Remoting/Application/Resources/readers_ionetcdf.xml
++++ b/Remoting/Application/Resources/readers_ionetcdf.xml
+@@ -310,7 +310,7 @@
+                          panel_visibility="default">
+         <BooleanDomain name="bool" />
+         <Documentation>If on, any float or double variable read that has a
+-        _FillValue attribute will have that fill value replaced with a
++        NC_FillValue attribute will have that fill value replaced with a
+         not-a-number (NaN) value. The advantage of setting these to NaN values
+         is that, if implemented properly by the system and careful math
+         operations are used, they can implicitly be ignored by calculations
+@@ -412,7 +412,7 @@
+                          panel_visibility="default">
+         <BooleanDomain name="bool" />
+         <Documentation>If on, any float or double variable read that has a
+-        _FillValue attribute will have that fill value replaced with a
++        NC_FillValue attribute will have that fill value replaced with a
+         not-a-number (NaN) value. The advantage of setting these to NaN values
+         is that, if implemented properly by the system and careful math
+         operations are used, they can implicitly be ignored by calculations
+--- a/Utilities/VisItBridge/databases/readers/NETCDF/avtNETCDFReaderBase.C
++++ b/Utilities/VisItBridge/databases/readers/NETCDF/avtNETCDFReaderBase.C
+@@ -415,7 +415,7 @@ avtNETCDFReaderBase::HandleMissingData(c
+     // note that the ordering is important ... the values array is overwritten
+     // with each successive iteration ... missing_value trumps valid_min, for example.
+     const char *fill_value[] = {"valid_range", "valid_min", "valid_max",
+-        "missing_value", "fill_value", "_FillValue", "_Fill_Value_"};
++        "missing_value", "fill_value", "NC_FillValue", "_Fill_Value_"};
+ 
+     const int operation[] = { VALID_MIN | VALID_MAX, VALID_MIN, VALID_MAX, MISSING_DATA, 
+                               MISSING_DATA, MISSING_DATA, MISSING_DATA};
+--- a/VTK/IO/NetCDF/vtkNetCDFCFWriter.cxx
++++ b/VTK/IO/NetCDF/vtkNetCDFCFWriter.cxx
+@@ -441,7 +441,7 @@ public:
+     status = NC_NOERR;
+     if (std::string(arrayName).rfind("vtk", 0) > 0)
+     {
+-      // for an array that starts with vtk we don't specify _FillValue
++      // for an array that starts with vtk we don't specify NC_FillValue
+       switch (vtkType)
+       {
+         case VTK_CHAR:
+@@ -450,34 +450,34 @@ public:
+           if (fillValue != NC_FILL_INT)
+           {
+             unsigned char fillByte = fillValue;
+-            status = nc_put_att(ncid, attributeid, "_FillValue", NC_BYTE, 1, &fillByte);
++            status = nc_put_att(ncid, attributeid, "NC_FillValue", NC_BYTE, 1, &fillByte);
+           }
+           break;
+         case VTK_SHORT:
+           if (fillValue != NC_FILL_SHORT)
+           {
+             short fillShort = fillValue;
+-            status = nc_put_att_short(ncid, attributeid, "_FillValue", NC_SHORT, 1, &fillShort);
++            status = nc_put_att_short(ncid, attributeid, "NC_FillValue", NC_SHORT, 1, &fillShort);
+           }
+           break;
+         case VTK_INT:
+           if (fillValue != NC_FILL_INT)
+           {
+-            status = nc_put_att_int(ncid, attributeid, "_FillValue", NC_INT, 1, &fillValue);
++            status = nc_put_att_int(ncid, attributeid, "NC_FillValue", NC_INT, 1, &fillValue);
+           }
+           break;
+         case VTK_FLOAT:
+           if (fillValue != NC_FILL_INT)
+           {
+             float fillFloat = fillValue;
+-            status = nc_put_att_float(ncid, attributeid, "_FillValue", NC_FLOAT, 1, &fillFloat);
++            status = nc_put_att_float(ncid, attributeid, "NC_FillValue", NC_FLOAT, 1, &fillFloat);
+           }
+           break;
+         case VTK_DOUBLE:
+           if (fillValue != NC_FILL_INT)
+           {
+             double fillDouble = fillValue;
+-            status = nc_put_att_double(ncid, attributeid, "_FillValue", NC_DOUBLE, 1, &fillDouble);
++            status = nc_put_att_double(ncid, attributeid, "NC_FillValue", NC_DOUBLE, 1, &fillDouble);
+           }
+           break;
+         default:
+@@ -488,7 +488,7 @@ public:
+       if (status)
+       {
+         std::ostringstream ostr;
+-        ostr << "Error nc_put_att_xxx " << arrayName << ":_FillValue: " << nc_strerror(status);
++        ostr << "Error nc_put_att_xxx " << arrayName << ":NC_FillValue: " << nc_strerror(status);
+         throw std::runtime_error(ostr.str());
+       }
+     }
+--- a/VTK/IO/NetCDF/vtkNetCDFReader.cxx
++++ b/VTK/IO/NetCDF/vtkNetCDFReader.cxx
+@@ -867,7 +867,7 @@ int vtkNetCDFReader::LoadVariable(int nc
+ 
+   // Check for a fill value.
+   size_t attribLength;
+-  if ((nc_inq_attlen(ncFD, varId, "_FillValue", &attribLength) == NC_NOERR) && (attribLength == 1))
++  if ((nc_inq_attlen(ncFD, varId, "NC_FillValue", &attribLength) == NC_NOERR) && (attribLength == 1))
+   {
+     if (this->ReplaceFillValueWithNan)
+     {
+@@ -875,7 +875,7 @@ int vtkNetCDFReader::LoadVariable(int nc
+       if (dataArray->GetDataType() == VTK_FLOAT)
+       {
+         float fillValue;
+-        nc_get_att_float(ncFD, varId, "_FillValue", &fillValue);
++        nc_get_att_float(ncFD, varId, "NC_FillValue", &fillValue);
+         std::replace(reinterpret_cast<float*>(dataArray->GetVoidPointer(0)),
+           reinterpret_cast<float*>(dataArray->GetVoidPointer(dataArray->GetNumberOfTuples())),
+           fillValue, static_cast<float>(vtkMath::Nan()));
+@@ -883,7 +883,7 @@ int vtkNetCDFReader::LoadVariable(int nc
+       else if (dataArray->GetDataType() == VTK_DOUBLE)
+       {
+         double fillValue;
+-        nc_get_att_double(ncFD, varId, "_FillValue", &fillValue);
++        nc_get_att_double(ncFD, varId, "NC_FillValue", &fillValue);
+         std::replace(reinterpret_cast<double*>(dataArray->GetVoidPointer(0)),
+           reinterpret_cast<double*>(dataArray->GetVoidPointer(dataArray->GetNumberOfTuples())),
+           fillValue, vtkMath::Nan());
+--- a/VTK/IO/NetCDF/vtkNetCDFReader.h
++++ b/VTK/IO/NetCDF/vtkNetCDFReader.h
+@@ -107,7 +107,7 @@ public:
+ 
+   ///@{
+   /**
+-   * If on, any float or double variable read that has a _FillValue attribute
++   * If on, any float or double variable read that has a NC_FillValue attribute
+    * will have that fill value replaced with a not-a-number (NaN) value.  The
+    * advantage of setting these to NaN values is that, if implemented properly
+    * by the system and careful math operations are used, they can implicitly be
+--- a/VTK/IO/NetCDF/vtkNetCDFUGRIDReader.cxx
++++ b/VTK/IO/NetCDF/vtkNetCDFUGRIDReader.cxx
+@@ -508,10 +508,10 @@ bool vtkNetCDFUGRIDReader::ParseHeader()
+   if (this->NodesPerFace > 3) // may be mixed mesh
+   {
+     if (!this->CheckError(
+-          nc_get_att(this->NcId, this->FaceVarId, "_FillValue", &this->FaceFillValue)))
++          nc_get_att(this->NcId, this->FaceVarId, "NC_FillValue", &this->FaceFillValue)))
+     {
+-      vtkErrorMacro("_FillValue attribute missing - The connectivity variable has to specify a "
+-                    "_FillValue attribute because it has more than 3 nodes per face");
++      vtkErrorMacro("NC_FillValue attribute missing - The connectivity variable has to specify a "
++                    "NC_FillValue attribute because it has more than 3 nodes per face");
+       return false;
+     }
+   }
+@@ -859,7 +859,7 @@ struct DataArrayExtractor
+     if (replaceFill && (std::is_same<T, float>::value || std::is_same<T, double>::value))
+     {
+       T fillValue{};
+-      if (nc_get_att(NcId, var, "_FillValue", &fillValue) != NC_NOERR)
++      if (nc_get_att(NcId, var, "NC_FillValue", &fillValue) != NC_NOERR)
+       {
+         vtkDebugWithObjectMacro(output, "No fill value defined");
+         return;
+--- a/VTK/IO/MINC/vtkMINC.h
++++ b/VTK/IO/MINC/vtkMINC.h
+@@ -178,7 +178,7 @@ use it.
+ #define MIvalid_range "valid_range"
+ #define MIvalid_max "valid_max"
+ #define MIvalid_min "valid_min"
+-#define MI_FillValue "_FillValue"
++#define MI_FillValue "NC_FillValue"
+ #define MItitle "title"
+ #define MIhistory "history"
+ 
+--- a/VTK/IO/NetCDF/vtkNetCDFUGRIDReader.h
++++ b/VTK/IO/NetCDF/vtkNetCDFUGRIDReader.h
+@@ -76,7 +76,7 @@ public:
+ 
+   ///@{
+   /**
+-   * If on, any float or double variable read that has a _FillValue attribute
++   * If on, any float or double variable read that has a NC_FillValue attribute
+    * will have that fill value replaced with a not-a-number (NaN) value.  The
+    * advantage of setting these to NaN values is that, if implemented properly
+    * by the system and careful math operations are used, they can implicitly be
+--- a/VTK/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c
++++ b/VTK/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c
+@@ -243,7 +243,7 @@ int ex_put_prop(int exoid, ex_entity_typ
+     vals[0] = 0; /* fill value */
+     /*   create attribute to cause variable to fill with zeros per routine spec
+      */
+-    if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) {
++    if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != NC_NOERR) {
+       snprintf(errmsg, MAX_ERR_LENGTH,
+                "ERROR: failed to create property name fill attribute in file id %d", exoid);
+       ex_err_fn(exoid, __func__, errmsg, status);
+--- a/VTK/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c
++++ b/VTK/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c
+@@ -172,7 +172,7 @@ int ex_put_prop_names(int exoid, ex_enti
+ 
+     /*   create attribute to cause variable to fill with zeros per routine spec
+      */
+-    if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) {
++    if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != NC_NOERR) {
+       snprintf(errmsg, MAX_ERR_LENGTH,
+                "ERROR: failed to create property name fill attribute in file id %d", exoid);
+       ex_err_fn(exoid, __func__, errmsg, status);
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/config.h.in
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/config.h.in
+@@ -80,7 +80,7 @@
+ /* If true, define nc_set_log_level. */
+ #cmakedefine ENABLE_SET_LOG_LEVEL
+ 
+-/* if true, use _FillValue for NC_ERANGE data elements */
++/* if true, use NC_FillValue for NC_ERANGE data elements */
+ #cmakedefine ERANGE_FILL
+ 
+ /* use HDF5 1.6 API */
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/include/nc4internal.h
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/include/nc4internal.h
+@@ -489,7 +489,7 @@ extern void NC_freeglobalstate(void);
+ #define NC_ATT_COORDINATES "_Netcdf4Coordinates" /*see hdf5internal.h:COORDINATES*/
+ #define NC_ATT_FORMAT "_Format"
+ #define NC_ATT_DIMID_NAME "_Netcdf4Dimid"
+-#define NC_ATT_FILLVALUE "_FillValue"
++#define NC_ATT_FILLVALUE "NC_FillValue"
+ #define NC_ATT_NC3_STRICT_NAME "_nc3_strict"
+ #define NC_XARRAY_DIMS "_ARRAY_DIMENSIONS"
+ #define NC_ATT_CODECS "_Codecs"
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/include/ncdap.h
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/include/ncdap.h
+@@ -34,7 +34,7 @@ typedef unsigned int NCFLAGS;
+ #define NCF_PREFETCH        (0x0200) /* Cache prefetch enabled/disabled */
+ #define NCF_PREFETCH_EAGER  (0x0400) /* Do eager prefetch; 0=>lazy */
+ #define NCF_PREFETCH_ALL    (0x0800) /* Prefetch all variables */
+-/* Allow _FillValue/Variable type mismatch */
++/* Allow NC_FillValue/Variable type mismatch */
+ #define NCF_FILLMISMATCH    (0x1000)
+ /* Hack to control URL encoding */
+ #define NCF_ENCODE_PATH     (0x2000) 
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/include/netcdf.h
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/include/netcdf.h
+@@ -61,7 +61,7 @@ extern "C" {
+  * room) */
+ #define NC_FIRSTUSERTYPEID 32
+ 
+-/** Default fill value. This is used unless _FillValue attribute
++/** Default fill value. This is used unless NC_FillValue attribute
+  * is set.  These values are stuffed into newly allocated space as
+  * appropriate.  The hope is that one might use these to notice that a
+  * particular datum has not been set. */
+@@ -112,7 +112,7 @@ extern "C" {
+  * the same type as the variable and this reserved name. The value you
+  * give the attribute will be used as the fill value for that
+  * variable. */
+-#define _FillValue      "_FillValue"
++#define NC_FillValue    "NC_FillValue"
+ #define NC_FILL         0       /**< Argument to nc_set_fill() to clear NC_NOFILL */
+ #define NC_NOFILL       0x100   /**< Argument to nc_set_fill() to turn off filling of data. */
+ 
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dattinq.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dattinq.c
+@@ -137,7 +137,7 @@ nc_inq_att(int ncid, int varid, const ch
+          if (nc_def_var(ncid, VAR_NAME, NC_BYTE, NUM_DIMS, dimids, &varid)) ERR;
+          for (a = 0; a < NUM_LEADERS; a++)
+             if (nc_put_att_short(ncid, varid, leader[a], NC_SHORT, 1, &hair_length[a])) ERR;
+-         if (nc_put_att_schar(ncid, varid, _FillValue, NC_BYTE, 1, &fill_value)) ERR;
++         if (nc_put_att_schar(ncid, varid, NC_FillValue, NC_BYTE, 1, &fill_value)) ERR;
+          if (nc_close(ncid)) ERR;
+ 
+          if (nc_open(FILE_NAME, NC_NOWRITE, &ncid)) ERR;
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dattput.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dattput.c
+@@ -36,9 +36,9 @@
+  * NC_CLASSIC_MODEL).
+  *
+  * @note With netCDF-4 files, nc_put_att will notice if you are
+- * writing a _FillValue attribute, and will tell the HDF5 layer to use
++ * writing a NC_FillValue attribute, and will tell the HDF5 layer to use
+  * the specified fill value for that variable.  With either classic or
+- * netCDF-4 files, a _FillValue attribute will be checked for
++ * netCDF-4 files, a NC_FillValue attribute will be checked for
+  * validity, to make sure it has only one value and that its type
+  * matches the type of the associated variable.
+  *
+@@ -63,7 +63,7 @@
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -142,7 +142,7 @@ nc_put_att_string(int ncid, int varid, c
+ @endcode
+ 
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -210,7 +210,7 @@ int nc_put_att_text(int ncid, int varid,
+ @endcode
+ 
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -244,7 +244,7 @@ nc_put_att(int ncid, int varid, const ch
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -278,7 +278,7 @@ nc_put_att_schar(int ncid, int varid, co
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -312,7 +312,7 @@ nc_put_att_uchar(int ncid, int varid, co
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -346,7 +346,7 @@ nc_put_att_short(int ncid, int varid, co
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -380,7 +380,7 @@ nc_put_att_int(int ncid, int varid, cons
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -414,7 +414,7 @@ nc_put_att_long(int ncid, int varid, con
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -448,7 +448,7 @@ nc_put_att_float(int ncid, int varid, co
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -482,7 +482,7 @@ nc_put_att_double(int ncid, int varid, c
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -516,7 +516,7 @@ nc_put_att_ubyte(int ncid, int varid, co
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -550,7 +550,7 @@ nc_put_att_ushort(int ncid, int varid, c
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -584,7 +584,7 @@ nc_put_att_uint(int ncid, int varid, con
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+@@ -619,7 +619,7 @@ nc_put_att_longlong(int ncid, int varid,
+  * @param value Pointer to one or more values.
+  *
+  * @return ::NC_NOERR No error.
+- * @return ::NC_EINVAL Invalid or global _FillValue.
++ * @return ::NC_EINVAL Invalid or global NC_FillValue.
+  * @return ::NC_ENOTVAR Couldn't find varid.
+  * @return ::NC_EBADTYPE Fill value and var must be same type.
+  * @return ::NC_ENOMEM Out of memory
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/derror.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/derror.c
+@@ -125,7 +125,7 @@ const char *nc_strerror(int ncerr1)
+       case NC_EMAXATTS:
+ 	 return "NetCDF: NC_MAX_ATTRS exceeded"; /* not enforced after 4.5.0 */
+       case NC_EBADTYPE:
+-	 return "NetCDF: Not a valid data type or _FillValue type mismatch";
++	 return "NetCDF: Not a valid data type or NC_FillValue type mismatch";
+       case NC_EBADDIM:
+ 	 return "NetCDF: Invalid dimension ID or name";
+       case NC_EUNLIMPOS:
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dvar.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libdispatch/dvar.c
+@@ -496,7 +496,7 @@ nc_def_var_deflate(int ncid, int varid,
+    to the data.
+ 
+    Quantization is not applied to values equal to the value of the
+-   _FillValue attribute, if any. If the _FillValue attribute is not
++   NC_FillValue attribute, if any. If the NC_FillValue attribute is not
+    set, then quantization is not applied to values matching the
+    default fill value.
+ 
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libhdf5/hdf5attr.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libhdf5/hdf5attr.c
+@@ -581,14 +581,14 @@ nc4_put_att(NC_GRP_INFO_T* grp, int vari
+     }
+ #endif
+ 
+-    /* If this is the _FillValue attribute, then we will also have to
++    /* If this is the NC_FillValue attribute, then we will also have to
+      * copy the value to the fill_vlue pointer of the NC_VAR_INFO_T
+-     * struct for this var. (But ignore a global _FillValue
++     * struct for this var. (But ignore a global NC_FillValue
+      * attribute).
+      * Since fill mismatch is no longer required, we need to convert the
+      * att's type to the vars's type as part of storing.
+      */
+-    if (!strcmp(att->hdr.name, _FillValue) && varid != NC_GLOBAL)
++    if (!strcmp(att->hdr.name, NC_FillValue) && varid != NC_GLOBAL)
+     {
+         /* Fill value must have exactly one value */
+         if (len != 1)
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libhdf5/hdf5var.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libhdf5/hdf5var.c
+@@ -671,18 +671,18 @@ nc_def_var_extra(int ncid, int varid, in
+         LOG((4, "Copying fill value into metadata for variable %s",
+              var->hdr.name));
+ 
+-        /* If there's a _FillValue attribute, delete it. */
+-        retval = NC4_HDF5_del_att(ncid, varid, _FillValue);
++        /* If there's a NC_FillValue attribute, delete it. */
++        retval = NC4_HDF5_del_att(ncid, varid, NC_FillValue);
+         if (retval && retval != NC_ENOTATT)
+             return retval;
+ 
+-        /* Create a _FillValue attribute; will also fill in var->fill_value */
+-        if ((retval = nc_put_att(ncid, varid, _FillValue, var->type_info->hdr.id,
++        /* Create a NC_FillValue attribute; will also fill in var->fill_value */
++        if ((retval = nc_put_att(ncid, varid, NC_FillValue, var->type_info->hdr.id,
+                                  1, fill_value)))
+             return retval;
+     } else if (var->fill_value && no_fill && (*no_fill)) { /* Turning off fill value? */
+-        /* If there's a _FillValue attribute, delete it. */
+-        retval = NC4_HDF5_del_att(ncid, varid, _FillValue);
++        /* If there's a NC_FillValue attribute, delete it. */
++        retval = NC4_HDF5_del_att(ncid, varid, NC_FillValue);
+         if (retval && retval != NC_ENOTATT) return retval;
+ 	if((retval = nc_reclaim_data_all(ncid,var->type_info->hdr.id,var->fill_value,1))) return retval;
+ 	var->fill_value = NULL;
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/attr.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/attr.c
+@@ -1446,7 +1446,7 @@ NC3_put_att(
+        for more information. */
+ 
+ #if 0
+-    if (varid != NC_GLOBAL && !strcmp(name, _FillValue)) {
++    if (varid != NC_GLOBAL && !strcmp(name, NC_FillValue)) {
+         /* Fill value must be of the same data type */
+         if (type != ncp->vars.value[varid]->type) return NC_EBADTYPE;
+ 
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/nc3internal.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/nc3internal.c
+@@ -1723,7 +1723,7 @@ NC3_inq_var_fill(const NC_var *varp, voi
+     /*
+      * find fill value
+      */
+-    attrpp = NC_findattr(&varp->attrs, _FillValue);
++    attrpp = NC_findattr(&varp->attrs, NC_FillValue);
+     if ( attrpp != NULL ) {
+         const void *xp;
+         /* User defined fill value */
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/putget.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/putget.c
+@@ -350,7 +350,7 @@ fill_NC_var(NC3_INFO* ncp, const NC_var
+ 	/*
+ 	 * Set up fill value
+ 	 */
+-	attrpp = NC_findattr(&varp->attrs, _FillValue);
++	attrpp = NC_findattr(&varp->attrs, NC_FillValue);
+ 	if( attrpp != NULL )
+ 	{
+ 		/* User defined fill value */
+--- a/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/var.c
++++ b/VTK/ThirdParty/netcdf/vtknetcdf/libsrc/var.c
+@@ -716,7 +716,7 @@ NC3_inq_var(int ncid,
+ 	if (no_fillp != NULL) *no_fillp = varp->no_fill;
+ 
+ 	if (fill_valuep != NULL) {
+-		status = nc_get_att(ncid, varid, _FillValue, fill_valuep);
++		status = nc_get_att(ncid, varid, NC_FillValue, fill_valuep);
+ 		if (status != NC_NOERR && status != NC_ENOTATT)
+ 			return status;
+ 		if (status == NC_ENOTATT) {
+@@ -849,13 +849,13 @@ NC3_def_var_fill(int ncid,
+ 	/* Are we setting a fill value? */
+ 	if (fill_value != NULL && !varp->no_fill) {
+ 
+-		/* If there's a _FillValue attribute, delete it. */
+-		status = NC3_del_att(ncid, varid, _FillValue);
++		/* If there's a NC_FillValue attribute, delete it. */
++		status = NC3_del_att(ncid, varid, NC_FillValue);
+ 		if (status != NC_NOERR && status != NC_ENOTATT)
+ 			return status;
+ 
+-		/* Create/overwrite attribute _FillValue */
+-		status = NC3_put_att(ncid, varid, _FillValue, varp->type, 1, fill_value, varp->type);
++		/* Create/overwrite attribute NC_FillValue */
++		status = NC3_put_att(ncid, varid, NC_FillValue, varp->type, 1, fill_value, varp->type);
+ 		if (status != NC_NOERR) return status;
+ 	}
+ 
diff -Nru paraview-5.13.2+dfsg/debian/patches/series paraview-5.13.2+dfsg/debian/patches/series
--- paraview-5.13.2+dfsg/debian/patches/series	2025-01-19 15:51:50.000000000 +0100
+++ paraview-5.13.2+dfsg/debian/patches/series	2025-02-08 11:58:28.000000000 +0100
@@ -13,3 +13,4 @@
 fix_ldflags.patch
 python3.13_missing_dict_MR11486.diff
 python_iostream_encoding_MR11494.diff
+netcdf-4.9.3.patch


More information about the debian-science-maintainers mailing list