help-gnu-utils
[Top][All Lists]
Advanced

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

Re: trouble with autotools/berkeley db


From: Lowell Kirsh
Subject: Re: trouble with autotools/berkeley db
Date: Wed, 16 Feb 2005 01:28:59 -0800
User-agent: Mozilla Thunderbird 1.0 (X11/20050111)

looks like this is the solution I'm taking. I wish there was something more elegant.

Karl Berry wrote:
    I am able to compile the following bdb-dependent file, which I would
    think is a sign that I have bdb installed:

Does it run?  (Not just compile.)

    checking for db_create in -ldb... no
    configure: error: Berkeley db library not found

Anyone have any idea what's the matter?
Search in config.log for db_create; you should see the exact C program
Autoconf is testing with, the compiler invocation, and the errors.


If your db library is in /usr/lib or /lib, this won't apply, but I'll
vent anyway: My experience is that autoconf not finding libraries is
often because of shared libraries.  That is, the program has to be
linked with -R/your/library/dir.  This is true even for libstdc++,
libgcc_s, and the like.  I have never understood why GCC does not
automatically -R those directories.  (I reported it, but they rejected
the suggestion.)  The result is that if you compile a hello,world C++
program, it will not run if the libstdc++ used is not in a system
directory.

In the latest gcc, they made it even harder by (apparently) removing -R
as an option to the compiler.  To configure subversion, for example, I
had to resort to this:
configure \
  --with-berkeley-db=/usr/local/db \
  LDFLAGS="-Wl,-R -Wl,/usr/local/db/lib -Wl,-R -Wl,/usr/local/gnu/lib -Wl,-R 
-Wl,/usr/local/lib" \

Sigh.

Happy linking,
karl




reply via email to

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