Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2006 15:03:10 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        nospam@mgedv.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: shared library loader configuration
Message-ID:  <20060707120310.GC88706@gothmog.pc>
In-Reply-To: <00aa01c6a1b7$a98af0a0$01010101@avalon.lan>
References:  <00aa01c6a1b7$a98af0a0$01010101@avalon.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-07-07 13:22, "no@spam@mgedv.net" <nospam@mgedv.net> wrote:
>
> hi,
>
> can someone give me please a SIMPLE and CLEAR answer, what i exactly
> have to do to achieve the following:
>
> i have (for example) installed a new compiled version of libz.a/.so in
> /usr/local.
>
> i want program (during runtime AND during compilation) to compile and
> run against the NEW and non-system libs.

In short, just don't.

The system programs have been tested, developed and debugged with the
*SYSTEM* version of the libraries.  Blindly replacing these libraries
with others is something you should do only with extreme care.

> what has to be set/changed, to have this setting as soon as the OS
> starts?

LD_LIBRARY_PATH is probably what you mean here.

> i tried running ldconfig, i was playing around with some ld-so.conf
> files, everything failed. the compilation does not even find the new
> libraries, and if i use "ldd" to check what path the lib would use
> it's always /lib or /usr/lib instead of /usr/local/lib.

All the compilers that I have to use for every day work and for my own
stuff have options that can hardcode a 'runtime library path' in the ELF
binary.

What did you try to compile?

What do you mean by writing ``the compilation does not even find the new
libraries''?

> please don't tell me things about RTFM or weblinks

This is also a good way of learning new stuff though :)

> i just need ~3 simple lines of what the hell to do that i get a
> persisting setting for compilations and runtimes

How do you know it is ``3 simple lines''?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060707120310.GC88706>