On 9-Nov-05, at 19:30 , David Bacher wrote:


On 11/9/05, Trevor Harmon <[EMAIL PROTECTED]> wrote:
I do basically the same thing. It's largely a trial-and-error
process, unfortunately. And even then, sometimes you still don't know
whether there is some dynamic dependency that you don't know about
until it fails at runtime.

I'm sure it doesn't work in general to detect all dependencies (static libs and external programs invoked at runtime come to mind), but otool -L <binary> is your friend.

In pseudocode:

* Build and install your package to an isolated location
* find | file | grep to create a list of all binary objects
* otool -L each binary | grep /sw
* for each dependency in /sw, look up its package

Just to be sure I understand: you propose to build outside of fink (i.e. an isolated location).

It isn't obvious to me how I interpret the output of otool -L.   Some lines can be connected to obvious fink packages, but many don't directly match up.  Is there some way to find which package provides a particular dylib?  Some other command I can run, or some reference I can refer to?  

For example, to help me understand how to use otool -L, which Depends and BuildDepends would I need if I get the following output?

% otool -L xfplan
xfplan:
        /sw/lib/libgnomeui.32.dylib (compatibility version 47.0.0, current version 47.1.0)
        /sw/lib/libart_lgpl.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /sw/lib/libgdk_imlib.1.dylib (compatibility version 11.0.0, current version 11.14.0)
        /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0)
        /sw/lib/libgtk-1.2.0.dylib (compatibility version 10.0.0, current version 10.1.0)
        /sw/lib/libgdk-1.2.0.dylib (compatibility version 10.0.0, current version 10.1.0)
        /sw/lib/libgmodule-1.2.0.dylib (compatibility version 1.0.0, current version 1.10.0)
        /sw/lib/libintl.1.dylib (compatibility version 2.0.0, current version 2.1.0)
        /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0)
        /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /sw/lib/libgnome.32.dylib (compatibility version 37.0.0, current version 37.3.0)
        /sw/lib/libgnomesupport.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /sw/lib/libesd.0.dylib (compatibility version 3.0.0, current version 3.36.0)
        /sw/lib/libaudiofile.0.dylib (compatibility version 1.0.0, current version 1.2.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.2)
        /sw/lib/libglib-1.2.0.dylib (compatibility version 1.0.0, current version 1.10.0)

libgnomeui.32.dylib looks like it is probably from one of the libgnomeui2 packages, and the only one of the bunch that is installed is libgnomeui2-shlibs.

libart_lgpl.2.dylib could be libart2 and/or libart2-shlibs, both of which are installed.  How do I know if I need both?

libgdk_imlib.1.dylib - is this from gdk-pixbuf-shlibs?

/usr/X11R6/lib/libSM.6.dylib - not a fink package, but in X11, so I assume that means I need x11 as a Depends.  Same thing with the other ones in /usr/X11.

/sw/lib/libgtk-1.2.0.dylib - I have gtk+, gtk+-data and gtk+-shlibs installed.  Which do I need?

/sw/lib/libintl.1.dylib - fink list intl produces nothing.  Where does this one come from?

/sw/lib/libgnome.32.dylib - I've got libgnome2, libgnome2-dev and libgnome2-shlib installed.  Which do I need?

/sw/lib/libgnomesupport.0.dylib - fink list libgnomesupport produces nothing.  Where does this one come from?

/sw/lib/libesd.0.dylib - fink list esd produces nothing.  Is this from esound?  If so, I've got multiple esound packages installed.  Which is this from?

/sw/lib/libaudiofile.0.dylib - I've got audiofile, audiofile-bin and audiofile-shlibs installed.  Which do I need?

/usr/lib/libSystem.B.dylib - This is not from Fink, so I assume it can be ignored.

/sw/lib/libglib-1.2.0.dylib - I assume this refers to glib, and not glib2, as the version numbers of glib seem a better match.  But I've got glib and glib-shlibs installed.  Which do I need?

Thanks,


Kevin Horton
Ottawa, Canada



Reply via email to