[Ilugc] runtime linking without LD_LIBRARY_PATH

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Wed Nov 24 11:58:02 2010

On Tue, Nov 23, 2010 at 9:49 PM, Mohan R <mohan43u@xxxxxxxxx> wrote:

here is my problem, downloaded latest glib-2.0 (2.26) tarball and did 
'./configure --prefix="/home/localuser/localbuilds/"; make; make install'.

At runtime, I need to use the latest libgio-2.0.so (because of GDBusProxy) 
which is inside my '/home/localuser/loacalbuilds/lib'. Is there any way to 
link to this latest library without using LD_LIBRARY_PATH?

Have you tried running "./configure --help", you should find options
where you can specify different include and library paths.

ELF format spec permits you to hard code library path in the binary
itself.  Should warn you that this practice is discouraged in favor of
runtime linking using ld, LD_PRELOAD and LD_LIBRARY_PATH
are easier to manage.

- Raja

Other related posts: