[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Nonstandard lib location & LD_RUN_PATH

From: David Masterson
Subject: RE: Nonstandard lib location & LD_RUN_PATH
Date: Mon, 28 Nov 2005 17:01:38 -0800

Martin, Jason H wrote:
> I'm compiling CFEngine 2.1.17 on RHEL2.1, and have reason for it to
> use a private version of openssl / BerkeleyDB instead of relying on a
> system-installed version. I've been running in to a problem with the
> compilation though:
> $ ./configure --with-berkeleydb=/usr/local/BerkeleyDB.4.4
> --with-openssl=/usr/local/cfengine/ssl
> [snip]
> checking for BerkeleyDB location in /usr/local/BerkeleyDB.4.4...
> /usr/local/BerkeleyDB.4.4
> checking Berkeley DB Version... configure: error: This release of
> cfengine requires BerkeleyDB 3.2 or later
> The config.log output is:
> configure:8608: gcc -o conftest -pthread -g -O2
> -I/usr/local/BerkeleyDB.4.4/include -pthread
> -L/usr/local/BerkeleyDB.4.4/lib conftest.c -lm  -ldb >&5
> configure:8611: $? = 0
> configure:8613: ./conftest
> ./conftest: error while loading shared libraries: cannot
> open shared object file: No such file or directory
> The problem is that since the bdb library location is not in
>, it doesn't know where to find the db libraries. I would
> have thought it would first look in the directory specified in the -L
> line, but apparently that is not the case.
> Ldd output:
> => /lib/i686/ (0x40025000)
> => not found
> => /lib/i686/ (0x40048000)
> => /lib/i686/ (0x40079000)
>         /lib/ => /lib/ (0x40000000)
> I found that defining the LD_RUN_PATH variable prior to compilation to
> have the correct libdb directory caused it to look in the correct
> location. This is important as it isn't feasible to change every
> systems or set a LD_LIBRARY_PATH prior to execution.
> Perhaps it would be a good idea modify configure/Makefile to use this
> feature when the user supplies a custom location, or perhaps as a
> fallback if the test for berkeleydb fails?  The manpage for ld says
> the -R option is supposed to perform the same function as
> LD_RUN_PATH, but gcc is just giving me an error when I add -R on to
> the BERKELEY_DB_LDFLAGS in configure.

It would seem that the most crossplatform standard way would be to set
LD_LIBRARY_PATH in during the processing to search for the
BerkeleyDB library.
David Masterson
VMware, Inc.
Palo Alto, CA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]