Bug#1134162: vtk9: FTBFS with GDAL 3.13.0

Bas Couwenberg sebastic at debian.org
Fri Apr 17 09:12:57 BST 2026


Source: vtk9
Version: 9.5.2+dfsg4-3
Severity: important
Tags: upstream ftbfs patch
User: debian-gis at lists.debian.org
Usertags: gdal-3.13

Dear Maintainer,

Your package FTBFS with GDAL 3.13.0:

 error: invalid conversion from 'CSLConstList' {aka 'const char* const*'} to 'char**' [-fpermissive]

>From GDAL 3.13.0 NEWS:

 * GDALMajorObject: Use CSLConstList for GetMetadata, SetMetadata (API breakage)

https://github.com/OSGeo/gdal/blob/v3.13.0beta1/NEWS.md

The attached patch fixes the issue.

Kind Regards,

Bas
-------------- next part --------------
diff -Nru vtk9-9.5.2+dfsg4/debian/patches/gdal-3.13.patch vtk9-9.5.2+dfsg4/debian/patches/gdal-3.13.patch
--- vtk9-9.5.2+dfsg4/debian/patches/gdal-3.13.patch	1970-01-01 01:00:00.000000000 +0100
+++ vtk9-9.5.2+dfsg4/debian/patches/gdal-3.13.patch	2026-04-17 07:43:23.000000000 +0200
@@ -0,0 +1,35 @@
+Description: Fix FTBFS with GDAL 3.13.0.
+ error: invalid conversion from 'CSLConstList' {aka 'const char* const*'} to 'char**' [-fpermissive]
+ .
+ From GDAL 3.13.0 NEWS:
+ "
+  * GDALMajorObject: Use CSLConstList for GetMetadata, SetMetadata (API breakage)
+ "
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/IO/GDAL/vtkGDALRasterReader.cxx
++++ b/IO/GDAL/vtkGDALRasterReader.cxx
+@@ -182,7 +182,11 @@ void vtkGDALRasterReader::vtkGDALRasterR
+     this->Reader->DriverShortName = GDALGetDriverShortName(driver);
+     this->Reader->DriverLongName = GDALGetDriverLongName(driver);
+ 
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++    CSLConstList papszMetaData = GDALGetMetadata(this->GDALData, nullptr);
++#else
+     char** papszMetaData = GDALGetMetadata(this->GDALData, nullptr);
++#endif
+     if (CSLCount(papszMetaData) > 0)
+     {
+       for (int i = 0; papszMetaData[i] != nullptr; ++i)
+@@ -878,7 +882,11 @@ std::vector<std::string> vtkGDALRasterRe
+ {
+   std::vector<std::string> domainMetaData;
+ 
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++  CSLConstList papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str());
++#else
+   char** papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str());
++#endif
+ 
+   if (CSLCount(papszMetadata) > 0)
+   {
diff -Nru vtk9-9.5.2+dfsg4/debian/patches/series vtk9-9.5.2+dfsg4/debian/patches/series
--- vtk9-9.5.2+dfsg4/debian/patches/series	2026-03-16 06:12:29.000000000 +0100
+++ vtk9-9.5.2+dfsg4/debian/patches/series	2026-04-17 07:43:23.000000000 +0200
@@ -13,3 +13,4 @@
 121_add_support_for_loong64.patch
 findEXPAT_version_fix_MR12826.patch
 matplotlib_nullptr_s390x.patch
+gdal-3.13.patch


More information about the debian-science-maintainers mailing list