Wednesday, 7 May 2008

Matlab bugs about call external programs, such as Python

When I upgrade my OS to Ubuntu 8.04 and Matlab to Matlab 2008a, which is a fantastic version with a lot of optimizations and bug fixes.

But when I run my Matlab scripts, which using [system('python')] to do more system level jobs, I was prompted such a error message I've never seen before:/usr/local/matlab/sys/os/glnx86/ version `GLIBCXX_3.4.9' not found (required by......

This similar message (or something like it) means that the loader is
linking to the versions of libstdc++ libraries supplied with Matlab,
and those versions do not correspond to the versions that your version
of Python was compiled against.

The fix!
(for me) was to navigate to the offending folder (/usr/local/matlab/sys/os/glnx86)
and make a new directory "old", and move all libstdc and libgcc files
into the "old" directory. Once done, the loader will be unable to link
with these libraries, and will be forced to use the ones installed in
your distribution instead.


Anonymous said...

thx for the hint! it really helped!

Pascal said...

Argh... almost worked... :-/
MATLAB now crashes when attempting to use my sfunctions.

Short extract:
*** glibc detected *** /usr/local/matlab74/bin/glnx86/MATLAB: free(): invalid pointer: 0x0affce40 ***
======= Backtrace: =========

Cross Z said...

To Pascal: I never tried simulink on Linux. so no ideas about sfunctions issues. If you got any progress, please let me know, good luck.

Jerry said...

Your method does work!!!

thank you very much!

My photo
London, United Kingdom

Facebook & Twitter