Skip to content

patchelf 0.10 corrupts some shared libraries #170

Closed
@sjackman

Description

@sjackman

After using patchelf 0.10 to patch a shared library, ldd reports Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != NULL' failed!.

Steps to reproduce:

$ curl -L https://linuxbrew.bintray.com/bottles/glib-2.60.2.x86_64_linux.bottle.tar.gz | tar xz
$ patchelf --print-needed glib/2.60.2/lib/libglib-2.0.so.0.6000.2
libpcre.so.1
libpthread.so.0
libc.so.6
$ patchelf --print-rpath glib/2.60.2/lib/libglib-2.0.so.0.6000.2
@@HOMEBREW_PREFIX@@/lib
$ ldd glib/2.60.2/lib/libglib-2.0.so.0.6000.2
	linux-vdso.so.1 (0x00007ffce67eb000)
	libpcre.so.1 => not found
	libpthread.so.0 => /gsc/btl/linuxbrew/Cellar/glibc/2.23/lib/libpthread.so.0 (0x00007f36cfc68000)
	libc.so.6 => /gsc/btl/linuxbrew/Cellar/glibc/2.23/lib/libc.so.6 (0x00007f36cf8cc000)
	/gsc/btl/linuxbrew/Cellar/glibc/2.23/lib64/ld-linux-x86-64.so.2 (0x00007f36d01be000)
$ chmod +w glib/2.60.2/lib/libglib-2.0.so.0.6000.2
$ patchelf --set-rpath /home/linuxbrew/.linuxbrew/lib glib/2.60.2/lib/libglib-2.0.so.0.6000.2
$ patchelf --print-needed glib/2.60.2/lib/libglib-2.0.so.0.6000.2
$ patchelf --print-rpath glib/2.60.2/lib/libglib-2.0.so.0.6000.2

$ ldd glib/2.60.2/lib/libglib-2.0.so.0.6000.2
Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != NULL' failed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions