Created attachment 457270 [details] build.log from netfs/samba-4.2.14 with app-crypt/heimdal-7.1.0 Heimdal 7.1.0 needs an Patch to build net-fs/samba with it. https://git.samba.org/?p=abartlet/lorikeet-heimdal.git/.git;a=commit;h=d9bc25619969be8938c828dcbed79d1c83ee08dc
heimdal-7.1.0 already has that patch: $ grep -n HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE /var/tmp/portage/app-crypt/heimdal-7.1.0/work/heimdal-7.1.0/include/bits.c 297: fprintf(f, "#ifndef HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE\n"); 299: fprintf(f, "#define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE __attribute__((warn_unused_result))\n"); 301: fprintf(f, "#define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE\n"); as well as the generated krb5-types.h: $ grep -n HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE /var/tmp/portage/app-crypt/heimdal-7.1.0/image/usr/include/x86_64-pc-linux-gnu/krb5-types.h 60:#ifndef HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE 62:#define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE __attribute__((warn_unused_result)) 64:#define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE Reason for the failure is probably something else. Adding samba to cc. Perhaps they can clue us in.
I have found in another Bugzilla something supposed to help. https://bugzilla.samba.org/show_bug.cgi?id=11163#c1 But unfortunately I do not know how to write a patch from it.
Samba 4 is indeed broken with Heimdal 7: [ 547/2275] Compiling source4/auth/system_session.c [ 548/2275] Compiling libcli/drsuapi/repl_decrypt.c [ 549/2275] Compiling source4/auth/session.c In file included from /usr/include/krb5.h:949:0, from ../auth/credentials/credentials_krb5.h:28, from ../source4/auth/session.c:28: /usr/include/krb5-protos.h:3894:1: error: unknown type name ‘HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE’ HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL ^ /usr/include/krb5-protos.h:3895:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘krb5_generate_random’ krb5_generate_random ( ^ Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.2.14/work/samba-4.2.14-abi_x86_32.x86/bin' Build failed: -> task failed (err #1): {task: cc session.c -> session_1.o} make: *** [Makefile:8: all] Error 1 Portage 2.3.3 (python 2.7.12-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.8.15-hardened x86_64) ================================================================= System uname: Linux-4.8.15-hardened-x86_64-Intel-R-_Core-TM-_i5_CPU_M_520_@_2.40GHz-with-gentoo-2.3 KiB Mem: 5962752 total, 755904 free KiB Swap: 12572668 total, 12572132 free Timestamp of repository gentoo: Sat, 07 Jan 2017 11:30:01 +0000 sh bash 4.3_p48-r1 ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.3.3 [enabled] app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.1_rc4::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo, 3.5.1-r2::gentoo dev-util/ccache: 3.3.3::gentoo dev-util/cmake: 3.7.1::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.23.1::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.26.1::gentoo, 2.27::gentoo sys-devel/gcc: 4.9.3::nerdboy, 5.3.0::gentoo, 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo
Looking upstream at various threads and sed hacks it's hard to tell what's up; hopefully samba devs have a fix...
Rolling back to 1.5 gets past the above error, then samba hits an undefined symbol error on symbols from ctdb, which is apparently not included in the package deps; only cluster? ( !dev-db/ctdb ) appears in samba-4.2.14 ebuild, so without USE=cluster you get "boom"
Created attachment 460226 [details, diff] Patch for samba-4.5.3.ebuild The solution to this problem is as simple as it is ugly and/or strange: samba 4 ships with its own krb5-types.h and prefers that over the system krb5-types.h. But only the system krb5-types.h correctly defines HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE. If you simply delete the file from the samba source, everything builds fine. The attached patch does just that for the samba-4.5.3.ebuild and can be easily adapted to the other versions I guess. Btw. contrary to comment #5 I didn't need to enable the USE="cluster" to get samba to compile. The matters seem therefore unrelated... Best, Torsten
Created attachment 460436 [details, diff] samba-mit-krb5-blocker-removal-ebuild.patch I could not get this to work with heimdal 1.5 or 7.1, but with the settings from https://bugs.gentoo.org/show_bug.cgi?id=593486#c9 i was able to compile 4.5.3 with addc. This settings are from Austin S. Hemmelgarn not from me. Thanks for this Austin.
I faced same issue. The attachment 460226 [details, diff] from comment 6 prepared by Torsten Kurbad solves the issue for me. I've successfully built Samba-4.5.3. For Samba I use flags [client -system-mitkrb5]. Thanks.
Created attachment 461392 [details, diff] samba-4.5.4.ebuild.patch Patch for 4.5.4 without mit-krb5 or system-heimdal. And again: This settings are from Austin S. Hemmelgarn not from me. Thanks for this Austin.
How much of the above is still valid for heimdal 7.3.0 ? Going by release notes, likely most, yet...