I have gcc version 5.3.1 on fedora 23 and I want to run some mex files. Whe I compile the file I get the following warning:
Warning: You are using gcc version '5.3.1-6)'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers
see: http://www.mathworks.com/support/compilers/current_release.
and when I try to run it I get the following error :
Invalid MEX-file '/home/x/Downloads/MatlabEXR/MatlabEXR/exrread.mexa64': /usr/local/MATLAB/R2016a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.8' not
found (required by /home/x/Downloads/MatlabEXR/MatlabEXR/exrread.mexa64)
I tried this : How to tell mex to link with the libstdc++.so.6 in /usr/lib instead of the one in the MATLAB directory?
but still I get the same error. Anything in mind what can be the problem?
I had a similar problem regarding libstdc++(I couldn't plot anything). This is the link to my question. matlab on linux can't plot anything(can't load libstdc++.so.6: version `CXXABI_1.3.8' not found)
How I solved the issue is also stated there.
Hope that helps
You error is originated from the fact that your libstdc++ uses a new ABI by default (https://gcc.gnu.org/gcc-5/changes.html). You can't link your MEX files using gcc 5.xx version.
Related
I create a pytorch extention, followed by this link
but it throws out the error that
fatal error: torch/extension.h: No such file or directory.
ubuntu 18.04
code::blocks 17.04
gcc 7.4.0
#include <torch/extension.h>
I expect the code to run.
Is there any document to fix this problem?
is the canonical header file that create Python bindings for C++/Cuda extensions.
So Try upgrading the version of Pytorch if it's not in newest version.
How is it possible that a program that I compile, link and run on the same machine to have GLIBCXX version errors when I try to run it? Does anyone know?
Here is the error I am getting:
0.01s$ build/test/gamgee_test
build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by build/test/gamgee_test)
build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by build/test/gamgee_test)
full output (with VERBOSE=1) including building and running is here:
https://travis-ci.org/broadinstitute/gamgee/jobs/39751787
This wasn't happening before, only after I switched to cmake. Also the same code runs fine with Clang (using a bundled version of libstdc++ since I haven't installed libc++ on the VM). That log is here: https://travis-ci.org/broadinstitute/gamgee/jobs/39751786
very puzzled.
Runtime paths are different to compile paths. Sounds like you have more than one version of your libraries on your system. check your LD_LIBRARY_PATH env variable and call your executable with ldd to see what libraries it is using/trying to use.
I cannot compile anything with the current version of emscripten from the ubuntu repos
Here is the error
http://pastebin.com/j5Z0ztTs
I suspect it might be because emscripten is outdated in the repos, but why is there no bug reports??
Could anyone help? I cannot find any updated information.
Thanks in advance.
The reason is because you are using the /usr/bin/clang++ that comes with your Linux distribution.
This version does not support Javascript backend. In order to use emscripten, you have to compile fastcomp (an LLVM clang compiler with Javascript backend added)
If you have not built fastcomp yet, Emscripten won't work.
Check out this page for installation instructions:
http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
If you have already built fastcomp, then the problem is in your emscriptenrc file, and moreover your PATH.
This is how I worked around the issue:
I created a file called emscriptenrc.sh that did this:
export PATH=/home/mike/emscripten/fastcomp/build/master/bin:/home/mike/emscripten/fastcomp/build/master/include:/home/mike/emscripten/fastcomp/build/master/lib:$PATH
then after I created that file
I rebuilt the ~/.emscripten configuration file by calling
./emcc -v from the emscripten build directory -- this seemed to get the right version of clang registered...
now you can go ahead and compile with emcc
I would suggest reading http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
as well as the rest of the documentation prior to trying to use emscripten.
I am starting with IGPROF for memory profiling--
i installed it and done all the steps defined in - http://igprof.sourceforge.net/install.html
but when i am running:
c++ -o vvvi-build-and-copy vvvi-build-and-copy.cc -ldl -lpthread
i am getting error-
c++: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by c++)
i google it but not getting what should i do?? i am using ubuntu right now.
Can you help me ?? plz tell me if you need any other info
Thanks in advance....
It usually means that you are using library compiled by newer compiler (gcc) than you are currently running. You need to recompile library with your current compiler or change to newer compiler.
You do not say what version of Ubuntu. Anyway, the problem is caused by a glibc version mismatch between your C++ and the version installed in Ubuntu.
Run the command
/lib/libc.so.6
to get information on your system's glibc, to confirm. You will see something which is not "version 2.11" as your installed C++ requires.
Your situation may occur if you did an incomplete update of the distribution (i.e., glibc is older than C++ expects, because you forced an update to C++ but left glibc behind).
The best solution should be to do an "apt-get upgrade" of the "old" packages ("apt-get upgrade glibc"), or even update the whole distribution.
Note: this probably has nothing to do with igprof installation, which is unlikely to have modified C++, much less glibc.
I am trying to compile a shared library which will call MATLAB function on Ubuntu 11.04. Like the command:
mcc - B cpplib:libStepCluster StepCluster.m
Get the following error.
/usr/lib/i38-linux-gnu/i686-linux-gnu/4.5.2/cc1plus: /usr/local/MATLAB/R2010a/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/i38-linux-gnu/i686-linux-gnu/4.5.2/cc1plus: /usr/local/MATLAB/R2010a/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/i38-linux-gnu/i686-linux-gnu/4.5.2/cc1plus: /usr/local/MATLAB/R2010a/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
/usr/lib/i38-linux-gnu/i686-linux-gnu/4.5.2/cc1plus: /usr/local/MATLAB/R2010a/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
/usr/lib/i38-linux-gnu/i686-linux-gnu/4.5.2/cc1plus: /usr/local/MATLAB/R2010a/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)
I konw the code works fine with Ubuntu 10.10, and upgraded to Ubuntu 11.04. Then the problem comes out. What is the problem and how to resolve it without too much pain?
MatLab R2011a Compile Error Solution.
Download and install GCC-4.4
Use command: mbuild -setup
Choose option 1 and then you will get a file locate in /usr/local/MATLAB/R2011a/bin/mbuildopts.sh
Search the file and replace all the compiler option with gcc-4.4
Then compile it, it should be fine!
The root is GLIBCXX_3.4.14' not found. Looking a similar SO question: GLIBCXX versions and #ninjalj answer, it appears you have a linker problem:
Use readelf -a and objdump -x to inspect ELF files in preference
to strings.
Actually, all the GLIBCXX_* versions don't apply to the entire
library, but to each symbol (symbol versioning, see DSO-howto). So you
can have e.g: std::char_traits<wchar_t>::eq##GLIBCXX_3.4.5 and
std::ios_base::Init::~Init()##GLIBCXX_3.4 on the same library file.
The fact that your program needs GLIBCXX_3.4.9 probably means that it
has been linked against a symbol that has been introduced/has changed
semantics on GLIBCXX_3.4.9.
I tried Eric Chu's answer but this is the only thing that worked for me:
sudo ln -s /usr/lib/libstdc++.so.6 {MATLABROOT}/sys/os/{architecture}/libstdc++.so.6
You will want to backup the file first.