Fiona: Fails to build with GDAL 2.5.0-beta1 (ogrext.so: undefined symbol: OSRFixup)

Created on 21 Apr 2019  Â·  8Comments  Â·  Source: Toblerity/Fiona

Expected behavior and actual behavior.

The fiona Debian package fails to build with GDAL 2.5.0-beta1:

...
fiona/_crs.c: In function ‘__pyx_pf_5fiona_4_crs_crs_to_wkt’:
fiona/_crs.c:2183:10: warning: implicit declaration of function ‘OSRFixup’; did you mean ‘OSRCleanup’? [-Wimplicit-function-declaration]
   (void)(OSRFixup(__pyx_v_cogr_srs));
          ^~~~~~~~
          OSRCleanup
...
fiona/ogrext.c: In function ‘__pyx_pf_5fiona_6ogrext_14WritingSession_start’:
fiona/ogrext.c:17239:18: warning: implicit declaration of function ‘OSRFixup’; did you mean ‘OSRCleanup’? [-Wimplicit-function-declaration]
           (void)(OSRFixup(__pyx_v_cogr_srs));
                  ^~~~~~~~
                  OSRCleanup
...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/config.py", line 368, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/lib/python2.7/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "/usr/lib/python2.7/dist-packages/six.py", line 709, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "/build/fiona-1.8.4/docs/conf.py", line 14, in <module>
    import fiona
  File "/build/fiona-1.8.4/.pybuild/cpython2_2.7_fiona/build/fiona/__init__.py", line 83, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/build/fiona-1.8.4/.pybuild/cpython2_2.7_fiona/build/fiona/collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: /build/fiona-1.8.4/.pybuild/cpython2_2.7_fiona/build/fiona/ogrext.so: undefined symbol: OSRFixup

From the MIGRATION_GUIDE.TXT:

    * removal of OSRFixup() and OSRFixupOrdering(): no longer needed since objects
      constructed are always valid

Steps to reproduce the problem.

Build Fiona with GDAL 2.5.0-beta1

Operating system

For example: Debian unstable

Fiona and GDAL version and provenance

fiona (1.8.4-1) & fiona (1.8.6-1~exp1) Debian packages

gdal (2.5.0~beta1+dfsg-1~exp1) Debian package.

bug

All 8 comments

A project shouldn't remove functions from the public API at 2.5.0. That's a breaking change. I'll mail gdal-dev about this.

I was reminded in https://lists.osgeo.org/pipermail/gdal-dev/2019-April/050105.html that existing installations of Fiona (and Rasterio, probably) are going to be broken by GDAL 2.5, whether OSRFixup is restored or not. It looks as though we will need to treat GDAL 2.5 as a new major version.

As gdal 2.5.0 final is around the corner (and the last missing piece for updating to proj 6/libgeotiff 1.5/py-proj 2.x in OpenBSD), so far the only fallout i have is fiona (afaict, rasterio doesnt break), and that's only a runtime-fallout as OSRFixup removal just shows as a warning during build here..

So is there a potential fix/rewrite of the corresponding code to avoid calling OSRFixup ?

What about completely skipping GDAL 2.5.0 and focusing on GDAL 3.0 support?

Well, technically 2.5 was renamed to 3.0 to clearly show the ABI break, so it's the same :)

@sebastic Any progress made?

Why ask me?

GDAL 3.0.1 is out, and we're waiting for a new Fiona release this fix this issue before considering a transition in Debian.

I'm Closing this. Work on compatibility with GDAL 3 is happening in a different issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nyotta picture nyotta  Â·  7Comments

sgillies picture sgillies  Â·  5Comments

sgillies picture sgillies  Â·  3Comments

kylebarron picture kylebarron  Â·  5Comments

jrheard picture jrheard  Â·  3Comments