1

I compiled some codes in Matlab on a Linux system, and .mexa64 files has been generated, but in run time, I get the following error:

Invalid MEX-file '/*.mexa64': /matlab-8.5/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.8' not found.

i tried setting -rpath in make file by two following commands in matlab make file: LDFLAGS="\$LDFLAGS -rpath=/usr/local/GNU/glibc-2.22/lib/"

LDFLAGS="\$LDFLAGS -dynamic-linker=/usr/local/GNU/glibc-2.22/lib/ld-linux-x86-64.so.2"

But, it cannot solve the problem.

Niki
  • 21
  • 4
  • you can find many similar questions, here is one: http://stackoverflow.com/questions/9959306/how-to-tell-mex-to-link-with-the-libstdc-so-6-in-usr-lib-instead-of-the-one-i – Amro Mar 23 '16 at 06:34

1 Answers1

0

This worked for my case: Goto your matlab installation: cd /usr/local/MATLAB/R2015a/sys/os/glnxa64 and rename these two files: sudo mv libstdc++.so.6 libstdc++.so.6.orig sudo mv libgcc_s.so.1 libgcc_s.so.1.orig

Salman
  • 1