Follow up bug report to bug 639676 and 647002. Samba requires libnsl and libtirpc at runtime: amari ~ # for f in $(equery files samba); do [ -x $f ] && echo $f && ldd $f | grep -E "libnsl|libtirpc"; done>/tmp/blurb amari ~ # head /tmp/blurb /etc/init.d/samba /lib64/security/pam_winbind.so /usr/bin/cifsdd libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007f853d741000) libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f853a6a5000) /usr/bin/dbwrap_tool libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007f5c7107f000) libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f5c6fb6e000) /usr/bin/eventlogadm libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007fc9b44a6000) Would anyone be so kind to fix these trivial bug reports, please?
Created attachment 525200 [details, diff] fix
What USE flags did you build samba with?
As mentioned in bug 639676 samba links to libnsl automagically without any configure flag setting. See: https://github.com/samba-team/samba/search?q=nsl&type AFAIS for samba parts: "replace" "util" "access" "heimdal" "nss" net-fs/samba-4.8.0::gentoo USE="acl client cups fam gnutls ldap pam quota system-mitkrb5 -addc -addns -ads -ceph -cluster -debug (-dmapi) -gpg -iprint -python (-selinux) -syslog (-system-heimdal) -systemd {-test} -winbind -zeroconf" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7"
Yeah, but what about libtirpc? That definitely doesn't get linked with every possible USE flag combination.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a235c5012355187ff7cd3c0c920299530a11c69 commit 9a235c5012355187ff7cd3c0c920299530a11c69 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2018-03-25 18:22:42 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2018-03-25 18:23:03 +0000 net-fs/samba: Added net-libs/libnsl to (R)DEPEND. Bug: https://bugs.gentoo.org/651332 Closes: https://bugs.gentoo.org/639676 Package-Manager: Portage-2.3.24, Repoman-2.3.6 net-fs/samba/samba-4.7.6.ebuild | 1 + net-fs/samba/samba-4.8.0.ebuild | 1 + 2 files changed, 2 insertions(+)}
Samba was building fine without libnsl, also you added the dependency in without bumping the debuild
(In reply to Lars Wendler (Polynomial-C) from comment #4) > Yeah, but what about libtirpc? That definitely doesn't get linked with every > possible USE flag combination. Simple, see: https://github.com/samba-team/samba/search?q=tirpc&type= AFAIS for samba parts: "replace" "access" "source3"(samba3?) Well, that build system is not that easy to parse. :-) I wonder about lib/replace; the other two are by useflags[access, samba3] I guess.
libnsl and glibc can not co-exist because glibc contains libnsl. On my system `equery b /lib64/libnsl-2.25.so`: sys-libs/glibc-2.25-r10 (/lib64/libnsl-2.25.so) Any upgrades to glibc are now blocked because of samba dependencies on net-libs/libnsl with this change.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbf5b5f581406c9db5c524aa8c887c70a744ec1e commit fbf5b5f581406c9db5c524aa8c887c70a744ec1e Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2018-03-27 07:51:50 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2018-03-27 07:52:07 +0000 net-fs/samba: libnsl requires >=glibc-2.26 Bug: https://bugs.gentoo.org/651332 Package-Manager: Portage-2.3.24, Repoman-2.3.6 net-fs/samba/samba-4.7.6.ebuild | 8 ++++++-- net-fs/samba/samba-4.8.0.ebuild | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)}
[I] sys-libs/glibc Available versions: (2.2) [M]2.19-r1^s [M]**2.19-r2^s [M]2.20-r2^s [M]2.21-r2^s [M]2.22-r4^s [M]2.23-r4^s [M]~2.24-r4^s 2.25-r11^s 2.26-r7^s ~2.27-r4^s ~2.27-r5^s **9999^s {audit caps compile-locales debug doc gd hardened headers-only +multiarch multilib nscd profile +rpc selinux suid systemtap test vanilla} Installed versions: 2.26-r7(2.2)^s(01:33:36 AM 06/05/2018)(audit caps gd multilib nscd -debug -doc -hardened -headers-only -profile -selinux -suid -systemtap -vanilla) [I] net-libs/libnsl Available versions: 0-r1(0/1) ~1.1.0-r3(0/2) 1.2.0(0/2) {ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"} Installed versions: 1.2.0(02:08:00 AM 06/05/2018)(ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32") [I] net-libs/libtirpc Available versions: 1.0.2-r1(0/3) ~1.0.3(0/3) {ipv6 kerberos static-libs ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"} Installed versions: 1.0.2-r1(05:36:11 AM 12/02/2017)(ipv6 kerberos -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32") and compilation of samba-4.5.16 still fails with: o default/ctdb/utils/smnotify/smnotify_34.o In file included from ../ctdb/utils/smnotify/smnotify.c:26:0: default/ctdb/utils/smnotify/smnotify.h:9:10: fatal error: rpc/rpc.h: No such file or directory #include <rpc/rpc.h> ^~~~~~~~~~~ compilation terminated. Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.5.16/work/samba-4.5.16-abi_x86_64.amd64/bin' Build failed: -> task failed (err #1): {task: cc smnotify.c -> smnotify_34.o} * ERROR: net-fs/samba-4.5.16::gentoo failed (compile phase): * build failed So what else is needed...
It seems rpc.h is actualy missing. # ls -l /usr/include/rpc total 4 -rw-r--r-- 1 root root 2897 Jun 5 01:32 netdb.h A few do exist.... # locate /rpc.h | grep include /usr/include/event2/rpc.h /usr/include/gssrpc/rpc.h /usr/include/tirpc/rpc/rpc.h # ls -l $( locate /rpc.h | grep include ) -rw-r--r-- 1 root root 21025 Dec 2 2017 /usr/include/event2/rpc.h -rw-r--r-- 1 root root 3913 Apr 17 21:38 /usr/include/gssrpc/rpc.h -rw-r--r-- 1 root root 4130 Dec 2 2017 /usr/include/tirpc/rpc/rpc.h
Oh the update was triggered by the addition of: KERNEL="linux" build flag.
This is also on a machine that just did a complete emerge -1e world Fall out: samba-4.5.16 would not rebuild also problems in amanda-3.3.9. (rpc.h missing). Issue is already known
Building succeeds with: USE="acl client fam ldap pam syslog system-mitkrb5 zeroconf" Building fails with: USE="acl addc addns ads client cluster cups fam gnutls ldap pam quota syslog winbind zeroconf"
The does build: USE="acl ads client cups fam gnutls ldap pam syslog system-mitkrb5 winbind zeroconf"
USE="acl addc addns ads client cups fam gnutls ldap pam quota syslog winbind zeroconf" Builds working samba. So the basic difference is: building WITH USE="cluster" fails, build without USE="cluster" succeeds.
We've actually looped back around again to an extent. On libnsl: - Upstream Samba have now dropped the requirement (https://github.com/samba-team/samba/commit/755566566440a4432db09e7cdc1733eb43354095) - Gone from Samba 4.15.0_rc2+ in Gentoo (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb0d81fb1a26eea34bf353b63acfbfe4c5cde9d3) On libtirpc: - It's listed in DEPEND (with no subslot operator) right now (https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/samba/samba-4.15.0_rc2.ebuild?id=8603c7a32ab6c211df98657ee21ea56dde96ae53#n117). - It looks, from a search upstream, that it probably links against it, but I can't check that easily right now.