In preparation of Cyrus IMAP 2.5: autoconf and automake

Carson Gaspar carson at
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:
> The canonical build process we think applies, generally speaking, is:
> $ autoreconf -v


carson:gandalf 0 SOL$ autoreconf -v
autoreconf: Entering directory `.'
autoreconf: not using Gettext
autoreconf: running: aclocal -I cmulocal
/usr/local/share/aclocal/gtk.m4:7: warning: underquoted definition of 
/usr/local/share/aclocal/gtk.m4:7:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/gtk.m4:7:   or see
autoreconf: tracing
autoreconf: not using Libtool
autoreconf: running: 
autoreconf: running: 
autoreconf: running: automake --no-force required file `./compile' not found   `automake --add-missing' can install `compile' required file `./missing' not found   `automake --add-missing' can install `missing' required file `./depcomp' not found   `automake --add-missing' can install `depcomp' required file `./ylwrap' not found   `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 

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.


More information about the Cyrus-devel mailing list