Skip to content

RPATH is not inhereted by dependencies #1196

Open
@48cf

Description

@48cf

systemd shared libraries and binaries are installed under /usr/lib/systemd, while binaries do have RPATH set the shared libraries don't and the dynamic linker fails to find other systemd libraries when they depend on each other

[    1.579582] Run /usr/sbin/init as init process
Could not satisfy dependency libsystemd-shared-256.so
czapek@raptor-wsl:~/src/linux-mlibc$ readelf -d build/system-root/usr/lib/systemd/systemd

Dynamic section at offset 0x17488 contains 31 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-core-256.so]
 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-shared-256.so]
 0x0000000000000001 (NEEDED)             Shared library: [libssp.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
 0x000000000000000f (RPATH)              Library rpath: [/usr/lib/systemd]
czapek@raptor-wsl:~/src/linux-mlibc$ readelf -d build/system-root/usr/lib/systemd/libsystemd-core-256.so

Dynamic section at offset 0x20d158 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-shared-256.so]
 0x0000000000000001 (NEEDED)             Shared library: [libmount.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libssp.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
 0x000000000000000e (SONAME)             Library soname: [libsystemd-core-256.so]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue reports a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions