dynamic loading error ("Symbol not found")

K

kj

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

% echo $DYLD_LIBRARY_PATH
/Applications/MATLAB_R2010a.app/bin/maci64
% grep -r _engClose $DYLD_LIBRARY_PATH
Binary file /Applications/MATLAB_R2010a.app/bin/maci64/libeng.dylib matches
% export DYLD_LIBRARY_PATH
% 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.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
name.)

Can anyone suggest a way to fix this error?

Thanks!

~kj
 
E

Emile van Sebille

On 10/16/2010 2:15 PM kj said...
The following interaction (in OS X) summarizes the situation:

% echo $DYLD_LIBRARY_PATH
/Applications/MATLAB_R2010a.app/bin/maci64
% grep -r _engClose $DYLD_LIBRARY_PATH
Binary file /Applications/MATLAB_R2010a.app/bin/maci64/libeng.dylib matches
% export DYLD_LIBRARY_PATH
% 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.

I'd start by checking the version numbers and compatibility
specifications on mlabwrap which, per their site, claims "mlabwrap
should work with python>=2.4".

Emile
 
K

kj

In said:
On 10/16/2010 2:15 PM kj said...
The following interaction (in OS X) summarizes the situation:

% echo $DYLD_LIBRARY_PATH
/Applications/MATLAB_R2010a.app/bin/maci64
% grep -r _engClose $DYLD_LIBRARY_PATH
Binary file /Applications/MATLAB_R2010a.app/bin/maci64/libeng.dylib matches
% export DYLD_LIBRARY_PATH
% 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
I'd start by checking the version numbers and compatibility
specifications on mlabwrap which, per their site, claims "mlabwrap
should work with python>=2.4".

I don't get your point. As the fragment you quoted shows, I'm
using Python 2.6.5.
 
N

Ned Deily

kj <[email protected]> said:
The following interaction (in OS X) summarizes the situation:

% echo $DYLD_LIBRARY_PATH
/Applications/MATLAB_R2010a.app/bin/maci64
% grep -r _engClose $DYLD_LIBRARY_PATH
Binary file /Applications/MATLAB_R2010a.app/bin/maci64/libeng.dylib matches
% export DYLD_LIBRARY_PATH
% 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.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/si
te-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
name.)

Can anyone suggest a way to fix this error?

I'd suspect an architecture mismatch or ABI mismatch. The "maci64" in
the path suggests to me that libeng.dylib might be a 64-bit-only library
while the framework path and the fact that the (presumably
MacPorts-derived) Python you are using was built with gcc 4.0.1 suggests
you are running on OS X 10.5 or 10.4 and the python installation is
32-bit only. That is easy enough to check: use `/usr/bin/file` and
`/usr/bin/otool -L` on mlabramodule.so and lilbeng.dylib.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top