[Dovecot] Error building on OpenBSD 3.9

B.O.F.H. bofh at null-route.org
Thu Jun 8 23:58:56 EEST 2006


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

Well, a bit more research and I think I found the symptom.  Still
not sure of the cause and I'll fully admit not being a savvy
programmer and therefore able 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.

8 June 2006 14:58:10


Brad wrote:
> What crash? or do you mean it fails to compile? If it still fails to
> compile using the ports tree version of Dovecot as is then you have
> a problem with your system itself.
> 
> 
> On Wed, Jun 07, 2006 at 06:52:24PM -0600, B.O.F.H. wrote:
> Actually, from the OpenBSD 3.9 ports tree, the version is 1.0b3 and
> it crashes the same way...
> 
> I'm semi-willing to read the GCC man page, can you give me at least
> a small hint as to where to start looking?
> 
> --
> Ed V.
> 
> 7 June 2006 18:51:04
> 
> 
> Chris Cappuccio wrote:
>>>> You have two choices, you can either
>>>>
>>>> 1. Use the port
>>>>
>>>> or 
>>>>
>>>> 2. Read the gcc manual page
>>>>
>>>> B.O.F.H. [bofh at null-route.org] wrote:
>>>> This is for all versions from 1.0b3 - 1.0b8
>>>>
>>>> All crash at the same place:
>>>>
>>>> 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
>>>>
>>>> Gnu-make versus BSD make doesn't differ.
>>>>
>>>> Compile options were:
>>>>
>>>> ./configure \
>>>> --sysconfdir=/etc/dovecot \
>>>> --localstatedir=/var \
>>>> --infodir=/usr/share/info \
>>>> --mandir=/usr/share/man \
>>>> --disable-rpath \
>>>> --enable-ipv6 \
>>>> --enable-asserts \
>>>> --without-shadow \
>>>> --without-pam \
>>>> --without-vpopmail \
>>>> --with-pgsql \
>>>> --with-mysql \
>>>> --with-ssl=openssl \
>>>> --with-ssldir=/etc/ssl \
>>>> --with-storages='maildir mbox' \
>>>> --with-sql-drivers \
>>>> CFLAGS='-O2 -march=athlon -pipe' \
>>>> LDFLAGS='-L/usr/local/lib' \
>>>> CPPFLAGS='-I/usr/local/include -I/usr/include/kerberosV'
>>>>
>>>> What other data can I provide to help figure out what's going wrong?
>>>>
>>
>>
>>

> !DSPAM:448777a798481207920780!


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iQIVAwUBRIiPj6fRmhqF/IZAAQqhpw/7Bf+SUB/O1V4uYWNik/h2pvikf9K+7zO/
040aw4W3yyIsW9ER1BnV9XgGvhUxeDyR095ZTaFORX/iVcTtNYtu++fb2sIujmGT
EJffOvh/Lpb6G9cxTD47uifXR/9yPKGUnISBH3UxkB80DFK+DNWBW8buAbxlS5sK
g7NpuRev7AVDDkI7/ybpjTl+OEUeMRl1CW0EsxPsw6rc8nu4s9CQoTa2LeYZCjY6
L1Y5ODxjzFYkmN8rGV4s5NkPIwzTCjFNeYr41rVLSZ4ggwZ8TqXQR5eTZFgBYMcr
KCv2y5y2PHn2JJnQTKyaCUeBROsRKfkaXOicggAqyaxSpq0943NktnA1y9K66MtD
u0zUkH1Lae1rZOmiWJmJvxHd3MLfbwhpULfYMy38epIHfQIPT8wLxpbOZ5cQdUel
Q+9MGafmHsYzZRTGByB3OV5sbFZ7pczq1wDdKJgTfXLIpbgbGLRQRs/3KWms0zn2
6thHO9wFhUpts7uXCjNJUQE023sjyT0e88cXae23IVQ8aiPrLFXhQngTsDPnpzxg
4wjvpnp4hjtf2h0zrNKt3Hzlb+l3JcYslU7aF7MCgh3pmt+Kd5UdJKzVD9x7fnxN
kapbfDSbV+SkrGn61qj4UQxFisJ06J4Sc6xPYPYnCXgUC/til4V4H5nv8YBJO23X
anXZ2jvrNsc=
=jODg
-----END PGP SIGNATURE-----


More information about the dovecot mailing list