[gdal-dev] recent change?, issue with OGRGeometryFactory in R

Michael Sumner mdsumner at gmail.com
Sun Apr 2 03:01:03 PDT 2023


I figured it out, I'd moved to from-source builds to /usr on a machine that
had apt installs to /usr/local so the stale headers were in the way.

A good lesson for me (don't do what I'm doing it's fraught haha) and just a
note to clear the air.

Cheers, Mike



On Sat, 1 Apr 2023, 21:09 Michael Sumner, <mdsumner at gmail.com> wrote:

> ah, thanks so much - maybe I'm seeing partial build problems on one
> machine, but at any rate this gives me enough to explore and figure it out.
>
> Best, Mike
>
> On Sat, 1 Apr 2023, 21:03 Even Rouault, <even.rouault at spatialys.com>
> wrote:
>
>> Michael,
>>
>> There have indeed been recent changes in const correctness of a few
>> methods returning or accepting a OGRSpatialReference* (cf
>> https://github.com/OSGeo/gdal/pull/7381), including
>> OGRGeometryFactory::createmFromWkt().
>>
>> This requires a rebuild of code depending on the GDAL C++ API, as the
>> GDAL ABI generally changes between feature versions.
>>
>> Even
>> Le 01/04/2023 à 07:24, Michael Sumner a écrit :
>>
>> Hi,
>>
>> I'm here to ask for help finding where this issue is. If I use an earlier
>> build it still works (these are R packages sf and terra that are well
>> tested against previous releases).
>>
>> Has something changed with the headers structure for OGRGeometryFactory
>> perhaps? (I'm out of my depth for how to track this down).   If it's an
>> issue on the R side I'll fix it there, but mostly I'm here to ask what has
>> changed on the GDAL side to result in this symbol problem (or whatever it
>> is I'm doing wrong).
>>
>> using latest build  24afc75d3c3f2c85621e8b8d83f54a73b1d3ad33
>>
>> I see
>>
>> > library(sf)
>> Error: package or namespace load failed for ‘sf’ in dyn.load(file,
>> DLLpath = DLLpath, ...):
>>  unable to load shared object
>> '/usr/local/lib/R/site-library/sf/libs/sf.so':
>>   /usr/local/lib/R/site-library/sf/libs/sf.so: undefined symbol:
>> _ZN18OGRGeometryFactory13createFromWktEPKcP19OGRSpatialReferencePP11OGRGeometry
>> > library(terra)
>> Error: package or namespace load failed for ‘terra’ in dyn.load(file,
>> DLLpath = DLLpath, ...):
>>  unable to load shared object
>> '/usr/local/lib/R/site-library/terra/libs/terra.so':
>>   /usr/local/lib/R/site-library/terra/libs/terra.so: undefined symbol:
>> _ZN18OGRGeometryFactory13createFromWktEPKcP19OGRSpatialReferencePP11OGRGeometry
>>
>> Using a prior build eca6f7bf17fe500ef4c0ba9793e93ea305bab1fc it works.
>>
>> The offending code in terra is this (I think)
>>
>>
>> https://github.com/rspatial/terra/blob/ddcf84ce901a269ac13118d650efac16f89a8602/src/read_ogr.cpp#L694
>>
>> In sf it is
>>
>>
>> https://github.com/r-spatial/sf/blob/main/src/gdal_read.cpp#L582
>> Thank you.
>>
>> Cheers, Mike
>>
>>
>> --
>> Michael Sumner
>> Software and Database Engineer
>> Australian Antarctic Division
>> Hobart, Australia
>> e-mail: mdsumner at gmail.com
>>
>> _______________________________________________
>> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>> -- http://www.spatialys.com
>> My software is free, but my time generally not.
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230402/8b3f1efd/attachment-0001.htm>


More information about the gdal-dev mailing list