Bug 3871 - configure doesn't handle solaris-vs-heimdal gssapi.h differences
Summary: configure doesn't handle solaris-vs-heimdal gssapi.h differences
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Domain Control (show other bugs)
Version: 3.0.9
Hardware: Other Solaris
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2006-06-27 07:45 UTC by David S. Collier-Brown
Modified: 2021-06-28 18:57 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description David S. Collier-Brown 2006-06-27 07:45:45 UTC
Bob Edgar wrote:
Trying to build on various Solaris versions sparc/(5.8 - 5.10)
I've run into a problem with gssapi.h seen by various people in
the past. The workaround is to comment out
 #define HAVE_GSSAPI_H 1
in config.h. Since this would seem to be a general problem I'm
wondering if it should simply defined off for Solaris?

I've copied in the original discussion from heimdal-discuss to
make it simpler to find if you decide not to change it.


>>It's a Samba bug.  I didn't look very close at your logs but
>>I ran into this a few days ago and will get it fixed.
>>The problem is that we are including Sun's <gssapi/gssapi.h>
>>and <gssapi.h> from heimdal.
>>The workaround is to comment out the '#define HAVE_HSSAPI_GSSAPI_H 1'

>from samba-VERSION/source/include/config.h after you run ./configure

>>but before you run make.
>>Hope this helps.  I'll try to get a proper fix in before


In my case it was HAVE_GSSAPI_H that needed to be comment out. 

/* Define to 1 if you have the <gssapi/gssapi.h> header file. */

/* Define to 1 if you have the <gssapi.h> header file. */
/* #define HAVE_GSSAPI_H 1 */

  I see this a lot when doing porting work: someone has a
version of a .h file that is used to override or replace a
similarly named file in /usr/include.
  It mysteriously doesn't work, until the author looks
at the source and notices he's said #include <foo.h>
instead of #include "foo.h".

In samba, config sets the define thusly:
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */

and it is put into the includes file thusly:
  File         Line
4 includes.h   479 #include <gssapi.h>
5 includes.h   481 #include <gssapi/gssapi.h>

  What you arguably need is a test to set HEIMDAL_HAVE_GSSAPI_GSSAPI_H
that overrides the system HAVE_GSSAPI_GSSAPI_H, and code to
- put #include "gssapi.h" into includes.h and
- put -I/path/to/heimdal into the compile options

  It's a small bug, but one that's really hard to notice, because
it's <> instead of "".  Sort of a fruit-fly (;-)) 

Comment 1 Björn Jacke 2021-06-28 18:57:27 UTC
I think this is not an issue with recent samba versions any more. At least I manages to compile it on Solaris 10 without running into this a while ago. Please reopen, if you disagree :-)