I'm building GDAL with ECW support on Mac OS X 10.4 using ./configure --with-ecw and linking against libecwj2-3.3 binaries.
~/dev/gdal/_svn/trunk/gdal $ otool -L /Users/mloskot/dev/gdal/_svn/trunk/gdal/libgdal.dylib |grep NCS
/usr/local/lib/libNCSEcw.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libNCSCnet.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libNCSUtil.0.dylib (compatibility version 1.0.0, current version 1.0.0)
I also request Python bindings using --without-ogpython --with-python.
Everything have worked well for long time. As I remember it worked well also in last Thursday (Now 29). Today, I updated GDAL from SVN and tried to rebuild & test but loading Python bindings fail with strange error:
~/dev/gdal/_svn/trunk/gdal $ python
Python 2.3.5 (#1, Dec 7 2006, 14:50:51)
[GCC 4.0.1 (Apple Computer, Inc. build 5363) (+4864187)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/Users/mloskot/dev/gdal/_svn/trunk/gdal/swig/python/build/lib.darwin-8.11.1-i386-2.3/gdal.py", line 2, in ?
from osgeo.gdal import deprecation_warn
File "/Users/mloskot/dev/gdal/_svn/trunk/gdal/swig/python/build/lib.darwin-8.11.1-i386-2.3/osgeo/gdal.py", line 7, in ?
import _gdal
ImportError: dlopen(/Users/mloskot/dev/gdal/_svn/trunk/gdal/swig/python/build/lib.darwin-8.11.1-i386-2.3/osgeo/_gdal.so, 2): Symbol not found: _GetControlByID
Referenced from: /usr/local/lib/libNCSCnet.0.dylib
Expected in: flat namespace
>>>
The reported libNCSCnet library belongs to libecwj2-3.3 SDK:
$ nm /usr/local/lib/libNCSCnet.0.dylib |grep ID
U _GetControlByID
U _GetControlID
...
Here is where I suck the GDAL Python bindings from:
~/dev/gdal/_svn $ echo $DYLD_LIBRARY_PATH
/Users/mloskot/dev/gdal/_svn/trunk/gdal
~/dev/gdal/_svn/trunk/gdal $ echo $PYTHONPATH
/Users/mloskot/dev/gdal/_svn/trunk/gdal/swig/python/build/lib.darwin-8.11.1-i386-2.3
~/dev/gdal/_svn/trunk/gdal $ ls swig/python/build/lib.darwin-8.11.1-i386-2.3/osgeo/
__init__.py _gdalconst.so _osr.so gdal_array.py gdalnumeric.py osr.py
_gdal.so _ogr.so gdal.py gdalconst.py ogr.py
I'm wondering if it is a bug or something specific to my environment.
However, everything works well when using GDAL without ECW support:
~/dev/gdal/_svn/trunk/gdal $ otool -L /Users/mloskot/dev/gdal/_svn/trunk/gdal/libgdal.dylib | grep NCS
~/dev/gdal/_svn/trunk/gdal
and I can import GDAL modules with success:
~/dev/gdal/_svn/trunk/gdal $ python
Python 2.3.5 (#1, Dec 7 2006, 14:50:51)
[GCC 4.0.1 (Apple Computer, Inc. build 5363) (+4864187)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdal
/Users/mloskot/dev/gdal/_svn/trunk/gdal/swig/python/build/lib.darwin-8.11.1-i386-2.3/osgeo/gdal.py:81: DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal
DeprecationWarning)
>>>