Re: Dependency libraries and ABI



Owen Taylor <otaylor redhat com> writes:

>  - Omit dependency libraries from the pkg-config output lines if we
>    think we are on a platform that support shared library dependencies.
>    We could autodetect this or, more simply, have a configuration
>    option --disable-direct-dependencies (or something.)
> 
>    [ This breaks static linking, of course, but not many people want to 
>    static link. In the future, we can enhance pkg-config to have some
>    special support for static-linking-only dependencies. ]
> 
>    This means that libgtk-2.0.so.0 will pull in libXft.so.1, but the
>    app won't pull it in explicitely, so as long as the app isn't
>    using Xft directly, we can change GTK+ to link against libXft.so.2

Remving -lXft from the .pc file won't be enough, because libtool
stores this dependency in its .la file and may pull -lXft in again
for every binary/library (transitivly) linked with -lpangoxft. As
long as libtool is involved and libtool's .la files are not removed
after installation, more things linked against gtk may be linked against
Xft (at least on Linux or Solaris, libtool on other platform may vary),
regardless of what is in the .pc file:

> libtool --version
ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52)
> libtool --mode=link gcc -o foo foo.c -L/gnome2 -lgtk-x11-1.3
gcc -o foo foo.c  -L/gnome-2/lib /gnome-2/lib/libgtk-x11-1.3.so /gnome-2/lib/libgdk-x11-1.3.so /gnome-2/lib/libgdk_pixbuf-1.3.so -L/usr/X11R6/lib -L/usr/lib /gnome-2/lib/libpangox.so /gnome-2/lib/libpangoxft.so -lXft -lXrender -lXext -lX11 /usr/lib/libfreetype.so /gnome-2/lib/libpango.so /gnome-2/lib/libatk.so /gnome-2/lib/libgobject-1.3.so /gnome-2/lib/libgmodule-1.3.so -ldl /gnome-2/lib/libglib-1.3.so -lm -Wl,--rpath -Wl,/gnome-2/lib -Wl,--rpath -Wl,/gnome-2/lib


Regards,
Mirko Streckenbach.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]