With heimdal-1.3, testing for the usability of krb5/locate_plugin.h fails. checking for krb5.h... yes checking krb5/locate_plugin.h usability... no checking krb5/locate_plugin.h presence... yes configure: WARNING: krb5/locate_plugin.h: present but cannot be compiled configure: WARNING: krb5/locate_plugin.h: check for missing prerequisite headers? configure: WARNING: krb5/locate_plugin.h: see the Autoconf documentation configure: WARNING: krb5/locate_plugin.h: section "Present But Cannot Be Compiled" configure: WARNING: krb5/locate_plugin.h: proceeding with the preprocessor's result configure: WARNING: krb5/locate_plugin.h: in the future, the compiler will take precedence configure: WARNING: ## ---------------------------------------- ## configure: WARNING: ## Report this to samba-technical@samba.org ## configure: WARNING: ## ---------------------------------------- ## checking for krb5/locate_plugin.h... yes checking gssapi.h usability... yes checking gssapi.h presence... yes From discussion with the heimdal devs, this can be rectified by always including <krb5.h> before <krb5/locate_plugin.h>.
The same applies to including krb5-protos.h. This is detected only during build (resulting in a 8648 line error message...)
Ignore comment #1. It appears to be a completely unrelated build error.
Ok, we need to workaround the DEPRECATED handling for heimdal 1.3.1. This patch should make the build work for (and probably only for) newest heimdal releases: source3/libsmb/clikrb5.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 3da64d6..bacd0af 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -21,7 +21,7 @@ */ #define KRB5_PRIVATE 1 /* this file uses PRIVATE interfaces! */ -#define KRB5_DEPRECATED 1 /* this file uses DEPRECATED interfaces! */ +#define KRB5_DEPRECATED /* this file uses DEPRECATED interfaces! */ #include "includes.h"
That appears to make the build work (at least it now gets passed the main problem area), but does not fix the initial ./configure issue.
Created attachment 5011 [details] check for prerequisite krb5/krb5.h headers while checking for locate_plugin.h Does this resolve the other configure warning ?
Not quite. The default location for krb5.h with heimdal-1.3 is <krb5.h> and not <krb5/krb5.h>, although it is probably best to check for both for future compatibility. I adjusted that patch slightly: @@ -3350,7 +3350,15 @@ if test x"$with_ads_support" != x"no"; then CPPFLAGS=$ac_save_CPPFLAGS LDFLAGS=$ac_save_LDFLAGS fi - AC_CHECK_HEADERS(krb5/locate_plugin.h) + AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [], +[[#ifdef HAVE_KRB5_KRB5_H + #include <krb5/krb5.h> + #endif + #ifdef HAVE_KRB5_H + #include <krb5.h> + #endif +]]) + if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT" if test x"$BLDSHARED" = x"true" ; then and configure now works as expected: checking krb5.h usability... yes checking krb5.h presence... yes checking for krb5.h... yes checking krb5/krb5.h usability... no checking krb5/krb5.h presence... no checking for krb5/krb5.h... no checking for krb5/locate_plugin.h... yes That leaves this compiler error: Compiling ../nsswitch/pam_winbind.c Compiling localedir.c Linking shared library bin/pam_winbind.so Compiling ../nsswitch/winbind_krb5_locator.c In file included from ../nsswitch/winbind_krb5_locator.c:29: /usr/include/krb5/locate_plugin.h:50: error: expected declaration specifiers or ‘...’ before ‘*’ token /usr/include/krb5/locate_plugin.h:53: error: ‘krb5_error_code’ declared as function returning a function /usr/include/krb5/locate_plugin.h:58: error: expected ‘)’ before ‘void’ /usr/include/krb5/locate_plugin.h:59: error: expected ‘;’ before ‘void’ ... which is fixed by adding <krb5.h> or <krb5/krb5.h> as detected about the "#include <krb5/locate_plugin.h>" in nsswitch/winbind_krb5_locator.c
Created attachment 5016 [details] remaing patch for master
Created attachment 5017 [details] v3-4-test patch
Created attachment 5024 [details] patch for 3.4 (fixed version) This should fix all krb5 builds
Comment on attachment 5024 [details] patch for 3.4 (fixed version) looks good
Karolin, please pick for v3-4-test. Actually it is required for v3-3-test as well, oh well...
Pushed to v3-4-test.
Reassigning to Günther (waiting for a patch for v3-3-test).
Created attachment 5038 [details] patch for 3.3
Uploaded patch for 3-3-test, also added two other minor heimdal build warning patches (the first two in the patchlist).
(In reply to comment #15) > Uploaded patch for 3-3-test, also added two other minor heimdal build warning > patches (the first two in the patchlist). > Pushed. Closing out bug report. Thanks!
one hunk missing in v3-4-test patch.
Created attachment 5051 [details] v3-4-test missing patch
Karolin, please add that missing patch to v3-4-test (it is included in master and v3-3-test already).
(In reply to comment #19) > Karolin, please add that missing patch to v3-4-test (it is included in master > and v3-3-test already). > Pushed, closing out bug report. Thanks!