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

From: "McCaffity, Ray (Contractor)" <McCaffityR(at)epg(dot)lewis(dot)army(dot)mil>
To: 'Bill Gribble' <grib(at)linuxdevel(dot)com>, 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 17:01:58
Message-ID: 9669B05099E9D411B6E400B0D0AA476C5C3843@epg.lewis.army.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I already sent a reply to Wei, but all you really have to do is make sure
it's in your path. Usually most users will have a .profile or .login or
.bashrc,
.kshrc, .cshrc etc...
just add this to your env variables.
LD_LIBRARY_PATH=/path/to/wherever:/usr/local/lib:/usr/local/pgsql/lib ...
and so on ...
If necessary, do the same for the user that postgresql is running as.
Finally, in your compile, I noticed this works with apache, php, and
postgresql..
--includedir=/path/to/wherever/lib
Some linux system let any user run ld.config (a bad idea IMHO, but..)
For Solaris, almost any user can chnage his library path by using crle.

Ray

-----Original Message-----
From: Bill Gribble [mailto:grib(at)linuxdevel(dot)com]
Sent: Thursday, May 30, 2002 9:54 AM
To: Wei Wang
Cc: Martijn van Oosterhout; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] erros when making examples in /src/test/examples

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.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phil Glatz 2002-05-30 17:17:38 connection refused problem
Previous Message Kurt Gunderson 2002-05-30 16:59:24 Re: Scaling with memory & disk planning