Re: Shared libraries



Hizzdizzoner <mattilinn@xxxxxxxxx> writes:

How can I stop Linux from requiring some libraries that were not
present when a shared library was compiled?
I have a problem with libpt_linux_x86_r.so.1.8.0 and libstdc++.so.6.
They were not present when chan_h323.so was compiled.

lk30:/usr/src/update # ldd lib/asterisk/modules/chan_h323.so
libh323_linux_x86_r.so.1.17.1 => /lib/libh323_linux_x86_r.so.1.17.1
(0x40035000)
libpt_linux_x86_r.so.1.9.0 => /lib/libpt_linux_x86_r.so.1.9.0
(0x40a55000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40e04000)
libssl.so.0.9.8 => /usr/local/lib/libssl.so.0.9.8 (0x40e54000)
libcrypto.so.0.9.8 => /usr/local/lib/libcrypto.so.0.9.8 (0x40e9a000)
libexpat.so.0 => /lib/libexpat.so.0 (0x40fe7000)
libresolv.so.2 => /lib/libresolv.so.2 (0x41007000)
libdl.so.2 => /lib/libdl.so.2 (0x4101a000)
libstdc++.so.5 => /lib/libstdc++.so.5 (0x4101d000)
libc.so.6 => /lib/libc.so.6 (0x410d5000)
libpt_linux_x86_r.so.1.8.0 => not found
libstdc++.so.6 => not found
libm.so.6 => /lib/libm.so.6 (0x4120b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4122e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

You cannot change what a library depends on without recompiling it.

(You could modify the library's ELF header, but the result will not
work.)

There's more going on here than just unsatisfied dependencies however:
your library depends on both libstdc++.so.5 and libstdc++.so.6,
something that is unlikely to work (even were both available). Somehow
you have ended up with an inconsistent build environment, you need to
fix this before proceeding.

--
http://www.greenend.org.uk/rjk/
.