Missing rpaths in libinterfaces-samba4.so and libserver-role-samba4.so

Zen illiminable at gmail.com
Wed Jan 11 01:26:51 UTC 2017


I initially thought this was due to using --bundled-libraries (and it was
for talloc), but even without using --bundled-libraries I still encounter
this problem for resolving libsamba-debug-samba4.so from these 2 libraries.
I've since moved to using 4.5.3.

Is it possible to get these patches applied? Or does anyone have an
alternate explanation? Or need any additional information?

Thanks!

On Tue, Dec 20, 2016 at 4:28 PM, Zen <illiminable at gmail.com> wrote:

> I came across a problem where these two libraries are missing the RPATH
> entry in the ELF header.
>
> For context I'm building essentially from this ebuild -
> https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/
> samba/samba-4.4.7.ebuild and applying all the python disable patches in
> the referenced tgz plus using --disable-python and
> --bundled-libraries=talloc,tevent,tdb,lbd and
> --targets=client/smbclient,net
>
> The symptom is that when I run lddtree to verify dependencies private
> libraries don't resolve... eg...
>
> $ lddtree -R /build/samus /usr/lib64/samba/libinterfaces-samba4.so
>
> /build/samus/usr/lib64/samba/libinterfaces-samba4.so (interpreter => None)
>
>    libpthread.so.0 => /build/samus/lib64/libpthread.so.0
>
>        ld-linux-x86-64.so.2 => /build/samus/lib64/ld-linux-x86-64.so.2
>
>    libsamba-debug-samba4.so => None
>
>    libtalloc.so.2 => None
>
>    libbsd.so.0 => /build/samus/usr/lib64/libbsd.so.0
>    libc.so.6 => /build/samus/lib64/libc.so.6
>
> And readelf also shows that the RPATH entry is missing on these 2
> libraries.
>
> After some discovering that needs_private_lib() in
> buildtools/wafsamba/samba_utils.py was returning false for these 2 libs I
> further discovered this piece of code...
>
>     if bld.env.standalone_ctdb:
>         # If a combined build is implemented, CTDB will want to
>         # build against samba-util rather than samba-util-core.
>         # Similarly, other Samba subsystems expect samba-util.  So,
>         # for a standalone build, just define a fake samba-util
>         # subsystem that pulls in samba-util-core.
>         bld.SAMBA_SUBSYSTEM('samba-util',
>                             source='',
>                             deps='samba-util-core')
>
> Basically what happens is that the dependency of these 2 libraries on
> samba-util (which does successfully report that it needs private libs and
> gets a correct RPATH) gets replaced by this fake version and when
> needs_private_libs() checks if this has the private_library=True attribute
> it returns false. Even though samba-util-core does depend on private
> libraries.
>
> The workaround I found is to explicitly add a dep from these 2 libs to
> samba-debug. I've attached example patches for that. Though it seems a
> deeper fix would need to somehow allow those deps to propagate up through a
> SAMBA_SUBSYSTEM.
>
>
>


More information about the samba-technical mailing list