[gdal-dev] osx compile failure

Even Rouault even.rouault at spatialys.com
Thu Jan 3 13:40:10 PST 2019


On jeudi 3 janvier 2019 21:17:26 CET Alan Stewart wrote:
> Even,
> 
> I've been working on this. There were a lot of small source changes across a
> number of formats, not just plscenes, plus some system-specific details in
> the scripts, to be resolved. I have a successful build now, but running the
> ci/travis/osx/script.sh results in:
> 
> ImportError while loading conftest
> '/Users/astewart/Documents/GitHub/alanstewart-terragotech/gdal/autotest/con
> ftest.py'. /usr/local/lib/python2.7/site-packages/six.py:709: in exec_
>     exec("""exec _code_ in _globs_, _locs_""")
> conftest.py:9: in <module>
>     from osgeo import gdal
> ../gdal/swig/python/build/lib.macosx-10.12-x86_64-2.7/osgeo/__init__.py:21:
> in <module> _gdal = swig_import_helper()
> ../gdal/swig/python/build/lib.macosx-10.12-x86_64-2.7/osgeo/__init__.py:17:
> in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname,
> description)
> E   ImportError:
> dlopen(/Users/astewart/Documents/GitHub/alanstewart-terragotech/gdal/gdal/s
> wig/python/build/lib.macosx-10.12-x86_64-2.7/osgeo/_gdal.so, 2): Symbol not
> found: _CPLErrorSetState E     Referenced from:
> /Users/astewart/Documents/GitHub/alanstewart-terragotech/gdal/gdal/swig/pyt
> hon/build/lib.macosx-10.12-x86_64-2.7/osgeo/_gdal.so E     Expected in: flat
> namespace
> E    in
> /Users/astewart/Documents/GitHub/alanstewart-terragotech/gdal/gdal/swig/pyt
> hon/build/lib.macosx-10.12-x86_64-2.7/osgeo/_gdal.so
> 
> Any thoughts on why CPLErrorSetState would be missing?

I presume that this is because libgdal.dylib is not found.
Did you source "scripts/setdevenv.sh" that should set up the appropriate 
environment variables ? In that particular case DYLD_LIBRARY_PATH to point to 
libgdal.dylib

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list