Hylton, Today's a bit of a slow day, so I've done it all for you. See below. On Monday 24 January 2005 01:08, Hylton Conacher (ZR1HPC) wrote:
Randall R Schulz wrote: ...
% ldd /usr/local/mozilla1.7.5/mozilla-bin.......
[snip] Sorry to jump in here but the actual question still remains.
Whilst ldd does print shared library dependencies, reading the man page doesn't seem to help me determine what the command would be to create a list of files shared between OOo and Mozilla ie $ldd -v mozilla OpenOffice.org > ~/Sharedfilelist
Personally, I'm finding it to be harder to find all the OOo binaries... This command will list all the non-shared object binary files (i.e., executable or object code files) in the OpenOffice.org directory hierarchy: % find /opt/OpenOffice.org/ -type f \ |xargs file \ |egrep executable \ |sed -e 's/: .*//' Make that a shell procedure that takes the base directory of the program suite as its sole argument: findBinaries() { find "$1" -type f \ |xargs file \ |egrep executable \ |sed -e 's/: .*//' } Next, use ldd and apply some sed post-processing and you'll get a list of the shared object files required: ldd executableFile \ |sed \ -e $'s/^[ \t][ \t]*.* => //' \ -e 's/ (0x[0-9a-f][0-9a-f]*)$//' \ -e $'/^[ \t]*$/d' \ -e '/not found/d' Make this filter into a shell procedure, adding "sort -u" to remove duplicates when the result of multiple invocations of "ldd" are supplied as input: lddCompact() { sed \ -e $'s/^[ \t][ \t]*.* => //' \ -e 's/ (0x[0-9a-f][0-9a-f]*)$//' \ -e $'/^[ \t]*$/d' \ -e '/not found/d' \ |sort -u } To get the list for all the shared objects used by OpenOffice.org, do this: for OOoBinary in $( findBinaries /opt/OpenOffice.org ); do ldd "$OOoBinary" done \ |lddCompact On my 9.1 system (with the KDE 3.3.2 supplementary update installed and always up-to-date via YOU) the list of shared libraries produced is: /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libgcc_s.so.1 /lib/libz.so.1 /lib/tls/libc.so.6 /lib/tls/libm.so.6 /lib/tls/libpthread.so.0 /opt/gnome/lib/libatk-1.0.so.0 /opt/gnome/lib/libgdk_pixbuf-2.0.so.0 /opt/gnome/lib/libgdk-x11-2.0.so.0 /opt/gnome/lib/libglib-2.0.so.0 /opt/gnome/lib/libgmodule-2.0.so.0 /opt/gnome/lib/libgobject-2.0.so.0 /opt/gnome/lib/libgtk-x11-2.0.so.0 /opt/gnome/lib/libpango-1.0.so.0 /opt/gnome/lib/libpangox-1.0.so.0 /opt/gnome/lib/libpangoxft-1.0.so.0 /opt/OpenOffice.org/program/libcomphelp3gcc3.so /opt/OpenOffice.org/program/libcppuhelpergcc3.so.3 /opt/OpenOffice.org/program/libcppu.so.3 /opt/OpenOffice.org/program/libicudata.so.22 /opt/OpenOffice.org/program/libicuuc.so.22 /opt/OpenOffice.org/program/libjvmaccessgcc3.so.3 /opt/OpenOffice.org/program/libpkgchk645li.so /opt/OpenOffice.org/program/libpsp645li.so /opt/OpenOffice.org/program/libsalhelpergcc3.so.3 /opt/OpenOffice.org/program/libsal.so.3 /opt/OpenOffice.org/program/libsb645li.so /opt/OpenOffice.org/program/libset645li.so /opt/OpenOffice.org/program/libsot645li.so /opt/OpenOffice.org/program/libspa645li.so /opt/OpenOffice.org/program/libstlport_gcc.so /opt/OpenOffice.org/program/libsvl645li.so /opt/OpenOffice.org/program/libsvt645li.so /opt/OpenOffice.org/program/libtk645li.so /opt/OpenOffice.org/program/libtl645li.so /opt/OpenOffice.org/program/libucbhelper2gcc3.so /opt/OpenOffice.org/program/libutl645li.so /opt/OpenOffice.org/program/libvos3gcc3.so /opt/OpenOffice.org/program/libxcr645li.so /usr/lib/libexpat.so.0 /usr/lib/libfontconfig.so.1 /usr/lib/libfreetype.so.6 /usr/lib/libstdc++.so.5 /usr/X11R6/lib/libICE.so.6 /usr/X11R6/lib/libSM.so.6 /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libXaw.so.7 /usr/X11R6/lib/libXext.so.6 /usr/X11R6/lib/libXft.so.2 /usr/X11R6/lib/libXi.so.6 /usr/X11R6/lib/libXmu.so.6 /usr/X11R6/lib/libXpm.so.4 /usr/X11R6/lib/libXrandr.so.2 /usr/X11R6/lib/libXrender.so.1 /usr/X11R6/lib/libXt.so.6 Now do the same for Mozilla: for mozillaBinary in $( findBinaries /usr/local/mozilla1.7.5 ); do ldd "$mozillaBinary" done \ |lddCompact /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libgcc_s.so.1 /lib/tls/libc.so.6 /lib/tls/libm.so.6 /lib/tls/libpthread.so.0 /opt/gnome/lib/libatk-1.0.so.0 /opt/gnome/lib/libgdk_pixbuf-2.0.so.0 /opt/gnome/lib/libgdk-x11-2.0.so.0 /opt/gnome/lib/libglib-2.0.so.0 /opt/gnome/lib/libgmodule-2.0.so.0 /opt/gnome/lib/libgobject-2.0.so.0 /opt/gnome/lib/libgtk-x11-2.0.so.0 /opt/gnome/lib/libpango-1.0.so.0 /opt/gnome/lib/libpangox-1.0.so.0 /opt/gnome/lib/libpangoxft-1.0.so.0 /usr/lib/libexpat.so.0 /usr/lib/libfontconfig.so.1 /usr/lib/libfreetype.so.6 /usr/lib/libstdc++.so.5 /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libXext.so.6 /usr/X11R6/lib/libXft.so.2 /usr/X11R6/lib/libXi.so.6 /usr/X11R6/lib/libXrandr.so.2 /usr/X11R6/lib/libXrender.so.1 So, there you have it. The list of shared object dependencies for Mozilla and for OpenOffice.org. You can concatenate and sort them (without the -u option) and find repeated lines to see what's shared between the two (sets of) applications. On my system, that leaves these: /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libgcc_s.so.1 /lib/tls/libc.so.6 /lib/tls/libm.so.6 /lib/tls/libpthread.so.0 /opt/gnome/lib/libatk-1.0.so.0 /opt/gnome/lib/libgdk_pixbuf-2.0.so.0 /opt/gnome/lib/libgdk-x11-2.0.so.0 /opt/gnome/lib/libglib-2.0.so.0 /opt/gnome/lib/libgmodule-2.0.so.0 /opt/gnome/lib/libgobject-2.0.so.0 /opt/gnome/lib/libgtk-x11-2.0.so.0 /opt/gnome/lib/libpango-1.0.so.0 /opt/gnome/lib/libpangox-1.0.so.0 /opt/gnome/lib/libpangoxft-1.0.so.0 /usr/lib/libexpat.so.0 /usr/lib/libfontconfig.so.1 /usr/lib/libfreetype.so.6 /usr/lib/libstdc++.so.5 /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libXext.so.6 /usr/X11R6/lib/libXft.so.2 /usr/X11R6/lib/libXi.so.6 /usr/X11R6/lib/libXrandr.so.2 /usr/X11R6/lib/libXrender.so.1 Ain't Unix Grand! Randall Schulz