Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32371 - cyrus-sasl-2.1.15 fails to compile
Summary: cyrus-sasl-2.1.15 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-31 02:50 UTC by Andreas Simon
Modified: 2004-01-15 13:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Simon 2003-10-31 02:50:33 UTC
cyrus-sasl fails to compile because of linker errors.
Here the error output:

...
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../plugins    -Wall -W -Wall -march=athlon-xp -O2 -pipe -c dlopen.c
rm -f plugin_common.o
ln -s ../plugins/plugin_common.o plugin_common.o
rm -f plugin_common.lo
ln -s ../plugins/plugin_common.lo plugin_common.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../plugins -Wall -W -Wall -march=athlon-xp -O2 -pipe -Wp,-MD,.deps/dlopen.pp -c dlopen.c  -fPIC -DPIC -o dlopen.lo
/bin/sh ../libtool --mode=link gcc  -Wall -W -Wall -march=athlon-xp -O2 -pipe -L/usr/local/lib -Wl,-rpath,/usr/local/lib  -o libsasl2.la -rpath /usr/lib -version-info 2:15:0 auxprop.lo canonusr.lo checkpw.lo client.lo common.lo config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo dlopen.lo plugin_common.lo -ldl -lresolv  -lresolv
mkdir .libs
rm -fr .libs/libsasl2.la .libs/libsasl2.* .libs/libsasl2.*
../libtool: line 2779: test: =: unary operator expected
../libtool: line 3078: test: =: unary operator expected
(cd . && ln -s auxprop.lo auxprop.o)
(cd . && ln -s canonusr.lo canonusr.o)
(cd . && ln -s checkpw.lo checkpw.o)
(cd . && ln -s client.lo client.o)
(cd . && ln -s common.lo common.o)
(cd . && ln -s config.lo config.o)
(cd . && ln -s external.lo external.o)
(cd . && ln -s md5.lo md5.o)
(cd . && ln -s saslutil.lo saslutil.o)
(cd . && ln -s server.lo server.o)
(cd . && ln -s seterror.lo seterror.o)
(cd . && ln -s dlopen.lo dlopen.o)
gcc -shared  auxprop.lo canonusr.lo checkpw.lo client.lo common.lo config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo dlopen.lo plugin_common.lo  -L/usr/local/lib -ldl -lresolv  -Wl,-soname -Wl,libsasl2.so.2 -o .libs/libsasl2.so.2.0.15
(cd .libs && rm -f libsasl2.so.2 && ln -s libsasl2.so.2.0.15 libsasl2.so.2)
(cd .libs && rm -f libsasl2.so && ln -s libsasl2.so.2.0.15 libsasl2.so)
creating libsasl2.la
(cd .libs && rm -f libsasl2.la && ln -s ../libsasl2.la libsasl2.la)
make[2]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15/lib'
Making all in utils
make[2]: Entering directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15/utils'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include     -Wall -W -Wall -march=athlon-xp -O2 -pipe -c dbconverter-2.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include     -Wall -W -Wall -march=athlon-xp -O2 -pipe -c saslpasswd.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include     -Wall -W -Wall -march=athlon-xp -O2 -pipe -c sasldblistusers.c
/bin/sh ../libtool --mode=link gcc  -Wall -W -Wall -march=athlon-xp -O2 -pipe -L/usr/local/lib -Wl,-rpath,/usr/local/lib  -o dbconverter-2  dbconverter-2.o ../sasldb/libsasldb.la ../lib/libsasl2.la -ldb-4.0 -lresolv  -lresolv
/bin/sh ../libtool --mode=link gcc  -Wall -W -Wall -march=athlon-xp -O2 -pipe -L/usr/local/lib -Wl,-rpath,/usr/local/lib  -o sasldblistusers2  sasldblistusers.o ../sasldb/libsasldb.la ../lib/libsasl2.la -ldb-4.0 -lresolv  -lresolv
mkdir .libs
gcc -Wall -W -Wall -march=athlon-xp -O2 -pipe -Wl,-rpath -Wl,/usr/local/lib -o .libs/sasldblistusers2 sasldblistusers.o  -L/usr/local/lib ../sasldb/.libs/libsasldb.al ../lib/.libs/libsasl2.so -ldl /usr/lib/libdb-4.0.so -lpthread -lresolv
gcc -Wall -W -Wall -march=athlon-xp -O2 -pipe -Wl,-rpath -Wl,/usr/local/lib -o .libs/dbconverter-2 dbconverter-2.o  -L/usr/local/lib ../sasldb/.libs/libsasldb.al ../lib/.libs/libsasl2.so -ldl /usr/lib/libdb-4.0.so -lpthread -lresolv
dbconverter-2.o(.text+0x169): In function `berkeleydb_open':
: undefined reference to `db_create_4001'
dbconverter-2.o(.text+0x234): In function `berkeleydb_close':
: undefined reference to `db_strerror_4001'
dbconverter-2.o(.text+0x48b): In function `listusers':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x70): In function `berkeleydb_open':
: undefined reference to `db_create_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x95): In function `berkeleydb_open':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x1d5): In function `berkeleydb_close':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x3f3): In function `_sasldb_getdata':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x625): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x6a3): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4001'
collect2: ld returned 1 exit status
make[2]: *** [dbconverter-2] Error 1
make[2]: *** Waiting for unfinished jobs....
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x70): In function `berkeleydb_open':
: undefined reference to `db_create_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x95): In function `berkeleydb_open':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x1d5): In function `berkeleydb_close':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x3f3): In function `_sasldb_getdata':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x625): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4001'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x6a3): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4001'
collect2: ld returned 1 exit status
make[2]: *** [sasldblistusers2] Error 1
make[2]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15'
make: *** [all-recursive-am] Error 2

!!! ERROR: dev-libs/cyrus-sasl-2.1.15 failed.
!!! Function src_compile, Line 104, Exitcode 2
!!! compile problem



# emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.6.0-test8-mm1)
=================================================================
System uname: 2.6.0-test8-mm1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.3.11
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox fixpackages"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 oss apm avi encode foomaticdb kde libg++ mikmod mpeg ncurses nls pdflib spell xmms xv gdbm berkdb slang readline tcltk java sdl gpm libwww perl python imlib motif cdr 3dnow alsa arts artswrappersuid crypt cups dvb dvd gif gnome gstreamer gtk gtk2 imap ipv6 jpeg lcms mad maildir mmx mozilla mule nptl oggvorbis offensive opengl pam pic png qt quicktime sasl sse ssl -svga tcpd tetex threads tiff truetype X xml2 zlib esd"


# qpkg -I -v sys-libs/db|sort
sys-libs/db-1.85-r1 *
sys-libs/db-3.2.9-r10 *
sys-libs/db-4.0.14-r2 *
sys-libs/db-4.1.25_p1-r2 *



This is from cyrus-sasl's configure phase:

checking DB path to use... /etc/sasl2/sasldb2
checking for db.h... yes
checking for db_create_4000 in -ldb-4.1... no
checking for db_create_4001 in -ldb-4.1... no
checking for db_create_4000 in -ldb4.1... no
checking for db_create_4001 in -ldb4.1... no
checking for db_create_4000 in -ldb41... no
checking for db_create_4001 in -ldb41... no
checking for db_create_4000 in -ldb-4.0... yes
checking DB library to use... berkeley
checking for dlopen in -ldl... yes


So, it doesn't find any symbol db_create_4001 during configure, but
in the linker error message above there is an unresolved reference to this symbol.
Comment 1 Lourdes Jones 2003-11-03 02:42:55 UTC
The default headers are from 4.1 which failed your tests for db_create_400x.

4.0 passed the test so it's include files need to be the ones used. So....

Edited the ebuild and change 
--
        if use berkdb; then
                myconf="${myconf} --with-dblib=berkeley" 
-- 
to
--
        if use berkdb; then
                myconf="${myconf} --with-dblib=berkeley --with-bdb-libdir=/usr/lib
--with-bdb-incdir=/usr/include/db4"
--

And the compile should succeed.
Comment 2 Andreas Simon 2003-11-03 03:09:26 UTC
This doesn't work. With the change I get this during configure

checking for db.h... yes
checking for db_create_4000 in -ldb-4.1... no
checking for db_create_4001 in -ldb-4.1... yes
checking DB library to use... berkeley

but then again

...
/bin/sh ../libtool --mode=link gcc  -Wall -W -Wall -march=athlon-xp -O2 -pipe
-L/usr/local/lib -Wl,-rpath,/usr/local/lib  -o sasldblistusers2  sasldblistusers.o
../sasldb/libsasldb.la ../lib/libsasl2.la -L/usr/lib  -Wl,-rpath,/usr/lib
-ldb-4.1 -lresolv  -lresolv
mkdir .libs
gcc -Wall -W -Wall -march=athlon-xp -O2 -pipe -Wl,-rpath -Wl,/usr/local/lib
-o .libs/dbconverter-2 dbconverter-2.o -Wl,-rpath -Wl,/usr/lib  -L/usr/local/lib
../sasldb/.libs/libsasldb.al ../lib/.libs/libsasl2.so -ldl -L/usr/lib /usr/lib/libdb-4.1.so
-lpthread -lresolv
dbconverter-2.o(.text+0x169): In function `berkeleydb_open':
: undefined reference to `db_create_4000'
dbconverter-2.o(.text+0x224): In function `berkeleydb_close':
: undefined reference to `db_strerror_4000'
dbconverter-2.o(.text+0x47b): In function `listusers':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x70): In function `berkeleydb_open':
: undefined reference to `db_create_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x95): In function `berkeleydb_open':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x1d5): In function `berkeleydb_close':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x3f3): In function `_sasldb_getdata':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x625): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x6a3): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4000'
collect2: ld returned 1 exit status
make[2]: *** [dbconverter-2] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc -Wall -W -Wall -march=athlon-xp -O2 -pipe -Wl,-rpath -Wl,/usr/local/lib
-o .libs/sasldblistusers2 sasldblistusers.o -Wl,-rpath -Wl,/usr/lib  -L/usr/local/lib
../sasldb/.libs/libsasldb.al ../lib/.libs/libsasl2.so -ldl -L/usr/lib /usr/lib/libdb-4.1.so
-lpthread -lresolv
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x70): In function `berkeleydb_open':
: undefined reference to `db_create_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x95): In function `berkeleydb_open':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x1d5): In function `berkeleydb_close':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x3f3): In function `_sasldb_getdata':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x625): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4000'
../sasldb/.libs/libsasldb.al(db_berkeley.lo)(.text+0x6a3): In function `_sasldb_putdata':
: undefined reference to `db_strerror_4000'
collect2: ld returned 1 exit status
make[2]: *** [sasldblistusers2] Error 1
make[2]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.15/work/cyrus-sasl-2.1.15'
make: *** [all-recursive-am] Error 2

!!! ERROR: dev-libs/cyrus-sasl-2.1.15 failed.
!!! Function src_compile, Line 104, Exitcode 2
!!! compile problem




But changing

--
        if use berkdb; then
                myconf="${myconf} --with-dblib=berkeley" 
-- 
to
--
        if use berkdb; then
                myconf="${myconf} --with-dblib=berkeley --with-bdb-libdir=/usr/lib
--with-bdb-incdir=/usr/include/db4.1"
--

did work (incdir=db4.1 not db4).
Comment 3 Max Kalika (RETIRED) gentoo-dev 2003-11-03 06:59:43 UTC
I have a patch for cyrus-imapd that may apply in this case.  Will try and
report back.
Comment 4 Lourdes Jones 2003-11-04 03:55:01 UTC
Hmm, looks like something changed :) If you see the check results the first
time db4.1 failed and db4.0 succeeded, so I suggested you set for 4.0.  After
you made the change for some reason db4.1 succeed and db4.0 failed so you
did the right thing to set for db4.1.

At any rate the include files need to be set to match the db version that
passed the test.  Right now, the configuration is not setup to do this. 
Comment 5 Andreas Simon 2003-11-19 02:48:49 UTC
I can no longer reproduce the problem.
If nobody else can, I suggest to close the bug.

Maybe a change to the db ebuild in the meantime fixed the issue, maybe something else, I dunno, but the problem is gone.
Comment 6 Max Kalika (RETIRED) gentoo-dev 2004-01-15 13:45:06 UTC
Closing, thanks.