Bug report #18698

qgsgml.cpp and gdal 2.4.4 incompatibility? (DEBUG build)

Added by vince - about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:3.1(master) Regression?:No
Operating System:OS X Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26586

Description

When I try to compile QGIS master (commit c625f95) with the new version of gdal, I get this compilation error:

src/core/qgsgml.cpp:883:29: error: no matching function for call to 'OGR_G_WkbSize'
        const int wkbSize = OGR_G_WkbSize( hGeom.get() );
                            ^~~~~~~~~~~~~
/opt/local/include/ogr_api.h:118:16: note: candidate function not viable: cannot convert argument of incomplete type 'std::__1::unique_ptr<void, gdal::OGRGeometryDeleter>::pointer' (aka 'void *') to 'OGRGeometryH' (aka 'OGRGeometryHS *') for 1st argument
int    CPL_DLL OGR_G_WkbSize( OGRGeometryH hGeom );
               ^
src/core/qgsgml.cpp:885:9: error: no matching function for call to 'OGR_G_ExportToIsoWkb'
        OGR_G_ExportToIsoWkb( hGeom.get(), wkbNDR, pabyBuffer );
        ^~~~~~~~~~~~~~~~~~~~
/opt/local/include/ogr_api.h:117:16: note: candidate function not viable: cannot convert argument of incomplete type 'std::__1::unique_ptr<void, gdal::OGRGeometryDeleter>::pointer' (aka 'void *') to 'OGRGeometryH' (aka 'OGRGeometryHS *') for 1st argument
OGRErr CPL_DLL OGR_G_ExportToIsoWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);

This seems to be caused by the upgrade from gdal 2.4.3 to gdal 2.4.4.


Related issues

Duplicates QGIS Application - Bug report #18696: libdxfrw doesn’t honor the "DEBUG" flag Closed 2018-04-10

History

#1 Updated by vince - about 6 years ago

  • Subject changed from qgsgml.cpp and gdal 2.4.4 incompatibility? to qgsgml.cpp and gdal 2.4.4 incompatibility? (DEBUG build)

#2 Updated by vince - about 6 years ago

This is a DEBUG build, and it fails because of that line in ogr_api.h

#ifdef DEBUG
typedef struct OGRGeometryHS *OGRGeometryH;
#else
/** Opaque type for a geometyr */
typedef void *OGRGeometryH;
#endif

#3 Updated by Jürgen Fischer about 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

#4 Updated by Jürgen Fischer about 6 years ago

Also available in: Atom PDF