gcc -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP_REALM=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_SYS_SELECT_H=1 -DRETSIGTYPE=void -DUSE_MASTER -DKRB5_KRB4_COMPAT -I../include -I./../include -I../include/krb5 -I./../include/krb5 -I./../include/kerberosIV -I../include/kerberosIV -I. -I. -c krb524d.c gcc -L../lib -Wl,-rpath -Wl,/usr/lib -o krb524d krb524d.o -lkadm5srv -lkdb5 ../lib/libdb.a -lgssrpc -ldyn -lgssapi_krb5 libkrb524.a -lkrb4 -lkrb5 -ldes425 -lk5crypto -lcom_err -lresolv ../lib/libdb.a(hash.o)(.text+0x3ad): In function `__kdb2_hash_open': : the use of `tmpnam' is dangerous, better use `mkstemp' ../lib/libkrb4.so: undefined reference to `errno' collect2: ld returned 1 exit status make[1]: *** [krb524d] Error 1 make[1]: Leaving directory `/var/tmp/portage/krb5-1.2.7/work/krb5-1.2.7/src/krb524' make: *** [all-recurse] Error 1 !!! ERROR: app-crypt/krb5-1.2.7 failed. !!! Function src_compile, Line 33, Exitcode 2 !!! (no error message) root@vapier src # grep 'extern.*errno' * -R appl/bsd/ChangeLog: declaration of errno altoghether. "extern int errno;" is appl/bsd/login.c:extern int errno; appl/gssftp/ftp/ftp_var.h:extern int errno; appl/gssftp/ftp/glob.c:extern int errno; appl/gssftp/ftpd/ftpd.c:extern int errno; appl/telnet/telnet/externs.h:extern int errno; /* outside this world */ appl/telnet/telnetd/telnetd.h:extern int errno; include/kerberosIV/krb.h:extern int errno; include/ss/ss.h:extern int errno; kadmin/dbutil/kdb5_destroy.c:extern int errno; kadmin/dbutil/kdb5_stash.c:extern int errno; kadmin/v4server/acl_files.c:extern int errno; kadmin/v4server/admin_server.c: extern int errno; kdc/kerberos_v4.c:extern int errno; kdc/network.c:extern int errno; lib/des425/quad_cksum.c:extern int errno; lib/des425/verify.c:extern int errno; lib/kadm5/srv/adb_policy.c:extern int errno; lib/kadm5/srv/server_dict.c:extern int errno; lib/krb4/ChangeLog: * sendauth.c: Remove unused "extern int errno;". lib/krb4/dest_tkt.c: extern int errno; lib/krb4/netread.c:extern int errno; lib/krb4/netwrite.c:extern int errno; lib/krb4/recvauth.c:extern int errno; lib/krb4/tf_util.c:extern int errno; lib/krb5/keytab/file/ktf_util.c:extern int errno; lib/krb5/keytab/srvtab/kts_util.c:extern int errno; lib/krb5/os/localaddr.c:extern int errno; lib/krb5/os/c_ustime.c:extern int errno; lib/krb5/os/timeofday.c:extern int errno; lib/krb5/posix/syslog.c: extern int errno; lib/krb5/rcache/rc_io.c:extern int errno; /* this should be in errno.h, but isn't on some systems */ lib/rpc/bindresvport.c: extern int errno; lib/rpc/clnt_tcp.c:extern int errno; lib/rpc/clnt_udp.c:extern int errno; lib/rpc/pmap_getmaps.c:extern int errno; lib/rpc/pmap_rmt.c:extern int errno; lib/rpc/svc.c:extern int errno; lib/rpc/svc_auth_gssapi.c:extern int errno; lib/rpc/svc_run.c: extern int errno; lib/rpc/svc_tcp.c:extern errno; lib/rpc/svc_udp.c:extern int errno; tests/dejagnu/t_inetd.c:extern int errno; util/db2/clib/mkstemp.c: extern int errno; util/db2/test/SEQ_TEST/mbox:extern int errno; util/db2/test/SEQ_TEST/mbox:extern int errno; util/db2/test/SEQ_TEST/t.c:extern int errno; util/et/compile_et.c:extern int errno; util/et/test_et.c:extern int sys_nerr, errno; util/ss/help.c:extern int errno; util/ss/pager.c:extern int errno; util/ss/ss.h:extern int errno;
Created attachment 8779 [details] Quick fix for krb5 & errno conflict This file contains two small scripts which "fix" the krb5 code so that it can be compiled with the newest glibc (~x86). The scripts replace "extern int errno" with "include <errno.h>" at the file level, and removes any "extern int errno" declarations inside functions. This is *not* a patch, but it could probably be used to create one fairly easily.
*** Bug 16646 has been marked as a duplicate of this bug. ***
*** Bug 17390 has been marked as a duplicate of this bug. ***
Applied the fix. Now it builds just fine. I didn't bump the revision since people that have already built it obviously don't need to build it again.
*** Bug 17691 has been marked as a duplicate of this bug. ***
actually, people *do* need to rebuild the package ... the old version will refer to an external integer and when they update their glibc, their krb will be broken
Ok, bumped to -r1
Should be fixed now.