mlabwrap, alternative to LD_LIBRARY_PATH ?
Hi, I had some problems using mlabwrap on my workstation due to a stupid problem, and I think it can cause problems to other people too, so I report it here (I didn't see any way to report bugs to scikits yet ?). The problem: - to use mlabwrap, one needs setting LD_LIBRARY_PATH to the directory where libeng.so is located. - the directory containing libengine.so contains a lot of libraries, including a libz.so. - as LD_LIBRARY_PATH has precedence on system wide libraries, this means that when you launch python, it will use libz from matlab instead of the system wide libz, which is likely to cause problems (it caused me a headache because of unfound symbols when launching some python scripts). I don't know an easy solution to this problem: a workaround is to link the necessary libraries in another directory, and set this directory in LD_LIBRARY_PATH. Another one is to use rlink, but I don't know if distutils exposes this link option, and if it is available on all platforms anyway. Cheers, David
David Cournapeau <david@ar.media.kyoto-u.ac.jp> writes:
Hi,
I had some problems using mlabwrap on my workstation due to a stupid problem, and I think it can cause problems to other people too, so I report it here (I didn't see any way to report bugs to scikits yet ?). The problem: - to use mlabwrap, one needs setting LD_LIBRARY_PATH to the directory where libeng.so is located. - the directory containing libengine.so contains a lot of libraries, including a libz.so. - as LD_LIBRARY_PATH has precedence on system wide libraries, this means that when you launch python, it will use libz from matlab instead of the system wide libz, which is likely to cause problems (it caused me a headache because of unfound symbols when launching some python scripts).
I don't know an easy solution to this problem: a workaround is to link the necessary libraries in another directory, and set this directory in LD_LIBRARY_PATH. Another one is to use rlink, but I don't know if distutils exposes this link option, and if it is available on all platforms anyway.
Yeah, the whole LD_LIBRARY_PATH thing is a huge pain -- there ought to be a better way to do this, but it's the "official" one: <http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel...> Any unix build experts who can comment on this? cheers, 'as
Alexander Schmolck wrote:
Yeah, the whole LD_LIBRARY_PATH thing is a huge pain -- there ought to be a better way to do this, but it's the "official" one:
<http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/hel...>
Any unix build experts who can comment on this?
If I were to build the thing with gcc, I would use -rpath, which hardcodes the library runtime path into the binary. I used this quite often with mex files, when I was still using matlab. David
Hi,
If I were to build the thing with gcc, I would use -rpath, which hardcodes the library runtime path into the binary. I used this quite often with mex files, when I was still using matlab.
distutils has a runtime_library_dirs option For eggs: http://cheeseshop.python.org/pypi/zc.recipe.egg/1.0.0b6#creating-eggs-with-e... I guess that would cover it? Matthew
"Matthew Brett" <matthew.brett@gmail.com> writes:
Hi,
If I were to build the thing with gcc, I would use -rpath, which hardcodes the library runtime path into the binary. I used this quite often with mex files, when I was still using matlab.
distutils has a runtime_library_dirs option
For eggs: http://cheeseshop.python.org/pypi/zc.recipe.egg/1.0.0b6#creating-eggs-with-e...
I guess that would cover it?
Hey, thanks -- I was just about to send off an email to the distutils-sig, asking about this (having not much luck googling setuptools LD_LIBRARY_PATH and similar), but this seems to do the trick -- I've modfied setup.py accordingly and it appears to work fine. Great! cheers, 'as
participants (3)
-
Alexander Schmolck -
David Cournapeau -
Matthew Brett