[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: compiling and berkeley db

	I cheated. I installed Berkley DB in the default location and
sym-linked the library file and the header files to /usr/local/lib and
/usr/local/include respectively. 

	I have not seen problems with this and it makes cleanup a breeze
when you goto upgrade your DB package.

On Mon, 22 Jan 2001, Adam Shand wrote:

> hi,
> i'm hoping tha t someone can shed some light on this because i've never
> had this problem before.
> i'm compiling openldap on a solaris 8 box using gcc 2.95. it requires
> berkeley db 3 and of course berkeley db's always install into weird
> places, in this case the package i snagged installed into
> /usr/local/BerkeleyDB.3.0.  so in order for ./configure to find the
> libraries i had to do this:
> # export LDFLAGS="-L/usr/local/BerkeleyDB.3.0/lib"
> # export CPPFLAGS="-I/usr/local/BerkeleyDB.3.0/include
> it all compiled fine, however now when i go to run the program it gives
> me:
> sunlab(root)# /usr/local/libexec/slapd 
> ld.so.1: /usr/local/libexec/slapd: fatal: libdb-3.0.so: open failed: No such file or directory
> and you can see that it can't find it:
> sunlab(root)# ldd /usr/local/libexec/slapd 
>         libdb-3.0.so =>  (file not found)
> i suppose i can set some environment variable (LD_PATH or something
> right?) in the script that starts slapd but that's kinda messed up, or i
> can link libdb-3.0.so into /usr/lib but that's an accident waiting to
> happen (though it's what i'm doing right now and solves the problem).
> so the only other solution i can find is to pass "-R" to ld in the
> makefile.  this seems like the correct solution but i've never had to do
> this before when compiling stuff using libraries in non-standard
> locations.  is this a deliberate choice of how openldap is setup or is
> this an oddness of my setup?
> in either case if it's not a bug what's the recommended solution?
> thanks,
> adam.