Bug 210762 - net-fs/autofs-5.0.3-r1: build errors with app-crypt/heimdal-0.7.2-r3 in cyrus-sasl.c function sasl_do_kinit
Bug#: 210762 Product:  Gentoo Linux Version: 2007.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: stefaan@gentoo.org Reported By: Martin.vGagern@gmx.net
Component: Applications
URL: 
Summary: net-fs/autofs-5.0.3-r1: build errors with app-crypt/heimdal-0.7.2-r3 in cyrus-sasl.c function sasl_do_kinit
Keywords:  
Status Whiteboard: 
Opened: 2008-02-19 21:42 0000
Description:   Opened: 2008-02-19 21:42 0000
gcc -march=prescott -O2 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_REENTRANT
-D_FILE_OFFSET_BITS=64 -I../include -I../lib -fPIC -D_GNU_SOURCE
-DAUTOFS_LIB_DIR=\"/usr/lib/autofs\" -DAUTOFS_MAP_DIR=\"/etc/autofs\"
-DLDAP_DEPRECATED=1  -I/usr/include/libxml2 -DLDAP_THREAD_SAFE -c cyrus-sasl.c
cyrus-sasl.c: In function ‘sasl_do_kinit’:
cyrus-sasl.c:455: error: request for member ‘length’ in something not a
structure or union
cyrus-sasl.c:456: error: request for member ‘data’ in something not a
structure or union
cyrus-sasl.c:458: error: request for member ‘length’ in something not a
structure or union
cyrus-sasl.c:459: error: request for member ‘data’ in something not a
structure or union
make[1]: *** [cyrus-sasl.o] Error 1

Looking at the preprocessed output (gcc -E), these are the relevant parts of
the included header files.
/usr/include/krb5_asn1.h:18:typedef char *heim_general_string;
/usr/include/krb5_asn1.h:266:typedef heim_general_string Realm;
/usr/include/krb5.h:289:typedef Realm krb5_realm;
/usr/include/krb5-protos.h:2384:krb5_realm*
/usr/include/krb5-protos.h:2385:krb5_princ_realm (
/usr/include/krb5-protos.h:2386:        krb5_context /*context*/,
/usr/include/krb5-protos.h:2387:        krb5_principal /*principal*/);
They all come from the app-crypt/heimdal-0.7.2-r3 ebuild.

These are the USE flags used for related packages:
app-crypt/heimdal-0.7.2-r3 (X berkdb ipv6 ldap ssl)
dev-libs/cyrus-sasl-2.1.22-r2 (berkdb crypt gdbm java kerberos ldap mysql pam
postgres ssl -authdaemond -elibc_FreeBSD -ntlm_unsupported_patch -sample -srp
-urandom)

------- Comment #1 From Stefaan De Roeck 2008-04-28 13:26:05 0000 -------
Please see http://www.mail-archive.com/autofs@linux.kernel.org/msg06165.html.

It builds fine with mit-krb5.  I'm afraid I don't know enough about kerberos /
sasl / ... to fix this.  I would suggest you file a bug upstream.  It seems
like the autofs mailing list is the place to go.  

------- Comment #2 From Martin von Gagern 2008-04-28 15:14:53 0000 -------
Created an attachment (id=151247) [details]
Use krb5_realm_{length,data}

(In reply to comment #1)
> It builds fine with mit-krb5.  I'm afraid I don't know enough about kerberos /
> sasl / ... to fix this.

I just worte a proposed fix for this, which I would expect to work fine for
both mit-krb5 and heimdal. There are two macros called krb5_realm_length and
krb5_realm_data provided by the heimdal headers, and matching macros are easily
provided for MIT.

> I would suggest you file a bug upstream.  It seems
> like the autofs mailing list is the place to go.  

Just posted there, including my patch. I hope my message gets through without
me being subscribed to the list. If it does, I'll post a reference to the
archived thread here as the URL of this issue report.

------- Comment #3 From Stefaan De Roeck 2008-05-03 09:20:00 0000 -------
Thanks for the patch!  Now it builds with both heimdal and mit krb5.  It's been
included in autofs-5.0.3-r5.
Closing as fixed. 

------- Comment #4 From Martin von Gagern 2008-05-15 16:01:23 0000 -------
(In reply to comment #2)
> Just posted there, including my patch. I hope my message gets through without
> me being subscribed to the list. If it does, I'll post a reference to the
> archived thread here as the URL of this issue report.

My original post didn't make it. Now I subscribed and reposted the issue:
http://thread.gmane.org/gmane.linux.kernel.autofs/4203