[Samba] Problems compiling 3.0.20a with heimdal 0.7

Jeremy Allison jra at samba.org
Mon Oct 3 16:19:15 GMT 2005


On Sat, Oct 01, 2005 at 11:19:52AM +0200, Harry Rüter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi everybodey,
> 
> i can't compile 3.0.20 the following message occurs :
> 
> Compiling dynconfig.c
> In file included from include/includes.h:452,
> ~                 from dynconfig.c:21:
> /usr/local/heimdal-0.7/include/krb5.h:660: error: syntax error at '#' token
> /usr/local/heimdal-0.7/include/krb5.h:660: warning: no semicolon at end
> of struct or union
> /usr/local/heimdal-0.7/include/krb5.h:660: error: parse error before
> "DONT_USE_CPLUSPLUS_RESERVED_NAMES"
> /usr/local/heimdal-0.7/include/krb5.h:661: warning: data definition has
> no type or storage class
> In file included from /usr/local/heimdal-0.7/include/krb5.h:750,
> ~                 from include/includes.h:452,
> ~                 from dynconfig.c:21:
> /usr/local/heimdal-0.7/include/krb5-protos.h:1750: error: parse error
> before "krb5_get_init_creds_opt"
> /usr/local/heimdal-0.7/include/krb5-protos.h:1760: error: parse error
> before "krb5_get_init_creds_opt"
> /usr/local/heimdal-0.7/include/krb5-protos.h:1770: error: parse error
> before "krb5_get_init_creds_opt"
> /usr/local/heimdal-0.7/include/krb5-protos.h:1775: error: parse error
> before "krb5_get_init_creds_opt"
> /usr/local/heimdal-0.7/include/krb5-protos.h:1778: error: parse error
> before '*'
> 
> Any hints from the community ?

Yes - this version of Heimdal isn't clean w.r.t. C++ keywords, and
we insist on this in recent verions of Samba. You can remove this
restriction by removing these lines :

#ifndef __cplusplus
#define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define public #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define protected #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define template #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define this #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define new #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define delete #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#define friend #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
#endif

from the top of include/includes.h

Jeremy.



More information about the samba mailing list