dynamic loading error ("Symbol not found")

Discussion in 'Python' started by kj, Oct 16, 2010.

  1. kj

    kj Guest

    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

    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
     
    kj, Oct 16, 2010
    #1
    1. Advertising

  2. 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".

    Emile
     
    Emile van Sebille, Oct 16, 2010
    #2
    1. Advertising

  3. kj

    kj Guest

    In <> Emile van Sebille <> writes:

    >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.
     
    kj, Oct 16, 2010
    #3
  4. kj

    Ned Deily Guest

    In article <i9d4m9$5fu$>, kj <>
    wrote:

    > 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

    > 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.

    --
    Ned Deily,
     
    Ned Deily, Oct 17, 2010
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    642
  2. Christopher Armstrong
    Replies:
    0
    Views:
    384
    Christopher Armstrong
    Dec 19, 2004
  3. Christopher Armstrong
    Replies:
    0
    Views:
    436
    Christopher Armstrong
    Dec 19, 2004
  4. Diego_B
    Replies:
    1
    Views:
    132
    Jonatan Kazmierczak
    Jan 17, 2008
  5. Tim Ferrell

    OpenSSL symbol not found error

    Tim Ferrell, Mar 19, 2009, in forum: Ruby
    Replies:
    0
    Views:
    111
    Tim Ferrell
    Mar 19, 2009
Loading...

Share This Page