PDA

View Full Version : Error code 1: /usr/bin/ld: cannot find -ldb


sf3978
06-28-2008, 10:57 AM
Hi,

I can't install the jabberd2 server. I try it with the databases db41, db46 and db47. The ports tree is up to date. My system is: FreeBSD 6.3 i386.
I get the following output:
XY# cd /usr/ports/net-im/jabberd
XY# pwd
/usr/ports/net-im/jabberd
XY# make install clean
===> Building for jabberd-2.2.0_2
make all-recursive
Making all in etc
Making all in templates
Making all in tools
Making all in man
Making all in mio
Making all in subst
Making all in sx
Making all in util
Making all in c2s
Making all in router
Making all in s2s
Making all in sm
Making all in storage
/bin/sh ../libtool --tag=CC --mode=link cc -O2 -pipe -fno-strict-aliasing -funsigned-char -module -avoid-version -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -rpath=/usr/local/lib -o authreg_db.la -rpath /usr/local/lib/jabberd authreg_db.lo -lutil -lexpat -L../util -ldb -lssl -lcrypto -lgsasl -ludns -lidn -lexpat -lz
cc -shared .libs/authreg_db.o -Wl,--whole-archive /tmp/usr/ports/net-im/jabberd/work/jabberd-2.2.0/util/.libs/libutil.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -L/usr/lib /usr/local/lib/libntlm.so -lgssapi -lkrb5 -lasn1 -lroken -lcrypt -lcom_err /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -L/tmp/usr/ports/net-im/jabberd/work/jabberd-2.2.0/util -ldb -lssl -lcrypto /usr/local/lib/libgsasl.so -ludns /usr/local/lib/libidn.so /usr/local/lib/libexpat.so -lz -Wl,-soname -Wl,authreg_db.so -o .libs/authreg_db.so
/usr/bin/ld: cannot find -ldb
*** Error code 1

Stop in /tmp/usr/ports/net-im/jabberd/work/jabberd-2.2.0/storage.
*** Error code 1

Stop in /tmp/usr/ports/net-im/jabberd/work/jabberd-2.2.0.
*** Error code 1

Stop in /tmp/usr/ports/net-im/jabberd/work/jabberd-2.2.0.
*** Error code 1

Stop in /usr/ports/net-im/jabberd.
XY#
Anyone have a sugestion. Thank you.

Jehan
06-28-2008, 02:00 PM
There are 2 possible reasons about such an error:

1/ you are missing a library... apparently called libdd. A search on the web gave me this: http://sourceforge.net/projects/libdb . But I am really not sure this is it because I don't see such a requirement in jabberd2 (yet it deals bout "storage" and you were compiling something labbeled storage!).

2/ you have the right library (did you passed well the configure script if there has been one?!) but you don't have your path well set. For this you have several means to do it. One of them is to use the -L option of the compiler (using make, I think you can do this stuff of things...).

Anyway there are some hints to search for, but I have no time to diagnose further. I have to go.
Bye.

sf3978
06-29-2008, 12:15 AM
Hi,

thanks for the answer. This are the db-libraries on my system:
/usr/local/lib/libdb41.so.1
/usr/local/lib/libdb41.so
/usr/local/lib/libdb41_cxx.so.1
/usr/local/lib/libdb41_cxx.so
/usr/local/lib/libdb41.a
/usr/local/lib/libdb41_cxx.a
/usr/local/lib/db46/libdb-4.6.so.0
/usr/local/lib/db46/libdb-4.6.so
/usr/local/lib/db46/libdb-4.6.la
/usr/local/lib/db46/libdb_cxx-4.6.so.0
/usr/local/lib/db46/libdb_cxx-4.6.so
/usr/local/lib/db46/libdb_cxx-4.6.la
/usr/local/lib/db46/libdb-4.6.a
/usr/local/lib/db46/libdb.a
/usr/local/lib/db46/libdb_cxx-4.6.a
/usr/local/lib/db46/libdb_cxx.a
/usr/local/lib/db46/libdb.so
/usr/local/lib/db46/libdb-4.so
/usr/local/lib/db46/libdb_cxx.so
/usr/local/lib/db46/libdb_cxx-4.so
/usr/local/lib/libdb-4.6.so.0
/usr/local/lib/libdb-4.6.so
/usr/local/lib/libdb_cxx-4.6.so.0
/usr/local/lib/libdb_cxx-4.6.so
The configure script is the Makefile (section) from the port:
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
gsasl.11:${PORTSDIR}/security/gsasl \
idn.16:${PORTSDIR}/dns/libidn \
udns.0:${PORTSDIR}/dns/udns

OPTIONS= MYSQL "Support MySQL (storage/auth/reg)" off \
POSTGRESQL "Support PostgreSQL (storage/auth/reg)" off \
LDAP "Support OpenLDAP (storage/auth/reg)" off \
BDB "Support BerkeleyDB (storage/auth/reg)" on \
SQLITE "Support SQLite3 (storage/auth/reg)" off \
PAM "Enable PAM (auth/reg)" off \
PIPE "Enable pipe (auth/reg)" off \
ANON "Enable anonymous (auth/reg)" off \
FS "Filesystem storage (only for testing)" off \
DEBUG "Compile with debug messages" off \
REQUIRES "Add backend requires to startup script" on

GNU_CONFIGURE= yes
USE_PERL5_RUN= yes
USE_OPENSSL= yes
USE_ICONV= yes
USE_RC_SUBR= jabberd
USE_LDCONFIG= ${PREFIX}/lib/jabberd
CONFIGURE_ARGS+= --localstatedir=/var \
--sysconfdir=${PREFIX}/etc/jabberd \
--enable-ssl --enable-mio=poll \
--with-extra-include-path="${LOCALBASE}/include ${EIP}" \
--with-extra-library-path="${LOCALBASE}/lib ${ELP}"
The environment variable LOCALBASE is set to /usr/local

sf3978
06-29-2008, 09:21 AM
Hi,

Now I installed the jabberd14-1.6.1.1-server with data storage in the mysql database. It works perfect on FreeBSD 6.3R.
Thanks for the help.