Categories
Sys Admin

More MATLAB woes…

Matlab is a wonderful program. It really is pretty neat. You can program really quickly and get results fast. BUT it has a few things that make it annoying to work with sometimes.

One of my beefs is that it preloads some libraries in it. The problem is that those libraries are not actual libraries, but rather pointers to specific libraries. So MATLAB’s libstdc++.so.5 could require libstdc++.so.5.11, in which case you are doomed to keep looking for the problem until you figure your distribution might not even package this particular version of libstdc++.so.5. Thankfully since switching to ArchLinux, I haven’t had much problem finding particular packages (even if I have to use AUR). The reason not to use the system’s libstdc++.so.5 is beyond me.

Anyways, I was having problem with MATLAB giving me:

/usr/lib/libharfbuzz.so.0: undefined symbol: FT_Face_GetCharVariantIndex

I traced the problem to MATLAB linking to and older version of libfreetype. The solution was quite simple. All I had to do was manually tell MATLAB to use the “right” libfreetype with:

LD_PRELOAD=/usr/lib/libfreetype.so.6 matlab

To make this automated, I added an alias to my bashrc:

alias matlab="LD_PRELOAD=/usr/lib/libfreetype.so.6 matlab"

Now, all works properly. GG

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.