dynamic loading error ("Symbol not found")

kj no.email at please.post
Sat Oct 16 23:15:53 CEST 2010

The following interaction (in OS X) summarizes the situation:

% grep -r _engClose $DYLD_LIBRARY_PATH
Binary file /Applications/MATLAB_R2010a.app/bin/maci64/libeng.dylib matches
% python
Python 2.6.5 (r265:79063, May 22 2010, 18:34:46) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mlabwrap import mlab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mlabwrap.py", line 188, in <module>
    import mlabraw
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mlabrawmodule.so, 2): Symbol not found: _engClose
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mlabrawmodule.so
  Expected in: dynamic lookup


In summary,

1) dlopen produces a "Symbol not found: _engClose" error;
2) according to grep, a file accessible through the variable
DYLD_LIBRARY_PATH matches the string "_engClose";

The permissions of the file in question are all OK (0555); likewise,
the permissions of all the prefix subpaths leading to this file
are fine.

(For all I know, it is possible that, even though the libeng.dylib
file matches "_engClose", this is only a fragment of a longer symbol

Can anyone suggest a way to fix this error?



More information about the Python-list mailing list