# Samba44 build error (heimdal connected)



## jonfr (Jan 21, 2017)

Since net/samba42 has been blocked due to a bug I tried to upgrade to net/samba44. That has not been working due to a security/heimdal compile error.

I get this error when I run `make install clean` on net/samba44.


```
625/3453] Compiling lib/addns/dnsrecord.c
runner cc -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fno-color-diagnostics -fstack-protector -DLDAP_DEPRECATED -fno-strict-aliasing -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTATIC_addns_MODULES=NULL -DSTATIC_addns_MODULES_PROTO=extern void __addns_dummy_module_proto(void) -MD -I/usr/local/include -DLIBICONV_PLUG -Idefault/lib/addns -I../lib/addns -Idefault/include/public -I../include/public -Idefault/source4 -I../source4 -Idefault/lib -I../lib -Idefault/source4/lib -I../source4/lib -Idefault/source4/include -I../source4/include -Idefault/include -I../include -Idefault/lib/replace -I../lib/replace -Idefault -I.. -Idefault/source4/heimdal/lib/krb5 -I../source4/heimdal/lib/krb5 -Idefault/source4/heimdal/lib/asn1 -I../source4/heimdal/lib/asn1 -Idefault/source4/heimdal/include -I../source4/heimdal/include -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/source4/heimdal/lib/gssapi -I../source4/heimdal/lib/gssapi -Idefault/lib/util/charset -I../lib/util/charset -Idefault/source4/heimdal/lib/roken -I../source4/heimdal/lib/roken -Idefault/source4/heimdal/lib/wind -I../source4/heimdal/lib/wind -Idefault/source4/heimdal/lib/hcrypto/libtommath -I../source4/heimdal/lib/hcrypto/libtommath -Idefault/source4/heimdal/lib/gssapi/gssapi -I../source4/heimdal/lib/gssapi/gssapi -Idefault/source4/heimdal/lib/gssapi/spnego -I../source4/heimdal/lib/gssapi/spnego -Idefault/source4/heimdal/lib/gssapi/krb5 -I../source4/heimdal/lib/gssapi/krb5 -Idefault/source4/heimdal/lib/gssapi/mech -I../source4/heimdal/lib/gssapi/mech -Idefault/libcli/util -I../libcli/util -Idefault/source4/heimdal/base -I../source4/heimdal/base -Idefault/source4/heimdal/lib/hx509 -I../source4/heimdal/lib/hx509 -Idefault/source3 -I../source3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib -I../source3/lib -Idefault/source4/heimdal/lib/com_err -I../source4/heimdal/lib/com_err -Idefault/bin/default/source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/hcrypto -I../source4/heimdal/lib/hcrypto -Idefault/source4/heimdal/lib -I../source4/heimdal/lib -Idefault/librpc -I../librpc -Idefault/lib/crypto -I../lib/crypto -Idefault/dynconfig -I../dynconfig -I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../lib/addns/dnsrecord.c -c -o default/lib/addns/dnsrecord_1.o
In file included from ../lib/addns/dnsrecord.c:24:
In file included from ../lib/addns/dns.h:31:
In file included from ../lib/replace/system/gssapi.h:47:
../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h:41:1: error: unknown type name 'GSSAPI_CPP_START'
GSSAPI_CPP_START
^
../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h:49:1: error: expected identifier or '('
extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_spnego_mechanism_oid_desc;
^
../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h:53:1: error: unknown type name 'GSSAPI_CPP_END'
GSSAPI_CPP_END
^
In file included from ../lib/addns/dnsrecord.c:24:
In file included from ../lib/addns/dns.h:41:
/usr/include/fcntl.h:271:1: error: expected identifier or '('
struct flock {
^
4 errors generated.
Waf: Leaving directory `/usr/ports/net/samba44/work/samba-4.4.8/bin'
Build failed:  -> task failed (err #1):
        {task: cc dnsrecord.c -> dnsrecord_1.o}
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/samba44
*** Error code 1
```

Trying to install security/heimdal results in package conflicts errors. I'm not sure if I can swamp out security/krb5 due to other packages that might be using it. But a solution to this problem would be good.

My make.conf has this setting.


```
OPTIONS_UNSET+= GSSAPI_BASE
OPTIONS_SET+=   GSSAPI_MIT
```


----------



## Abriel (Jan 21, 2017)

I don't have anything like that in make.conf, but net/samba44 is working with security/heimdal on my 
	
	



```
FreeBSD zse.stg.pl 11.0-RELEASE-p6 FreeBSD 11.0-RELEASE-p6 #1 r294083M
```


----------



## jonfr (Jan 22, 2017)

The problem here is that something else is installed that blocks me from installing and use security/heimdal. It creates package collisions.


----------



## SirDice (Jan 23, 2017)

jonfr said:


> The problem here is that something else is installed


Which package?

`pkg info -r krb5`


----------

