f



on LD_LIBRARY_PATH and libstdc++.so

I wanted to test a program against a different libstdc++.so.  I could
not manage to have LD_LIBRARY_PATH make the dynamic linker ignore the
system's libstdc++.  I had to use LD_PRELOAD.  I did not find
documentation to explain why this is so.  Can you educate me better on
this matter?  Thank you.

%uname -a
Linux ip-172-31-33-254 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17
22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

%lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty
%
0
Daniel
9/5/2016 12:02:39 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

1 Replies
595 Views

Similar Articles

[PageSpeed] 3

Daniel Bastos <dbastos@toledo.com> writes:

> I wanted to test a program against a different libstdc++.so.  I could
> not manage to have LD_LIBRARY_PATH make the dynamic linker ignore the
> system's libstdc++.  I had to use LD_PRELOAD.  

Let me apologize.  I got confused here.  I had a libstdc++ compiled for
a 32-bit system.  That's why the dynamic linker kept on picking the
system's version, which is a 64-bit system.  Not well versed in the
subject, I ended up thinking there was something special about libstdc++
that I could not substitute via LD_LIBRARY_PATH.  By the time I decided
to try LD_PRELOAD, I was already with the right-library and so things
worked.

Thank you.
0
Daniel
9/5/2016 5:48:16 PM
Reply: