From: Casey D. <cas...@gm...> - 2007-01-12 19:31:44
|
I had a problem using pyode (from cvs) on MacOS X using python 2.4 and ode 0.7 installed via darwinports. The setup.py was able to build and install pyode successfully, but I could not import ode: >>> import ode Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: Failure linking new module: /opt/local/lib/python2.4/site-packages/ode.so: Library not loaded: libode.dylib Referenced from: /opt/local/lib/python2.4/site-packages/ode.so Reason: image not found Looking at the ode.so in site-packages shows that libode.dylib was linked in with a relative path: % otool -L /opt/local/lib/python2.4/site-packages/ode.so /opt/local/lib/python2.4/site-packages/ode.so: libode.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.4) If I diddled PYLD_LIBRARY_PATH, I could get ode to import, but it broke other things in the process. Ultimately I was able to fix it be changing the link to libode.dylib to an absolute path. % sudo install_name_tool -change libode.dylib /opt/local/lib/libode.dylib /opt/local/lib/python2.4/site-packages/ode.so I'm not sure the best way to fixup setup.py et al to do this automagically (i.e., just prevent the unqualified link in the first place). If you do great, if not I can do some more digging and figure it out. Ideally pyode would have a darwinport itself, though you'll need to release what's in cvs first for that to be practical ;^) Out of curiousity what is the state of the version in cvs? How close to stable/release ready would you consider it? Thanks much for this package, I'm a newbie to ode but it looks like a great tool. -Casey |