[Samba] Build error with Samba-4.3.0

Reuben Farrelly reuben-samba at reub.net
Tue Sep 22 10:38:10 UTC 2015


On 21/09/2015 8:20 AM, Andrew Bartlett wrote:
> On Sat, 2015-09-19 at 20:59 +1000, Reuben Farrelly wrote:
>> Hi,
>>
>> I've been battling to get Samba-4.3 to install on my Gentoo x86_64
>> box.
>>    It has been failing to build with the following error:
>>
>> [1153/2753] Compiling source4/libnet/py_net.c
>> [1154/2753] Compiling source4/libnet/py_net_dckeytab.c
>> [1155/2753] Compiling source4/libnet/libnet_export_keytab.c
>> [1156/2753] Compiling source4/kdc/hdb-samba4.c
>> [1157/2753] Compiling source4/kdc/hdb-samba4-plugin.c
>> [1158/2753] Compiling source4/kdc/db-glue.c
>> ../source4/kdc/db-glue.c: In function 'samba_kdc_lookup_realm':
>> ../source4/kdc/db-glue.c:2144:9: error: 'HDB_ERR_WRONG_REALM'
>> undeclared
>> (first use in this function)
>>     return HDB_ERR_WRONG_REALM;
>>            ^
>> ../source4/kdc/db-glue.c:2144:9: note: each undeclared identifier is
>> reported only once for each function it appears in
>> Waf: Leaving directory `/var/tmp/samba-4.3.0/bin'
>> Build failed:  -> task failed (err #1):
>>           {task: cc db-glue.c -> db-glue_13.o}
>> Makefile:8: recipe for target 'all' failed
>> make: *** [all] Error 1
>>
>> This works OK with Samba-4.2.4 and below - it's new breakage with
>> Samba-4.3.0.  This occurs with a vanilla samba tarball (no extra
>> patches).
>>
>> ./configure is running with:
>>
>> CCFLAGS="-O2 -pipe -march=native -mtune=native" LINKFLAGS="-O2 -pipe
>> -march=native -mtune=native -Wl,-O1 -Wl,--as-needed"
>> "/var/tmp/portage/net-fs/samba-4.3.0/work/samba
>> -4.3.0/buildtools/bin/waf" --prefix=/usr
>> --libdir=/usr/lib64 --enable-fhs --sysconfdir=/etc -
>> -localstatedir=/var
>> --with-modulesdir=/usr/lib64/samba --with-piddir=/var/run/samba
>> --bundled-libraries=NONE --builtin-libraries=NONE --disable-rpath
>> --disable-rpath-install --nopyc --nopyo --with-acl-support
>> --without-ad-dc --without-dnsupdate --without-ads --without-aio
>> -support
>> --disable-avahi --without-cluster-support --disable-cups --without
>> -dmapi
>> --with-fam --enable-gnutls --disable-iprint --without-ldap --with-pam
>>
>> --with-pam_smbpass --with-pammodulesdir=/lib64/security --without
>> -quotas
>> --with-syslog --without-systemd --without-winbind configure
>>
>> This is for a basic environment with no AD. I only need Samba as a
>> file
>> server.  The system heimdal is 1.5.3-r2 .
>
> Don't do that.  Never use the system Heimdal, this just isn't supported
> in any meaningful way.  On debian we tried to do that for a while, and
> decided to revert that:
> https://lists.alioth.debian.org/pipermail/pkg-samba-maint/2015-April/017277.html
>
>> Can anyone give me any ideas as to where to start looking?  I'm
>> guessing
>> that the make should not be failing, if there's an inherent problem
>> it
>> should be being picked up by the configure script and failing there
>> instead....?
>
> Use the bundled Heimdal, or even better the (likely much more up to
> date) system MIT kerberos via --with-system-mitkrb5 as you are building
> --without-ad-dc.

Thanks.  It seems the Gods were listening:

https://archives.gentoo.org/gentoo-dev/message/78c9fba02e9285123d54717b82e9f87c

After this and then installing mit-krb5, uninstalling heimdal from the 
system, rebuilding system dependencies on it (namely bind, squid etc) 
and then building samba with the USE flag 'system-mitkrb5' I was able to 
build Samba-4.3.0 though to completion with the official Gentoo ebuild. 
  Yay!

What are the chances of the Samba build system spitting out a big fat 
warning if an out-of-tree Heimdal install is detected?  It would be 
better than failing midway through the build.

> (Why a build --without-ad-dc tries to build source4/kdc/db-glue.c is an
> interesting question).

While this isn't a problem for me now I guess it still should still be 
fixed.

For those who haven't seen it there was a recent discussion on 
gentoo-dev about the Samba package and support too:

https://archives.gentoo.org/gentoo-dev/message/d75c3ba798825052daee35e846e79797

Reuben




More information about the samba mailing list