Re: erros when making examples in /src/test/examples

From: Bill Gribble <grib(at)linuxdevel(dot)com>
To: Wei Wang <Wei(dot)Wang(at)cl(dot)cam(dot)ac(dot)uk>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: erros when making examples in /src/test/examples
Date: 2002-05-30 16:54:07
Message-ID: 1022777647.7223.207.camel@firetrap
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2002-05-30 at 11:14, Wei Wang wrote:
> But if I am not root, hence no access to /etc/ld.so.conf, where should
> I specify such libraries for the programs to look for?

This is actually a very hard problem to solve in general.

You can control the behavior of the runtime dynamic linker with
environment variables: LD_LIBRARY_PATH to add to the search path for
libraries linked in with gcc, LTDL_LIBRARY_PATH for libraries linked at
runtime via ltdl_open().

If there's a possibility that there will be multiple versions of a
library installed on the target system, or the libs are installed in
non-system locations (outside /lib and /usr/lib) you may need to make
special provisions to make sure your program will run for all users. I
think it's ideal to make it so that as long as a program is in your PATH
it will run without requiring the user to set LD_LIBRARY_PATH and
friends.

My development team uses an overrides mechanism that always forces the
environment of the running program to match up with what was discovered
by the 'configure' process at build time, and policy dictates that we
use pkg-config in such a way that libraries can query other libraries at
build time about where they are installed and for the settings of any
relevant environment variables.

b.g.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kurt Gunderson 2002-05-30 16:59:24 Re: Scaling with memory & disk planning
Previous Message McCaffity, Ray (Contractor) 2002-05-30 16:53:57 Re: Scaling with memory & disk planning (was Re: Non-li