Solaris 8 and Cyrus compilation revisited...

Carson Gaspar carson at taltos.org
Wed Sep 7 18:44:49 EDT 2005


--On Wednesday, September 07, 2005 02:17:05 PM -0500 Alex Moen 
<alexm at ndtel.com> wrote:

> OK, I tried these patches, and get the exact same errors.  It looks to me
> like ld is having problems here... No matter what I do, I get the
> following errors:
>
> gcc -Wall -W -g -O2 -o .libs/sasldblistusers2 sasldblistusers.o
> ../lib/.libs/libsasl2.so -ldl -lresolv -lsocket -lnsl -lresolv -lsocket
> -L/usr/lib -ldb -lresolv -lsocket -lnsl ../sasldb/.libs/libsasldb.al
> -lresolv -lsocket -lresolv -lsocket -R/usr/lib
> Undefined symbol        first referenced in file
> db_strerror             ../sasldb/.libs/libsasldb.al(db_berkeley.lo)
> db_create               ../sasldb/.libs/libsasldb.al(db_berkeley.lo)
> ld: fatal: Symbol referencing errors. No output written to
> .libs/sasldblistusers2

Which ld are you using? /usr/ccs/bin/ld, or GNU ld? My tests were with 
/usr/ccs/bin/ld (and Sun Studio 10, not gcc). It looks like the ld you're 
using is order sensitive. Since your -ldb is before your libsasldb.al, the 
symbols aren't being resolved. If you added a trailing "-ldb" (or perhaps a 
trailing "-ldb -lsocket -lnsl"), it should link.

If this does fix your problem, the root cause is that sasldb/libsasldb.la 
is wrong. Perhaps changing sasldb/Makefile.am (or just hacking Makefile.in, 
as regenerating the libtool/automake/autoconf is painful...) so that:

libsasldb_la_LIBADD = $(SASL_DB_BACKEND)

becomes:

libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB)

would help? It does in my test.

-- 
Carson



More information about the Cyrus-sasl mailing list