Bug 152 - fix build with krb5 libs but no krb5.h
fix build with krb5 libs but no krb5.h
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
All other
: P2 normal
: none
Assigned To: Tim Potter
Depends on:
  Show dependency treegraph
Reported: 2003-06-10 07:33 UTC by Stefan Metzmacher
Modified: 2005-08-24 10:17 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2003-06-10 07:33:00 UTC
we should not try to compile and link against krb5 libs if there's no krb5.h 

Comment 1 Jim McDonough 2003-06-17 07:16:44 UTC
What exactly is the problem here?  Is it not building at all, or is it just not
building with kerberos? 
Comment 2 Stefan Metzmacher 2003-06-22 05:24:01 UTC
the problem is that we check for krb5.h 
but didn't check the result of this test.

then we maynot have HAVE_KRB5_H defined, but continue
with the krb5.,etc lib tests

and if we found -lkrb5 we define HABE_KRB5

then we try to build with kerberos support.

- we try to link the krb5,gssapi,etc. libs and don't have krb5 support compiled 

see this mails:

Comment 3 Tim Potter 2003-06-22 18:36:00 UTC
I've fixed the indentation of the Kerberos autoconf detection code in
configure.in as it was impossible to work out what actually happening.

Also, I've applied the gist of your patch but as Jelmer suggested not introduced
an additional level of indentation.  The message produced when krb5.h is not
found is now an error as the user has specified they want AD support and will
not get it.  No-one reads the output of configure unless it doesn't work so a
warning in this case would be useless.
Comment 4 Stefan Metzmacher 2003-06-22 22:35:11 UTC
Your patch broke all builds on hosts without krb5.h !

we should only use AC_MSG_ERR when --with-ads is specified!

and AC_MSG_WARN when --with-ads is NOT specified!

and when we warn don't link to any krb5 lib!

Comment 5 Tim Potter 2003-06-23 22:33:12 UTC
Now that I have restored my development system after accidentally trashing the
root filesystem, I've checked in my fix for this.  It should satisfy all the

 - die if ADS support requested and no krb5.h
 - don't update LIBS or CFLAGS if ADS support not possible/requested

Metze, let me know how it goes.
Comment 6 Tim Potter 2003-06-24 05:46:10 UTC
Jim, I think I know how to describe this bug - install the krb5-lib RPM but not
the krb5-devel package!

It's similar to the pam problem.  You must have the devel package installed as
well as the library to build Samba.
Comment 7 Jim McDonough 2003-06-24 09:50:36 UTC
Does that mean you're saying you _must_ have the krb5-devel installed if you
have the krb5-libs package installed?  Or are you just re-stating the original
Comment 8 Tim Potter 2003-06-24 17:07:27 UTC
Both.  (-:

You must have krb5-libs and krb5-devel which is also a restatement of the
problem.    I was having trouble understanding the rationale for this bug until
I thought of this.
Comment 9 Gerald (Jerry) Carter 2005-02-07 08:38:51 UTC
originally reported against 3.0.0beta1.  CLeaning out 
non-production release versions.
Comment 10 Gerald (Jerry) Carter 2005-08-24 10:17:57 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.