cd /usr/lib64/samba ldd *.so | grep found libsmbd-shim-samba4.so => not found libsmbd-shim-samba4.so => not found libsamba-debug-samba4.so => not found libsamba-debug-samba4.so => not found libsmbd-shim-samba4.so => not found Some libs are not found, especially after upgrade from samba 4.9.x rebuilding samba 4.10.11 might fix the problem, I have experienced both.
just rebuilt samba again and now: ldd *.so | grep found libsmbd-shim-samba4.so => not found libsmbd-shim-samba4.so => not found libsmbd-shim-samba4.so => not found libsamba-debug-samba4.so => not found libsamba-debug-samba4.so => not found libsmbd-shim-samba4.so => not found libreplace-samba4.so => not found It gets worse ..
Are you sure these libraries really needs RUNPATHs?
That's what I mean. Libraries without RUNPATH (ldd shows "not found"): /usr/lib64/samba $ for i in ./*.so ; do ldd "$i" | grep -q found && echo $i ; done ./libaddns-samba4.so ./libcli-ldap-samba4.so ./libsamba-modules-samba4.so And all binaries that links with these libraries have correct RUNPATHs, so there shouldn't be runtime issues: $ for i in $(qlist net-fs/samba) ; do readelf -Wd "$i" 2>/dev/null | egrep -q 'NEEDED.*(libaddns-samba4.so|libcli-ldap-samba4.so|libsamba-modules-samba4.so)' && { echo $i ; LANG=C readelf -Wd "$i" | grep RUNPATH ; } ; done /usr/bin/nmblookup 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/bin/cifsdd 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/bin/locktest 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/bin/masktest 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/bin/gentest 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/bin/smbtorture 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-policy.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-policy.so.0 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-policy.so.0.0.1 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-passdb.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-passdb.so.0 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libsamba-passdb.so.0.27.0 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libdcerpc.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libdcerpc.so.0 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/libdcerpc.so.0.0.1 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/python2.7/site-packages/samba/smb.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/python2.7/site-packages/samba/net.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libnss-info-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libidmap-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libsmbd-base-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libauth-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libgse-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libads-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libgpext-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/ldb/ildap.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libauth4-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libsamba-net-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libshares-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libcli-ldap-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64] /usr/lib64/samba/libgensec-samba4.so 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib64/samba:/usr/lib64]
ldd is ancient and deprecated. lddtree finds the libraries just fine. What problem are you trying to solve?
It started with a sssd build problem in https://bugs.gentoo.org/692800 which I think is a samba problem rather than a sssd problem. Have a look and see if you can make anything out of it
https://bugs.gentoo.org/692800 has some updates w.r.t samba, some deps missing
see https://692800.bugs.gentoo.org/attachment.cgi?id=629606
(In reply to Joakim Tjernlund from comment #7) > see https://692800.bugs.gentoo.org/attachment.cgi?id=629606 just confirmed that this fixes the sssd idmap conftest in its configure stage fine as a user patch for samba.
Created attachment 641710 [details, diff] user patch to remove all of my not found libs under /usr/lib64/samba my user patch to remove all of my "not found" lib linking issues under /usr/lib64/samba. not really sure how to make it generalized to other samba config option mixes.
(In reply to razamatan from comment #9) > Created attachment 641710 [details, diff] [details, diff] > user patch to remove all of my not found libs under /usr/lib64/samba > > my user patch to remove all of my "not found" lib linking issues under > /usr/lib64/samba. > > not really sure how to make it generalized to other samba config option > mixes. I think you should report this upstream to Samba. It seems unlikely that Gentoo Samba maintainers will adopt this locally.
(In reply to Alexander Tsoy from comment #2) > Are you sure these libraries really needs RUNPATHs? It is not about RUN_PATH really. A lib needs to link with all libs it depends on. If one of its dependants libs is in /usr/lib64/samba it will also get an RUN_PATH to that location.
FYI, i went to check things since it's been awhile, and compiling 4.12.9-r1 succeeds for me.
(In reply to razamatan from comment #12) > FYI, i went to check things since it's been awhile, and compiling 4.12.9-r1 > succeeds for me. Yes, it seems recent samba-4.12.x has silently fixed this problem. cd /use/lib64/samba for i in ./*.so ; do ldd "$i" | grep -q found && echo $i ; done Above does not report anything.
I just noticed I carry this samba patch in /etc/portage/patches: diff -ruN samba-4.11.8.orig/lib/util/wscript_build samba-4.11.8/lib/util/wscript_build [14/9084] --- samba-4.11.8.orig/lib/util/wscript_build 2020-05-25 04:38:53.418458704 -0700 +++ samba-4.11.8/lib/util/wscript_build 2020-05-25 04:39:17.999365214 -0700 @@ -170,6 +170,6 @@ bld.SAMBA_LIBRARY('samba-modules', source='modules.c', - deps='samba-errors samba-util', + deps='samba-errors samba-util samba-debug', local_include=False, private_library=True) diff -ruN samba-4.11.8.orig/nsswitch/wscript_build samba-4.11.8/nsswitch/wscript_build --- samba-4.11.8.orig/nsswitch/wscript_build 2020-05-25 04:40:26.691104424 -0700 +++ samba-4.11.8/nsswitch/wscript_build 2020-05-25 04:40:41.912046715 -0700 @@ -108,7 +108,7 @@ if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'): bld.SAMBA_LIBRARY('winbind_krb5_locator', source='krb5_plugin/winbind_krb5_locator.c', - deps='wbclient krb5 com_err', + deps='wbclient krb5 com_err replace', realname='winbind_krb5_locator.so', install_path='${MODULESDIR}/krb5') diff -ruN samba-4.11.8.orig/source3/wscript_build samba-4.11.8/source3/wscript_build --- samba-4.11.8.orig/source3/wscript_build 2020-05-25 04:35:20.930280265 -0700 +++ samba-4.11.8/source3/wscript_build 2020-05-25 04:36:19.294046850 -0700 @@ -267,7 +267,7 @@ bld.SAMBA3_LIBRARY('popt_samba3', source='lib/popt_common.c', - deps='popt samba-util smbconf', + deps='popt samba-util smbconf samba-debug', private_library=True) bld.SAMBA3_LIBRARY('popt_samba3_cmdline', @@ -508,7 +508,7 @@ bld.SAMBA3_LIBRARY('smbldap', source='lib/smbldap.c', - deps='ldap lber samba-util smbconf', + deps='ldap lber samba-util smbconf samba-debug replace smbd_shim samba-security', enabled=bld.CONFIG_SET("HAVE_LDAP"), private_library=False, abi_directory='lib/ABI', That is why I got no errors. Razamatan, you don't have any extra patches?
try deleting that patch (iirc, it's attached to this bug, so you can download it later), and then reinstall samba. should work w/o the patch. at least it did for me.
(In reply to razamatan from comment #15) > try deleting that patch (iirc, it's attached to this bug, so you can > download it later), and then reinstall samba. should work w/o the patch. > at least it did for me. Ok, just to make sure i removed that patch and now I still get the error: ldd *.so | grep -i not libsmbd-shim-samba4.so => not found libsmbd-shim-samba4.so => not found libsamba-debug-samba4.so => not found libsamba-debug-samba4.so => not found libsmbd-shim-samba4.so => not found Reopening
This is an informative post and it is very beneficial and knowledgeable. https://bit.ly/3g2MxoU
I think samba 4.15 has fixed this, needs to be tested/confirmed though.
(In reply to Joakim Tjernlund from comment #18) > I think samba 4.15 has fixed this, needs to be tested/confirmed though. Works for me with samba 4.15.x, closing.