Hi all,
Will ldd display the paths to different libraries depending on their locations?
I'm trying to build libxml2 version 2.9.6 in /usr/local with a newer version of zlib (1.2.8) than what are in the system folders for CentOS 6.8.
I get the following output from ldd:
$ ldd ./libxml2.so
./libxml2.so: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./libxml2.so)
linux-vdso.so.1 => (0x00007ffeb1789000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fce9e824000)
libz.so.1 => /lib64/libz.so.1 (0x00007fce9e60e000) <-- I expected /usr/local/lib here
libm.so.6 => /lib64/libm.so.6 (0x00007fce9e389000)
libc.so.6 => /lib64/libc.so.6 (0x00007fce9dff5000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d52a00000)
Yet the make itself for libxml2 seemed to exit without error.
>From otool on Mac OSX (same installation of libxml2/zlib) I see:
%otool -L libxml2.2.dylib
libxml2.2.dylib:
/usr/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)
/usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
/usr/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.0.0)
/usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libxml2, libz and libiconv were all installed in /usr/local so as not to over-write the OS versions.
Will ldd show similar correct paths for component libraries as otool does?
I'm trying to track down if there is an error in the Makefile target for the link phase of the library.
Thanks,
--Ed