In preparation of Cyrus IMAP 2.5: autoconf and automake
Carson Gaspar
carson at taltos.org
Sat Apr 28 14:39:59 EDT 2012
The below is on Solaris 11 using the studio compiler, using the snapshot
from the URL below.
On 4/28/12 9:15 AM, Jeroen van Meeuwen (Kolab Systems) wrote:
> http://git.cyrusimap.org/cyrus-imapd/snapshot/cyrus-imapd-2.5-snapshot-autoconf-and-automake.tar.gz
>
> The canonical build process we think applies, generally speaking, is:
>
> $ autoreconf -v
Nope.
carson:gandalf 0 SOL$ autoreconf -v
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I cmulocal
/usr/local/share/aclocal/gtk.m4:7: warning: underquoted definition of
AM_PATH_GTK
/usr/local/share/aclocal/gtk.m4:7: run info '(automake)Extending aclocal'
/usr/local/share/aclocal/gtk.m4:7: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running:
/Tools/SunOS_5.11_i86pc_amd64/autoconf-2.68/bin/autoconf
autoreconf: running:
/Tools/SunOS_5.11_i86pc_amd64/autoconf-2.68/bin/autoheader
autoreconf: running: automake --no-force
configure.ac:105: required file `./compile' not found
configure.ac:105: `automake --add-missing' can install `compile'
configure.ac:55: required file `./missing' not found
configure.ac:55: `automake --add-missing' can install `missing'
Makefile.am: required file `./depcomp' not found
Makefile.am: `automake --add-missing' can install `depcomp'
configure.ac: required file `./ylwrap' not found
configure.ac: `automake --add-missing' can install `ylwrap'
autoreconf: automake failed with exit status: 1
If I run automake --add-missing and re-run autoreconf, it works.
I also see:
OPENSSL_LIB = -L/Tools/SunOS_5.11_i86pc_amd64/openssl-1.0.0f-aesni/lib
-L/Tools/SunOS_5.11_i86pc_amd64/openssl-1.0.0f-aesni/lib
-R/Tools/SunOS_5.11_i86pc_amd64/openssl-1.0.0f-aesni/lib
Something is adding the openssl -L flag twice. LDFLAGS only has it once.
lib/auth_krb5.c fails to build, because autofoo does absolutely nothing
to find krb5.h:
"lib/auth_krb5.c", line 60: cannot find include file: <krb5.h>
The only configure options I see are for krb4.
If I manually fix the krb5 problem, I get to:
"imap/append.c", line 431: syntax error before or at: 1
using "sun" as a variable isn't the best choice of variable names ;-)
Adding '-Xc' to the sun studio compiler to keep it from polluting the
namespace would fix that, but would also undefine __FUNCTION__ causing
the build to fail on the snmp bits. So I renamed all instances of "sun"
to "mysun" in imap/append.c and imap/idlemsg.c.
Undefined first referenced
symbol in file
krb5_free_principal lib/libcyrus.a(auth_krb5.o)
krb5_realm_compare lib/libcyrus.a(auth_krb5.o)
krb5_build_principal lib/libcyrus.a(auth_krb5.o)
uuid_unparse_lower imap/libimap.a(mailbox.o)
krb5_get_default_realm lib/libcyrus.a(auth_krb5.o)
krb5_parse_name lib/libcyrus.a(auth_krb5.o)
krb5_init_context lib/libcyrus.a(auth_krb5.o)
krb5_free_context lib/libcyrus.a(auth_krb5.o)
krb5_unparse_name lib/libcyrus.a(auth_krb5.o)
So not only is autofoo not bothering to find the header file, it isn't
adding the krb5 libs, either! How on earth does this link for anyone?!
Manually adding LIBS='-lkrb5' to configure fixes all but the uuid problem.
Solaris 11 has libuuid, but libuuid only has libuuid_unparse, not
libuuid_unparse_lower. configure only checks for uuid_generate (which is
present). I forced it to fail the uuid check by passing
ac_cv_lib_uuid_uuid_generate=no to configure.
With the above changes, it correctly compiles and links, and spot
checking it appears RPATH is correctly set everywhere.
--
Carson
More information about the Cyrus-devel
mailing list