Version `CXXABI_1.3.8′ Not Found - Site Title
Have you experienced this error “version `CXXABI_1.3.8′ not found” in running mex files in matlab? It is probably caused by referencing to the line above the error message:
/usr/local/MATLAB/R2016a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
where your mex file is looking for the dynamic library of C++.
I encountered this problem when trying to train a simple svm classifier using libsvm. I found no fatal errors when compling using default gcc and g++ (with only warning of using newer version of gcc). But when it comes to running, the libstdc++.so.6 distributed along with matlab is fooling the system.
To further check why it is happening, I turn to the default library used by matlab, i.e. /usr/local/MATLAB/R2016a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6 and check what versions of CXXABI it comes with by typing the command in the terminal.
strings /usr/local/MATLAB/R2016a/sys/os/glnxa64/libstdc++.so.6 | grep ABI
The results are shown below. We can obviously see there is no CXXABI_1.3.8 as required by the mex file. I think the default libstdc++ distributed with matlab is too old.
CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_TM_1 CXXABI_1.3 CXXABI_1.3.2 CXXABI_1.3.6 CXXABI_1.3.1 CXXABI_1.3.5 CXXABI_1.3.4 CXXABI_TM_1 CXXABI_1.3.3
Now, suppose you don’t have an up-to-date gcc or g++ install, we first of all update or install typing the following:
sudo apt-get install gcc g++
Then, we can find the latest version of libstdc++ by first typing the following
locate libstdc++ | grep libstdc++
From the first a few lines, I can find
/usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++fs.a /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 /usr/local/MATLAB/R2016a/sys/os/glnxa64/README.libstdc++ /usr/local/MATLAB/R2016a/sys/os/glnxa64/libstdc++.so.6 /usr/local/MATLAB/R2016a/sys/os/glnxa64/libstdc++.so.6.0.17
I highlighted the library we are looking for. Its location may vary depending on your linux distribution. Let’s check if this version includes the thing the mex file is looking for.
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep ABI
CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_1.3.7 CXXABI_1.3.8 CXXABI_1.3.9 CXXABI_TM_1 CXXABI_FLOAT128
Yes! This is exactly what we are looking for. Now the task is how to prevent matlab from using the default libstdc++. There are many workarounds available. Here I simply do the following two. One way is to preload this library before launching matlab.
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab
It workds though, you still have to type the preload every time running matlab. So you could write the preload into your .bashrc file. Alternatively, you could simply set the library path to null in matlab by including the following in the beginning of your m file.
setenv(‘LD_LIBRARY_PATH’, ”);
However, the latter one may cause further issues should your matlab look for other library which is shipped with matlab installation but not installed in your system.
Hope you find this solution useful and share with me your idea.
Share this:
- X
Related
Từ khóa » Cxxabi_1.3.8 Gcc
-
Version `CXXABI_1.3.8' Not Found (required By /usr/lib/x86_64-linux ...
-
"CXXABI_1.3.8 Not Found" Ubuntu 19.04
-
C++ – Error Building Gcc 4.8.3 From Source: Libstdc++.so.6 ... - ITecNote
-
Libstdc++.so.6: Version `CXXABI_1.3.8' Not Found #15777 - GitHub
-
Anyway To Avoid The Requirement Of Using CXXABI_1.3.8 · Issue #3427
-
[Solved]-Error Building Gcc 4.8.3 From Source: Libstdc++.so.6: Version ...
-
I Have No Ideas About An Error Involving CXXABI
-
ABI Policy And Guidelines - GCC, The GNU Compiler Collection
-
Ubuntu – CXXABI_1.3.8 Not Found - Unix Server Solutions
-
ImportError: /lib64/libstdc++.so.6: Version `CXXABI_1.3.8' Not Found
-
Solutions To Similar Problems Version `CXXABI_1.3.8' Not ... - Actorsfit
-
Version `CXXABI_1.3.8' Not Found (required By ...) [duplicate]
-
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: Version CXXABI_1.3.8' Not ...
-
Centos7升级gcc7.1.0(libstdc++.so.6: Version `CXXABI_1.3.8' Not Found)