Reputation: 2683
Our legacy product ships on 32-bit Centos 6.6, which has gcc 4.4.7 built in. However, the large app sometimes crashes from glibc corruption. Recompiling with gcc 4.8 and AddressSanitizer finds "global-buffer-overflow" and then crashes. However, compiling with gcc 4.9 seems to fix things: no glibc corruption and no AddressSanitizer errors.
The problem is the the app now requires libstdc++.so.6.0.20
and no longer works with the stock Centos 6 libstdc++.so.6.0.13
(GLIBCXX_blahblah
not found, etc)
So what's the best approach?
/usr/lib/libstdc++
with the new one?libstdc++.so.6.0.20
with our app (in a private directory) and modify /etc/ld.so.conf.d
to load the private/new library before the system copies.In #1, the file is owned by another package, so might again be overwritten by some future update. Also, would existing programs break if the /usr/lib
version was updated? I read a lot on ABI compatibility but it is a complex subject.
Thanks for your feedback.
Upvotes: 1
Views: 274
Reputation: 4819
Your problem is to get minor interaction with other software.
So, avoid replacing the stock version of the library.
Moreover, there would also be possibly interractions with other software using /etc/ld.so.conf.
So, the best way to avoid any interaction with other sotfware is to:
This means writting:
% export LD_LIBRARY_PATH=/usr/local/my-own-version-for-my-app/lib:$LD_LIBRARY_PATH
% ./launch_my_app
or:
% export LD_PRELOAD=/usr/local/my-own-version-for-my-app/lib/libstdc++.so.6.0.20
% ./launch_my_app
Upvotes: 1