merging cifs-utils with USE=upcall fails with the following error: [...] cifs.upcall.c: In function 'cifs_krb5_principal_get_realm': cifs.upcall.c:83:2: warning: return discards 'const' qualifier from pointer target type [enabled by default] cifs.upcall.c: At top level: cifs.upcall.c:102:1: error: static declaration of 'krb5_auth_con_getsendsubkey' follows non-static declaration In file included from /usr/include/krb5.h:887:0, from cifs.upcall.c:37: /usr/include/krb5-protos.h:298:1: note: previous declaration of 'krb5_auth_con_getsendsubkey' was here cifs.upcall.c: In function 'get_tgt_time': cifs.upcall.c:165:3: warning: 'krb5_free_unparsed_name' is deprecated (declared at /usr/include/krb5-protos.h:1962) [-Wdeprecated-declarations] make[2]: *** [cifs.upcall.o] Error 1 make[2]: *** Waiting for unfinished jobs.... mount.cifs.c: In function 'add_mtab': mount.cifs.c:1607:12: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result] make[2]: Leaving directory `/var/tmp/paludis/net-fs-cifs-utils-5.4/work/cifs-utils-5.4' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/paludis/net-fs-cifs-utils-5.4/work/cifs-utils-5.4' make: *** [all] Error 2 Checking the mentioned header /usr/include/krb5-protos.h shows the function krb5_auth_con_getsendsubkey, checking heimdal sources, the function has it's implementation in lib/krb5/mit_glue.c, but when I check for the function in /usr/lib64/libkrb5.so it isn't there.
... ok, the symbol (besides others) is missing in lib/krb5/version-script.map and thus not exported.
Created attachment 315105 [details, diff] cifs.upcall.c.diff I am not sure if that wasn't intentional but I'll check with upstream. Heimdal 1.5.x versions have the mit-glue code and won't work (as you attested). Redefining the same function name in cifs.upcall is regrattable tho. Please check the attached patch for cifs-utils in the meantime.
The problem is that heimdal exports a symbol in its header files for which it doesn't provide an implementation, which is wrong. cifs-utils even checks in configure whether libkrb5.so implements it or not. So, either heimdal exports that symbol in the library (as expected when it appears in the header file) or it should be removed from the header.
Hey, I agree. No arguments from me. All I am saying is defining the function in your own namespace and calling the appropriate function in the kerberos library (what the patch does) is a better and future proof way of doing things for cifs-utils - no matter how this bug turns out. This is not the first such problem in heimdal. It only makes sense to code defensively.
+*heimdal-1.5.2-r1 (13 Jun 2012) + + 13 Jun 2012; Eray Aslan <eras@gentoo.org> +heimdal-1.5.2-r1.ebuild, + +files/heimdal_missing_symbols.patch: + Add missing symbols - bug #420821 +