MATLAB linking error - CentOS 7 - R2020b

71 views (last 30 days)
Heinz Stockinger
Heinz Stockinger on 22 Sep 2020
Commented: Enlighten on 5 Aug 2024
I've installed MATLAB R2020b on CentOS 7 and get the following error:
$ matlab
MATLAB is selecting SOFTWARE OPENGL rendering.
/Home/matlab/matlab/bin/glnxa64/MATLAB: symbol lookup error: /Home/matlab/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: undefined symbol: __cxa_thread_atexit_impl
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/software/libexec/gcc/x86_64-redhat-linux/6.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,go,lto --prefix=/software --mandir=/software/share/man --infodir=/software/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --enable-libmpx --enable-gnu-indirect-function --with-arch_32=x86-64 --with-arch=nocona --with-tune=core2 --with-multilib-list=m64 --oldincludedir=/software/include --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.1.1 20160510 (Red Hat 6.1.1-2) (GCC)
Which compiler version and dependencies do you need to install to have MATLAB working?
Thank you,
Heinz
  4 Comments
John Rabo
John Rabo on 11 Jan 2021
Hi Heinz, were you able to resolve this problem? I'm having the same problem.
gerco hassink
gerco hassink on 9 Jun 2021
Edited: gerco hassink on 9 Jun 2021
I have the same problem on centos 7.6.1810.
I checked the solutions from Sai Sri Pathuri below, but they don't work and don't seem to make sense as well, but that could be me of course. Any help would be appreciated. Due to other software we prefer not to update the system too much
matlab installation worked fine
MATLABWindow runs as well
/usr/local/MATLAB/R2020b/bin/./matlab -nosplash -nodesktop
gives:
MATLAB is selecting SOFTWARE OPENGL rendering.
and then the prompt again
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB -nosplash -nodesktop
gives:
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB: symbol lookup error: /usr/local/MATLAB/R2020b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: undefined symbol: __cxa_thread_atexit_impl
gcc -v
Ingebouwde specs worden gebruikt.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc versie 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

Sign in to comment.

Answers (3)

Jonathan Rosalki
Jonathan Rosalki on 14 Jul 2022
I had a similar problem (trying to run in python3.8 "import matlab.engine") and was pointed at this solution by the kind people at Mathworks (thank you):
  • Could you please try setting the "LD_PRELOAD" environment variable by running:
  • export LD_PRELOAD="/home/local/MATLAB/R2022a/bin/glnxa64/glibc-2.17_shim.so"
  • Note that since this is a local environment variable the fix will not apply to any workers. The fix can be applied everywhere by adding the environment variable as a user or system wide variable.
Maybe that will help in this situation?
  1 Comment
Jeremy
Jeremy on 8 Feb 2023
Thank you. This helped me track down a solution to this error:
Python Error: ModuleNotFoundError: No module named 'libmwbuffer'
When running this:
py.numpy.array([1 2; 3 4])
On CentOS 7, with rh-python38-python-3.8.13-1.el7.x86_64 installed, other Matlab-Python interactions seemed to work, but not NDArray.
Matlab was looking for: libpython3.8.so.1.0
Our file was called: libpython3.8.so
(In our case it was in /opt/rh/rh-python38/root/usr/lib64/)
I just made a symlink, and now it works.
ln -s libpython3.8.so libpython3.8.so.1.0
Thanks again.

Sign in to comment.


Sai Sri Pathuri
Sai Sri Pathuri on 24 Sep 2020

gerco hassink
gerco hassink on 22 Jul 2021
Turned out that it is a version problem. Matlab 2020 uses libstdc++.so.6.0.25 and our Centos 7 and other software on it use *.19 and we did not want to upgrade these. the only solution was to install an older version of matlab R2017b and this worked perfectly.
  1 Comment
Enlighten
Enlighten on 5 Aug 2024
this is corret.another ways is to update your gcc version to 10.3.0

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!