[gdal-dev] OSX Dev Build

Andrew Bell andrew.bell.ia at gmail.com
Fri May 2 12:21:27 PDT 2025


Hi,

I'm trying to get an OSX dev build going against the current master branch
with test support. When I try to run the import as is being done by the CI
script, I get an error. It fails when trying to resolve
_CPLQuietWarningsErrorHandler, which I see is a new function. That function
is contained in the built libgdal.dylib:

(gdal.2) [issue-11533] $ nm libgdal.dylib | grep
_CPLQuietWarningsErrorHandler
00000000000292d0 T _CPLQuietWarningsErrorHandler

Any suggestions on resolution would be appreciated.

Here is the error:

(gdal.2) [issue-11533] $ DYLD_LIBRARY_PATH=/Users/abell/gdal/build
PYTHONPATH=/Users/abell/gdal/build/swig/python python3 -c "from osgeo
import gdal"
Traceback (most recent call last):
  File "/Users/abell/gdal/build/swig/python/osgeo/__init__.py", line 30, in
swig_import_helper
    return importlib.import_module(mname)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File
"/Users/abell/miniconda3/envs/gdal.2/lib/python3.13/importlib/__init__.py",
line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in
_find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1320, in create_module
  File "<frozen importlib._bootstrap>", line 488, in
_call_with_frames_removed
ImportError: dlopen(/Users/abell/gdal/build/swig/python/osgeo/_
gdal.cpython-313-darwin.so, 0x0002): symbol not found in flat namespace
'_CPLQuietWarningsErrorHandler'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from osgeo import gdal
  File "/Users/abell/gdal/build/swig/python/osgeo/__init__.py", line 35, in
<module>
    _gdal = swig_import_helper()
  File "/Users/abell/gdal/build/swig/python/osgeo/__init__.py", line 32, in
swig_import_helper
    return importlib.import_module('_gdal')
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File
"/Users/abell/miniconda3/envs/gdal.2/lib/python3.13/importlib/__init__.py",
line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_gdal'

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250502/7c2c1c98/attachment.htm>


More information about the gdal-dev mailing list