[gdal-dev] osx compile failure
Alan Stewart
astewart at terragotech.com
Thu Jan 3 13:17:26 PST 2019
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/conftest.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/swig/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/python/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/python/build/lib.macosx-10.12-x86_64-2.7/osgeo/_gdal.so
Any thoughts on why CPLErrorSetState would be missing?
Alan Stewart
Senior Software Engineer
TerraGo Technologies
3200 Windy Hill Road, Suite 1550W
Atlanta, GA 30339 USA
O. +1 678.391.9615
www.terragotech.com
-----Original Message-----
From: Even Rouault <even.rouault at spatialys.com>
Sent: Tuesday, December 18, 2018 4:20 PM
To: gdal-dev at lists.osgeo.org
Cc: Alan Stewart <astewart at terragotech.com>
Subject: Re: [gdal-dev] osx compile failure
Alan,
your environment is correct, it is just that there are different versions of libjson-c where function signatures have changed. We have had similar issues in the past.
>
> I doing 'git clone' of master from OSGeo/gdal and running the
> gdal/ci/travis/osx scripts. The install.sh script terminates because of:
>
> plmosaicdataset.cpp:1111:30: error: implicit conversion loses integer
> precision: 'size_t' (aka 'unsigned long') to 'const int'
> [-Werror,-Wshorten-64-to-32] const int nMosaics =
> json_object_array_length(poMosaics);
Could be fixed for all versions by using: const auto
> ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> plmosaicdataset.cpp:1419:30: error: comparison of integers of
> different
> signs: 'int' and 'size_t' (aka 'unsigned long')
> [-Werror,-Wsign-compare] for(int i = 0; i <
> json_object_array_length(poItems); i++ ) ~ ^
I would do
const auto nItemsLength = json_object_array_length(poItems);
for( decltype(nItemsLength) i = 0; i < nItemsLength; i++ )
Can you submit a pull request with something like the above ?
Even
--
Spatialys - Geospatial professional services http://www.spatialys.com
More information about the gdal-dev
mailing list