Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542638 - net-fs/samba-4.2.0 fails on krb5_kdc_configuration
Summary: net-fs/samba-4.2.0 fails on krb5_kdc_configuration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
: 542918 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-09 07:53 UTC by Jan Vansteenkiste
Modified: 2015-08-08 15:28 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.gz,120.62 KB, application/gzip)
2015-03-09 07:55 UTC, Jan Vansteenkiste
Details
samba-4.2.0.ebuild.patch (samba-4.2.0.ebuild.patch,946 bytes, patch)
2015-03-10 12:53 UTC, Denis Kaganovich
Details | Diff
samba-4.2.0-r1.ebuild.patch (kdc & ctdb fix) (samba-4.2.0-r1.ebuild.patch,1.21 KB, patch)
2015-03-10 14:04 UTC, Denis Kaganovich
Details | Diff
4.2/ctdb.initd (ctdb.initd,3.40 KB, text/plain)
2015-03-10 14:09 UTC, Denis Kaganovich
Details
4.2/ctdb.confd (ctdb.confd,1.52 KB, text/plain)
2015-03-10 14:11 UTC, Denis Kaganovich
Details
virtual/krb4, use: afs minimal hardened (samba-4.2.0-r1-2.ebuild.patch,2.77 KB, patch)
2015-03-11 00:40 UTC, Denis Kaganovich
Details | Diff
samba-4.2.0-r1-3.ebuild.patch (samba-4.2.0-r1-3.ebuild.patch,3.36 KB, patch)
2015-03-11 14:47 UTC, Denis Kaganovich
Details | Diff
samba-4.2.0-r1-4.ebuild.patch (samba-4.2.0-r1-4.ebuild.patch,3.61 KB, patch)
2015-03-14 01:27 UTC, Denis Kaganovich
Details | Diff
samba kdc init patch (kdc_init.patch,625 bytes, patch)
2015-03-27 13:13 UTC, Stephan Wolf
Details | Diff
ebuild patch (samba_ebuild.patch,385 bytes, patch)
2015-03-27 13:14 UTC, Stephan Wolf
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vansteenkiste 2015-03-09 07:53:43 UTC
dc/hdb-samba4-plugin.c -c -o default/source4/kdc/hdb-samba4-plugin_6.o
../source4/kdc/kdc.c: In function ‘kdc_task_init’:
../source4/kdc/kdc.c:970:13: error: ‘krb5_kdc_configuration’ has no member named ‘as_use_strongest_session_key’
  kdc->config->as_use_strongest_session_key = false;
             ^
../source4/kdc/kdc.c:972:13: error: ‘krb5_kdc_configuration’ has no member named ‘tgs_use_strongest_session_key’
  kdc->config->tgs_use_strongest_session_key = false;
             ^
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0/bin'


Reproducible: Always

Steps to Reproduce:
1. Emerge samba-4.2.0
Comment 1 Jan Vansteenkiste 2015-03-09 07:55:31 UTC
Created attachment 398464 [details]
build.log
Comment 2 Jan Vansteenkiste 2015-03-09 07:56:03 UTC
Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.2, glibc-2.19-r1, 3.19.0-gentoo x86_64)
=================================================================
System uname: Linux-3.19.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-3630QM_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:     8061604 total,   1170208 free
KiB Swap:    8388604 total,   8383832 free
Timestamp of tree: Mon, 09 Mar 2015 05:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p33-r2
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r2, 3.4.3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.6
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo multimedia vstone crossdev bumblebee hasufell kodi-overlay qt sunrise
Installed sets: @sourcebuilds, @systools, @virtualbox
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA skype-eula Oracle-BCLA-JavaSE AdobeFlash-10.3 AdobeFlash-11.x PUEL google-chrome skype-4.0.0.7-copyright Q3AEULA Intel-SDP Broadcom Google-TOS NVIDIA-CUDA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.2/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.belnet.be/pub/rsync.gentoo.org/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/multimedia /usr/local/portage/vstone /usr/local/portage/crossdev-armhf /var/lib/layman/bumblebee /var/lib/layman/hasufell /var/lib/layman/kodi-overlay /var/lib/layman/qt /var/lib/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr egl emboss encode exif fam firefox flac fontconfig fortran gdbm gif glamor gpm gtk iconv idn ipv6 jpeg lcms ldap libav libcanberra libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline samba sdl session sna spell sse sse2 sse3 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vdpau vim-syntax vorbis wxwidgets x264 xcb xml xtradb xv xvid xvmc zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic authn_core authn_alias authn_anon authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack unixd socache_shmcb vhost_alias auth_digest proxy proxy_balancer proxy_connect proxy_ftp proxy_http macro slotmem_shm" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DRACUT_MODULES="biosdevname lvm gensplash" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer wiki-publisher" LINGUAS="en nl" NETBEANS_MODULES="enterprise php webcommon java apisupport profiler ergonomics cnd mobility" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5 php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm" QEMU_USER_TARGETS="i386 arm" RUBY_TARGETS="ruby19 ruby20 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia vesa nouveau intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-03-09 08:01:22 UTC
I have the same issue. Any help is appreciated.
Comment 4 Denis Kaganovich 2015-03-10 12:53:53 UTC
Created attachment 398596 [details, diff]
samba-4.2.0.ebuild.patch

Comparing with 4.1.17: looks like starts to use system KDC. System have similar KDC (from heimdal), but something wrong. So, to fastfix, need just remove USING_SYSTEM_KDC=1 in any way to restore 4.1.17 behaviour (somebody can adopt system-kdc usage too - as "gentoo style"...). This is part of broken diff:

--- samba-4.1.17/source4/kdc/wscript_build<---->2013-06-13 12:21:02.000000000 +0300
+++ samba-4.2.0/source4/kdc/wscript_build<----->2014-10-01 12:16:21.000000000 +0300
@@ -1,5 +1,11 @@
 #!/usr/bin/env python
.
+# We do this because we do not want to depend on the KDC, only find and use it's header files.  We do not want.
+if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
+    kdc_include = "../heimdal/kdc"
+else:
+    kdc_include = getattr(bld.env, "CPPPATH_KDC")
+
 bld.SAMBA_MODULE('service_kdc',
 <----->source='kdc.c kpasswdd.c proxy.c',
 <----->subsystem='service',
@@ -12,7 +18,7 @@ bld.SAMBA_MODULE('service_kdc',
 bld.SAMBA_LIBRARY('HDB_SAMBA4',
                   source='hdb-samba4.c hdb-samba4-plugin.c',
                   deps='ldb auth4_sam auth_sam_reply samba-credentials hdb db-glue samba-hostconfig com_err',
-                  includes='../heimdal/kdc',
+                  includes=kdc_include,
                   private_library=True
                   )

(+4 similar changes) kdc_include previously was hardcoded to non-system KDC. But USING_SYSTEM_KDC configuration code mostly same.

PS Also ebuild have bug about ctdb: ctdb now internally included, so need to unswitch external dependence to build with USE=cluster. To avoid trivial bug processing, included into this patch.
Comment 5 Denis Kaganovich 2015-03-10 13:09:37 UTC
PS Sorry, last changes (about ctdb?) broken. Now I fix and also prepare ctdb init scripts and post all.
Comment 6 Denis Kaganovich 2015-03-10 14:04:03 UTC
Created attachment 398602 [details, diff]
samba-4.2.0-r1.ebuild.patch (kdc & ctdb fix)

Make ebuild working. Required files/4.2/ctdb.confd & files/4.2/ctdb.initd
Comment 7 Denis Kaganovich 2015-03-10 14:09:14 UTC
Created attachment 398604 [details]
4.2/ctdb.initd
Comment 8 Denis Kaganovich 2015-03-10 14:11:15 UTC
Created attachment 398606 [details]
4.2/ctdb.confd

I remove most wild options and keep only required.
Comment 9 Denis Kaganovich 2015-03-11 00:40:11 UTC
Created attachment 398640 [details, diff]
virtual/krb4, use: afs minimal hardened

Finally, system-KDC is way to enable mit-krb5 (virtual/krb5) support. So, I change app-crypt/heimdal to virtual/krb5 dependence. Also added OpenAFS support and "minimal" - switching to non-DC samba3 code (and no-pie). I don't test all combinations, but mostly OK.
Comment 10 Denis Kaganovich 2015-03-11 14:47:47 UTC
Created attachment 398654 [details, diff]
samba-4.2.0-r1-3.ebuild.patch

Also resolving most annoying automagic dependences: pam (bug #489770) & sasl (new). (especially I'm use global -pam).
Comment 11 Reuben Farrelly 2015-03-12 07:59:28 UTC
I've just patched with the diff from Comment 10 - and it's looking better but still failing but in a different place this time:

18:56:24 runner x86_64-pc-linux-gnu-gcc default/source3/lib/netapi/examples/share/share_del_80.o default/source3/lib/netapi/examples/common_1.o -o /var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0/bin/default/source3/lib/netapi/examples/share/share_del -pie -Wl,-z,relro,-z,now -lpthread -Wl,-no-undefined -Wl,--export-dynamic -Wl,--as-needed -fstack-protector -Wl,-rpath,/usr/lib64 -Ldefault/source4/lib/socket -Ldefault/source4/lib/http -Ldefault/source4/libcli -Ldefault/libcli/nbt -Ldefault/source4/cluster -Ldefault/auth -Ldefault/nsswitch -Ldefault/source4/libcli/ldap -Ldefault/libcli/registry -Ldefault/libcli/smb -Ldefault/source4/libcli/wbclient -Ldefault/source4/lib/messaging -Ldefault/source4/auth -Ldefault/source4/lib/events -Ldefault/source4/auth/kerberos -Ldefault/lib/tdb_wrap -Ldefault/lib/ldb-samba -Ldefault/libds/common -Ldefault/source4/dsdb -Ldefault/nsswitch/libwbclient -Ldefault/libcli/cldap -Ldefault/libcli/ldap -Ldefault/lib/addns -Ldefault/libcli/util -Ldefault/lib/ccan -Ldefault/lib/socket -Ldefault/lib -Ldefault/libcli/security -Ldefault/source4/librpc -Ldefault/lib/dbwrap -Ldefault/auth/gensec -Ldefault/source4/auth/ntlm -Ldefault/lib/tdb_compat -Ldefault/libcli/auth -Ldefault/lib/param -Ldefault/auth/credentials -Ldefault/lib/krb5_wrap -Ldefault/librpc -Ldefault/lib/replace -Ldefault/source3/auth -Ldefault/lib/util -Ldefault/source3 -L/usr/local/lib -L/usr/lib64 -Wl,-Bdynamic -lnetapi -lsamba-util -lauth-samba4 -lreplace-samba4 -lmsrpc3-samba4 -llibcli-netlogon3-samba4 -lnet-keytab-samba4 -lndr -lads-samba4 -lsamba-passdb -lkrb5samba-samba4 -ldcerpc-samba-samba4 -lutil-cmdline-samba4 -lsocket-blocking-samba4 -lsamba-debug-samba4 -lutil-setid-samba4 -lsamba-credentials -lsamba-hostconfig -llibcli-lsa3-samba4 -ltrusts-util-samba4 -lcliauth-samba4 -ltdb-compat-samba4 -lauth4-samba4 -lgensec -ltevent-util -llibsmb-samba4 -lndr-samba-samba4 -ldbwrap-samba4 -lndr-nbt -ldcerpc-binding -lndr-samba4 -lutil-tdb-samba4 -lgse-samba4 -lndr-standard -lsamba-security-samba4 -lsamba-sockets-samba4 -linterfaces-samba4 -lccan-samba4 -lerrors-samba4 -lsmbconf -lsamba-cluster-support-samba4 -lsamba3-util-samba4 -laddns-samba4 -lcli-ldap-common-samba4 -lcli-cldap-samba4 -lwbclient -lsamdb-common-samba4 -lflag-mapping-samba4 -lsamdb -lldbsamba-samba4 -lsecrets3-samba4 -lasn1util-samba4 -ltdb-wrap-samba4 -lauthkrb5-samba4 -levents-samba4 -lserver-role-samba4 -lsamba-modules-samba4 -ldcerpc-samba4 -lauth-unix-token-samba4 -lMESSAGING-samba4 -ldcerpc -lLIBWBCLIENT-OLD-samba4 -lcli-smb-common-samba4 -lndr-krb5pac -lutil-ntdb-samba4 -lsmbregistry-samba4 -lCHARSET3-samba4 -lutil-reg-samba4 -lcli-ldap-samba4 -lwinbind-client-samba4 -lauth-sam-reply-samba4 -lcluster-samba4 -lcli-nbt-samba4 -lsmbclient-raw -lhttp-samba4 -lnetif-samba4 -lsmb-transport-samba4 -lsmbd-shim-samba4 -lasn1 -ltevent -ltalloc -lcom_err -lbsd -lgssapi -lcrypt -lattr -lnsl -ldl -lkrb5 -lrt -lcap -lresolv -lldb -lntdb -lroken -lz -ltdb -lpam -lpopt -O2 -pipe -march=native -mtune=native -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed
default/source4/rpc_server/backupkey/dcesrv_backupkey_24.o: In function `backupkey__op_dispatch':
dcesrv_backupkey.c:(.text+0x1e3d): undefined reference to `gnutls_global_init'
dcesrv_backupkey.c:(.text+0x1e58): undefined reference to `gcry_control'
dcesrv_backupkey.c:(.text+0x1e6d): undefined reference to `gnutls_x509_privkey_init'
dcesrv_backupkey.c:(.text+0x1e8a): undefined reference to `gnutls_x509_privkey_generate'
dcesrv_backupkey.c:(.text+0x1e9f): undefined reference to `gnutls_x509_privkey_deinit'
dcesrv_backupkey.c:(.text+0x1ea4): undefined reference to `gnutls_global_deinit'
dcesrv_backupkey.c:(.text+0x2495): undefined reference to `gnutls_x509_privkey_export'
dcesrv_backupkey.c:(.text+0x24e0): undefined reference to `gnutls_x509_privkey_export'
dcesrv_backupkey.c:(.text+0x2516): undefined reference to `gnutls_x509_privkey_deinit'
dcesrv_backupkey.c:(.text+0x251b): undefined reference to `gnutls_global_deinit'
dcesrv_backupkey.c:(.text+0x2a18): undefined reference to `gnutls_x509_privkey_deinit'
dcesrv_backupkey.c:(.text+0x2a1d): undefined reference to `gnutls_global_deinit'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0/bin'
Build failed:  -> task failed (err #1): 
        {task: cc_link dcesrv_wkssvc_16.o,forward_3.o,reply_3.o,dcesrv_auth_3.o,loadparm_3.o,dcesrv_backupkey_24.o,rpc_winreg_20.o,ntptr_simple_ldb_1.o,dcerpc_netlogon_21.o,dcesrv_samr_18.o,samr_password_18.o,dcesrv_eventlog6_29.o,dcerpc_dnsserver_30.o,dnsutils_30.o,dnsdata_30.o,dnsdb_30.o,dcesrv_drsuapi_27.o,updaterefs_27.o,getncchanges_27.o,addentry_27.o,writespn_27.o,drsutil_27.o,dcesrv_srvsvc_14.o,srvsvc_ntvfs_14.o,dcerpc_server_5.o,dcesrv_mgmt_5.o,handles_5.o,rpc_echo_11.o,dcesrv_spoolss_26.o,dcesrv_browser_28.o,dcesrv_remote_13.o,dcesrv_lsa_22.o,lsa_init_22.o,lsa_lookup_22.o,dcesrv_unixinfo_17.o,ntptr_base_2.o,ntptr_interface_2.o,rpc_epmapper_12.o,ndr_backupkey_c_151.o -> libdcerpc-server.so}
 * ERROR: net-fs/samba-4.2.0::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3886:  Called waf-utils_src_compile
 *   environment, line 4779:  Called die
 * The specific snippet of code:
 *       "${WAF_BINARY}" ${_mywafconfig} ${jobs} || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.2.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.2.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-fs/samba-4.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-fs/samba-4.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0'
 * S: '/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0'

>>> Failed to emerge net-fs/samba-4.2.0, Log file:

>>>  '/var/tmp/portage/net-fs/samba-4.2.0/temp/build.log'

 * Messages for package net-fs/samba-4.2.0:

 * ERROR: net-fs/samba-4.2.0::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3886:  Called waf-utils_src_compile
 *   environment, line 4779:  Called die
 * The specific snippet of code:
 *       "${WAF_BINARY}" ${_mywafconfig} ${jobs} || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.2.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.2.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-fs/samba-4.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-fs/samba-4.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0'
 * S: '/var/tmp/portage/net-fs/samba-4.2.0/work/samba-4.2.0'

This is when compiled with these options:

[ebuild     U #] net-fs/samba-4.2.0::gentoo [4.1.17::gentoo] USE="acl fam hardened%* pam%* syslog -addns -ads -afs% -aio -avahi -client -cluster -cups -dmapi -gnutls -iprint -ldap -minimal% -quota -sasl% (-selinux) -systemd {-test} -winbind" PYTHON_TARGETS="python2_7" 0 KiB

I have gnutls-3.3.12 already installed.

(On AMD64 FWIW).
Comment 12 Conrad Kostecki gentoo-dev 2015-03-12 08:22:44 UTC
*** Bug 542918 has been marked as a duplicate of this bug. ***
Comment 13 Denis Kaganovich 2015-03-14 01:27:09 UTC
Created attachment 398850 [details, diff]
samba-4.2.0-r1-4.ebuild.patch

Bug #543194 & Comment 11 resulting hardcoded gnutls patch for non-minimal mode. Gnutls needs for version 4 rpc server (rpc backup server). I still in doubts about unswitching AD DC by "-ads" useflag, but there use "version 3" codebase in unknown to me cases, so it can damage other functionality. So, I keep gnutls hard for all uses exclude "minimal -ads" - "minimal" makes version 3 codebase without DC and disable gnutls. If somebody know reason -can optionally (by "-gnutls") remove dcesrv_backupkey section from source4/rpc_server/wscript_build or something else. But I remove whole gnutls useflag. Also added non-global "cephfs" useflag to control ceph_vfs automagic.
Comment 14 Denis Kaganovich 2015-03-14 19:06:53 UTC
PS If somebody cares - maintainers can add also this 2 patches from me for ceph_vfs:
https://raw.googlecode.com/svn/trunk/app-portage/ppatch/files/extensions/net-fs/samba/compile/
(this is my overlay & my patches)
1) "max disk size" support;
2) disabling chown privelege escalation.

As ceph_vfs is very special module, so looks as nobody cares about it (I report "max disk size" upstream), but this module still useful at least if samba runs on ceph node (using kernel module in this case give freezes & kernel locks over userspace-kernel-userspace loop).

But as it still very personal purpose, I will not open separate bug :). Just FYI.
Comment 15 Stephan Wolf 2015-03-27 13:13:18 UTC
samba uses the build in implementation of heimdal from year 2011. The ebuild uses the portage version of heimdal. I got it fixed to patch samba kdc_init function.
Comment 16 Stephan Wolf 2015-03-27 13:13:49 UTC
Created attachment 399866 [details, diff]
samba kdc init patch
Comment 17 Stephan Wolf 2015-03-27 13:14:12 UTC
Created attachment 399868 [details, diff]
ebuild patch
Comment 18 Reuben Farrelly 2015-03-27 13:40:42 UTC
Stephan Wolf's patch in Comment 16 also worked for me.  After putting this in /etc/portage/patches/net-fs/samba/ I got a lot further with the compilation process than the stock ebuild.

I did however need to add the gnutls USE flag otherwise Samba bailed out with a lot of linking errors all relating to gnutls_ further on (see my earlier comment).  Perhaps the ebuild needs this flag set as a hard requirement?

After making those two changes the package built successfully and seems to work.  I'd be curious to know if these are just Gentoo specific patches - no one on the Samba users list seems to have run into these problems which is surprising, but I can't see anything obvious that breaks them specifically on Gentoo.
Comment 19 Stephan Wolf 2015-03-30 12:10:28 UTC
As I wrote in my first comment, samba (the tarball) includes a heimdal version from 2011 or so with a different interface. I think this should be communicated to the samba team
Comment 20 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-08-07 11:21:52 UTC
+*samba-4.2.3 (07 Aug 2015)
+
+  07 Aug 2015; Lars Wendler <polynomial-c@gentoo.org> -samba-4.2.0.ebuild,
+  +samba-4.2.3.ebuild, +files/samba-4.2.3-heimdal_compilefix.patch:
+  Version bump. Removed old.
+

Thanks to Stephan Wolf this error is now fixed with =net-fs/samba-4.2.3 ebuild.