[Dovecot] ./configure and /or Makefile problem

B.O.F.H. bofh at null-route.org
Mon Jun 12 17:25:23 EEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

This is on OpenBSD 3.x.

I'll fully admit not being a savvy programmer and therefore unable to
suggest a decent resolution.

It seems that _something_ in either the main "configure" script or
one of the Makefile.in templates is causing the Makefiles in
src/auth and src/util to add two variables named "AUTH_CFLAGS" and
"AUTH_LIBS", which on first look makes sense.

Looking a bit deeper, they both contain variables in the format
"@VARNAME@" which I'm presuming _should_ have been replaced with
actual paths and/or "-l" statements during the configure process.

Those being:

AUTH_CFLAGS =  -I at includedir@ @INCLUDE_des@
AUTH_LIBS =  -L at libdir@ -lgssapi -lkrb5 -lasn1 @LIB_des_appl@
- - -lroken @LIB_crypt@ @LIB_dbopen@ @LIBS@  -L/usr/local/lib -lpq
- - -L/usr/local/lib/mysql -lmysqlclient -lz -lm

Two issues become apparent:

1 - Somehow, the unexpanded "@" variables are making it to the
    command line
2 - "-lroken" is a Linux specific library and is not found in most
    *BSD's.  Generally configure scripts replace it with "-lcrypto"
    on host OS detection.

This can be displayed by looking at the errors for both auth and util:

Making all in auth
gmake[3]: Entering directory `/src/mail/dovecot-1.0.beta8/src/auth'
if gcc -DHAVE_CONFIG_H -I. -I. -I../..  -I../../src/lib
- - -I../../src/lib-sql -I../../src/lib-settings -I../../src/lib-ntlm
- - -DAUTH_MODULE_DIR=\""/usr/local/lib/dovecot/auth"\"
- - -DPKG_LIBEXECDIR=\""/usr/local/libexec/dovecot"\" -I at includedir@
@INCLUDE_des@ -I/usr/local/include -I/usr/include/kerberosV
- - -std=gnu99 -O2 -march=athlon -pipe -Wall -W -Wmissing-prototypes
- - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
- - -Wbad-function-cast  -MT mycrypt.o -MD -MP -MF ".deps/mycrypt.Tpo"
- - -c -o mycrypt.o mycrypt.c; \
then mv -f ".deps/mycrypt.Tpo" ".deps/mycrypt.Po"; else rm -f
".deps/mycrypt.Tpo"; exit 1; fi
gcc: cannot specify -o with -c or -S and multiple compilations
gmake[3]: *** [mycrypt.o] Error 1
gmake[3]: Leaving directory `/src/mail/dovecot-1.0.beta8/src/auth'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/src/mail/dovecot-1.0.beta8/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/src/mail/dovecot-1.0.beta8'
gmake: *** [all] Error 2

Making all in util
gmake[3]: Entering directory `/src/mail/dovecot-1.0.beta8/src/util'
if gcc -DHAVE_CONFIG_H -I. -I. -I../..  -I../../src/lib -
- - -I../../src/auth -I/usr/local/include -I/usr/include/kerberosV -
- - -std=gnu99 -O2 -march=athlon -pipe -Wall -W -Wmissing-prototypes -
- - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
- - - -Wbad-function-cast  -MT rawlog.o -MD -MP -MF ".deps/rawlog.Tpo"
- - -c - -o rawlog.o rawlog.c; \ then mv -f ".deps/rawlog.Tpo"
".deps/rawlog.Po"; else rm -f ".deps/rawlog.Tpo"; exit 1; fi /bin/sh
../../libtool --mode=link --tag=CC gcc  -std=gnu99 -O2 -
- - -march=athlon -pipe -Wall -W -Wmissing-prototypes
- - - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts
- - -Wformat=2 - -Wbad-function-cast   -L/usr/local/lib -o rawlog
rawlog.o ../lib/liblib.a
mkdir .libs
gcc -std=gnu99 -O2 -march=athlon -pipe -Wall -W -Wmissing-prototypes
- - - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts
- - -Wformat=2 - -Wbad-function-cast -o rawlog rawlog.o  -L/usr/local/lib
../lib/liblib.a if gcc -DHAVE_CONFIG_H -I. -I. -I../..
- - -I../../src/lib - -I../../src/auth -I/usr/local/include
- - -I/usr/include/kerberosV - -std=gnu99 -O2 -march=athlon -pipe -Wall
- - -W -Wmissing-prototypes - -Wmissing-declarations -Wpointer-arith
- - -Wchar-subscripts -Wformat=2 - -Wbad-function-cast  -MT gdbhelper.o
- - -MD -MP -MF ".deps/gdbhelper.Tpo" -c -o gdbhelper.o gdbhelper.c; \
then mv -f ".deps/gdbhelper.Tpo" ".deps/gdbhelper.Po"; else rm -f
".deps/gdbhelper.Tpo"; exit 1; fi /bin/sh ../../libtool --mode=link
- - --tag=CC gcc  -std=gnu99 -O2 - -march=athlon -pipe -Wall -W
- - -Wmissing-prototypes
- - - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts
- - -Wformat=2 - -Wbad-function-cast   -L/usr/local/lib -o gdbhelper
gdbhelper.o ../lib/liblib.a
gcc -std=gnu99 -O2 -march=athlon -pipe -Wall -W -Wmissing-prototypes
- - - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts
- - -Wformat=2 - -Wbad-function-cast -o gdbhelper gdbhelper.o
- - -L/usr/local/lib ../lib/liblib.a
if gcc -DHAVE_CONFIG_H -I. -I. -I../..  -I../../src/lib -
- - -I../../src/auth -I/usr/local/include -I/usr/include/kerberosV -
- - -std=gnu99 -O2 -march=athlon -pipe -Wall -W -Wmissing-prototypes -
- - -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
- - - -Wbad-function-cast  -MT dovecotpw.o -MD -MP -MF
".deps/dovecotpw.Tpo" -c -o dovecotpw.o dovecotpw.c; \ then mv -f
".deps/dovecotpw.Tpo" ".deps/dovecotpw.Po"; else rm -f
".deps/dovecotpw.Tpo"; exit 1; fi /bin/sh ../../libtool --mode=link
- - --tag=CC gcc  -std=gnu99 -O2 - -march=athlon -pipe -Wall -W
- - -Wmissing-prototypes - -Wmissing-declarations -Wpointer-arith
- - -Wchar-subscripts -Wformat=2 - -Wbad-function-cast
- - -L/usr/local/lib -o dovecotpw  dovecotpw.o ../auth/libpassword.a
../lib-ntlm/libntlm.a ../lib/liblib.a - -L at libdir@ -lgssapi -lkrb5
- - -lasn1 @LIB_des_appl@ -lroken @LIB_crypt@ @LIB_dbopen@ @LIBS@
- - -L/usr/local/lib -lpq -L/usr/local/lib/mysql
- - - -lmysqlclient -lz -lm  -export-dynamic ../../libtool[6473]: cd:
/src/mail/dovecot-1.0.beta8/src/util/@libdir@ - No such file or
directory
libtool: link: cannot determine absolute directory name of `@libdir@'
gmake[3]: *** [dovecotpw] Error 1
gmake[3]: Leaving directory `/src/mail/dovecot-1.0.beta8/src/util'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/src/mail/dovecot-1.0.beta8/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/src/mail/dovecot-1.0.beta8'
gmake: *** [all] Error 2

To get Dovecot to build, I manually went into both Makefiles, made
"AUTH_CFLAGS" empty and deleted all "@" references and "-lroken" in
"AUTH_LIBS" replacing them with "-lcrypto"

Once I did that, it built successfully and has not thrown any errors.

- --
Ed V.

Don't hit the keys so hard, it hurts.
12 June 2006 08:22:32
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iQIVAwUBRI15U6fRmhqF/IZAAQpxDBAA5eHEmclQjjQesfrz9cq5zkFeted+G5md
vDCQ65Q8QDD5yXdg0BKlc571JbFJjI2Rc7jGEGsokrgP895jOEHDMEaDbJ4CCX8h
r5IqFSmS9Hi/Uuyte1Aww7lLBnq0+yT9NcxzmYP0OYwGRM+EpYU5Z4/mwjgSmFcR
0qn/2WlmK+Q1kBD3S0IrtbOOUjLEFX+x+C5iomd0Ua05FuwtKSFFBBChNU9jOl3S
4ir9UVYJpd8pOikfghnPrSegoigjU4SsxcbvjFi3lfZUpJPY5oZZDNzRqh5/oJHc
PSwIl8as98RqQqtJsMzEwzT787pAD5zT5q+KAk+0jRPN5Qhc58lnDSQD2KBr9WPg
MeZmRivQAkK5LUePkSCGg+BqsiA6UJka5RF76nGfpi3boL7Uc6Q9OFYFHWny8g1T
dxrQvXW5//n6QyxTPliK9Nu3g7tspp07E6oBMSAhu6q7KF3l+ReARVPEpdjcgOqM
yz+rzk6a8NMTkXfsysvwm11EU6pvjgrJRpnVlLvYfbbIu0BDIVrr9J4iAXWvb6Ll
447S+DDf67rDxp0VscmCxQ1CrI8WK2mL/SGdnuJEcQvP2B1BurI01AcVNcUDfeNi
anHOX+b8OUkwbvjOecFMNEMg/GHN1Ckgd05vgG4o4u2IyBsA/a1cypNFHnwLFTxM
IRjupfBLxlE=
=y6WG
-----END PGP SIGNATURE-----


More information about the dovecot mailing list