According to the GCC ABI Policy and Guidelines page I get that they try to maintain forward compatibility but I wonder to what extend this is true or if I'm missing something.
I am currently trying to run C++ software which was built on red hat 5 using gcc 4.1.2 / libstdc++ 6.0.8 on a CentOS 7 with libstdc++ 6.0.19.
I am experiencing weird behavior such as random crashes (might work for a while, then crash systematically for 30 minutes, then work again ...) or memory shooting up to use all 64GB of the server (never seen this issue before).
I seem to have fixed the issue with one of the miss-behaving programs by statically linking libgcc and libstdc++. A few hours have passed with no crash. I am thinking of playing with LD_LIBRARY_PATH and shipping the libraries with the executables.
But applying the same kind of solutions to the whole system will be quite time consuming, so I would appreciate if someone can tell me if I'm on the right track.
-- edit --
I forgot to mention, some libs are linked statically to libstdc++, some dynamically so I have situations like:
program_a -(dyn link)-> libstdc++
|-(dyn link)-> lib_b -(static link)-> libstdc++
|-(dyn link)----> lib_c -(dyn link)-> libstdc++
So here I have one libstdc++ being the system one, the other one being the compiler's one.