Skip to content

Build error on platform Linux Ubuntu 24.04.3 #1123

Description

@JFritzle

Describe the bug

Before merging CDemVRT.{cpp|h} from June 26, 2026, QMS build on platform Ubuntu 24.04.3 succeeded without errors. Since merge, QMS build no longer succeeds but build aborts.

What have you done to circle down the problem?

Issue seems to depend on GDAL version used.
Building QMS on platform Windows using GDAL version 3.12.1 succeeds.
Building QMS on platform Linux Ubuntu 24.04.3 using GDAL version 3.8.4 fails.

According to Wiki page https://github.com/Maproom/qmapshack/wiki/DocGetQMapShack however, minimum required GDAL version is 3.0.

https://gdal.org/en/stable/api/gdalrasterband_cpp.html:
Starting with GDAL 3.10, the GDALRasterBand::ReadRaster() methods may be more convenient to use for most common use cases.

https://gdal.org/en/stable/api/ogrspatialref.html:
std::string exportToWkt(const char *const *papszOptions = nullptr) const ... Since GDAL 3.9

To Reproduce

  1. Try to build QMS on platform Linux Ubuntu 24.04.3 using GDAL form Ubuntu's repo
  2. See build failing

Expected behavior

Screenshots

Attachments

Tracebacks

[  6%] Building CXX object src/qmapshack/CMakeFiles/qmapshack.dir/dem/CDemVRT.cpp.o
/home/j/QMapShack/src/test/src/qmapshack/dem/CDemVRT.cpp: In constructor ‘CDemVRT::CDemVRT(const QString&, CDemDraw*)’:
/home/j/QMapShack/src/test/src/qmapshack/dem/CDemVRT.cpp:113:74: error: no matching function for call to ‘OGRSpatialReference::exportToWkt()’
  113 |         GDALDataset::ToHandle(srcDataset), nullptr, targetSRS.exportToWkt().c_str(), GRA_Bilinear, 0.1, psOptions));
      |                                                     ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/gdal/ogr_geometry.h:38,
                 from /usr/include/gdal/ogr_feature.h:36,
                 from /usr/include/gdal/gdal_priv.h:82,
                 from /home/j/QMapShack/src/test/src/qmapshack/dem/CDemVRT.cpp:23:
/usr/include/gdal/ogr_spatialref.h:206:12: note: candidate: ‘OGRErr OGRSpatialReference::exportToWkt(char**) const’
  206 |     OGRErr exportToWkt(char **) const;
      |            ^~~~~~~~~~~
/usr/include/gdal/ogr_spatialref.h:206:12: note:   candidate expects 1 argument, 0 provided
/usr/include/gdal/ogr_spatialref.h:207:12: note: candidate: ‘OGRErr OGRSpatialReference::exportToWkt(char**, const char* const*) const’
  207 |     OGRErr exportToWkt(char **ppszWKT, const char *const *papszOptions) const;
      |            ^~~~~~~~~~~
/usr/include/gdal/ogr_spatialref.h:207:12: note:   candidate expects 2 arguments, 0 provided
/home/j/QMapShack/src/test/src/qmapshack/dem/CDemVRT.cpp: In member function ‘virtual void CDemVRT::draw(IDrawContext::buffer_t&)’:
/home/j/QMapShack/src/test/src/qmapshack/dem/CDemVRT.cpp:390:45: error: ‘class GDALRasterBand’ has no member named ‘ReadRaster’
  390 |     CPLErr err = dataset->GetRasterBand(1)->ReadRaster(
      |                                             ^~~~~~~~~~
make[2]: *** [src/qmapshack/CMakeFiles/qmapshack.dir/build.make:2358: src/qmapshack/CMakeFiles/qmapshack.dir/dem/CDemVRT.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:303: src/qmapshack/CMakeFiles/qmapshack.dir/all] Fehler 2
make: *** [Makefile:156: all] Fehler 2

Desktop

  • OS: Linux Ubuntu 24.04.3
  • QMapShack Version: dev
  • Window Manager: -

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions