[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

strange linker/autoconf stuff

From: Ben Collins-Sussman <sussman_at_newton.collab.net>
Date: 2000-09-15 20:45:21 CEST

I installed Berkeley DB 3.1.14 on my FreeBSD system, right out of
/usr/ports. It deposited libdb.so into /usr/local/lib.

When I run ./configure, however, the DB-test still fails:

 configure:1814: checking for Berkeley DB 3.1.14 or newer
 configure:1855: gcc -o conftest -g -O2 conftest.c -ldb 1>&5
 /usr/libexec/elf/ld: cannot open -ldb: No such file or directory

...and /usr/local/lib is definitely in my shell's LD_LIBRARY_PATH.

"That's odd," I thought. So I try to compile "hello, world" like so,
and found some major weirdness:

[sussman@newton:~/cprogs]$ cc hello.c -ldb
/usr/libexec/elf/ld: cannot open -ldb: No such file or directory
[sussman@newton:~/cprogs]$ cc hello.c -L/usr/local/lib -ldb
[sussman@newton:~/cprogs]$

Apparently /usr/local/lib isn't a default search path for my linker.
(What the heck!?!??) Anyway, is there some way to *explicitly*
include /usr/local/lib in the autoconf LIBS variable?

Like so?

    LIBS="$LIBS -L/usr/local/libs"

Or is LIBS meant for `-l' switches, not `-L' stuff?

Autoconf experts, please advise!
Received on Sat Oct 21 14:36:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.