Compilation problem of latest BETA with FreeBSD 4.0 and Berkeley DB 3.0

Russ Allbery rra at
Wed May 17 01:50:31 UTC 2000

Jaye Mathisen <mrcpu at> writes:

> gcc -g -O2 -I../include    -c tcl.c
> gcc -g -O2 -I../include   -c timer.c
> gcc -g -O2 -I../include   -c wip.c
> gcc  -L/usr/local/BerkeleyDB.3.0/lib -o innd art.o cc.o chan.o his.o icd.o
> innd.o lc.o nc.o  newsfeeds.o ng.o perl.o proc.o python.o rc.o site.o
> status.o tcl.o timer.o wip.o ../storage/libstorage.a ../lib/libinn.a -ldb
> ../lib/perl.o -Wl,-R/usr/lib -Wl,-E -lperl -lm
> /usr/libdata/perl/5.00503/mach/auto/DynaLoader/DynaLoader.a
> -L/usr/libdata/perl/5.00503/mach/CORE -lperl -lm -lc -lperl -lm  -lutil
> -lcrypt 
> /usr/libexec/elf/ld: cannot open -ldb: No such file or directory
> *** Error code 1

The -ldb that INN is trying to link against here is due to the Perl
dependency; it's the Berkeley db library that Perl was linked against
(probably version 1).  Perl relinks any application that embeds Perl
against all the shared libraries that Perl links against to deal with
platforms that don't support dependencies in shared libraries.

It's quite possible that FreeBSD supports dependencies in shared libraries
correctly, in which case you may be able to just leave off -ldb from the
link line.

Russ Allbery (rra at             <>

More information about the inn-bugs mailing list