I want to preface this with the important notice that I am not a C/C++ programmer, and know very little about how linkage of libraries works in C.
Our code uses libstdc++.so.6 (gcc 3.4, i think). We have third-party precompiled (closed source) libraries that use libstdc++.so.5 (gcc 2.something or 3.2, i think). This is on linux. We have both a .a and .so version of the third party lib.
Is it possible to build our app with the 3rd party libs? How? Is it possible to build/run our app without having libstdc++.so.5 installed our our machines, how?
If I've forgotten some critical information, please let me know - I hardly know whats relevant with this stuff. I realize that a complete answer probably won't be possible; I'm really looking for direction and guidance. Static link this, dynamic that, rebuild that, prebuild so-and-so, switch to version x, or symlink the quizdoodle, etc.
Update:
We tried using dlopen
with RTLD_LOCAL
to isolate the 3rd party library from the rest of our app. This seems to have mostly worked, however, we are left with large memory leaks for unknown reasons. We suspect that, when we call dlopen
, the third party library pulls in symbols like malloc
from the already loaded .so.6, and things get muddled up.
For giggles, we tried putting the third-party library into LD_PRELOAD
, then ran our app, and the memory leaks seems to completely disappear.