Running a program made up of clang + llvm on another machine
I am compiling a program via clang + llvm (version 3.1) and trying to run it on a computer that also has the same clang + llvm version. I am going on Ubuntu 10, but the other computer where I am trying to run has CentOS 5. There (on CentOS) I also run into problems compiling via LLVM (compiler run is implemented in LLVM). That's why I thought of compiling on Ubuntu, grab the exe from there and just run it on the CentOS machine.
However, when I try to do this, I get the following error.
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./main)
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./main)
How can I solve this. Please note that I do not have root access on this machine.
source to share
One solution would be to copy the library from your Ubuntu work machine to your CentOS machine. Place in your Home / Workdir / whereever (TM) and set the LD_PRELOAD variable to this library. But this can be quite tedious as it is possible that this is not the only library that is missing (and it is possible that the libraries depend on other libraries that you need as well ...).
This also works if both machines are of the same architecture (for example, it won't work if your computer is 32 bit ubuntu and your CentOS 64).
source to share