Re: Dependency libraries and ABI
- From: Havoc Pennington <hp redhat com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org, keithp keithp com
- Subject: Re: Dependency libraries and ABI
- Date: 27 Feb 2002 14:38:21 -0500
Owen Taylor <otaylor redhat com> writes:
> My best idea right now is to:
>
> - 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
>
> - Say that if you want ABI compatibility, you can't reference symbols
> in libXft.so.1 from your application, and check this in whatever
> platform ABI xchecking tools are in use.
>
I already said this to Owen, but to point out to others; this is
extremely, extremely suboptimal. App developers will screw this up
left and right and when we move to new Xft/freetype, app binaries
_will_ break, I have no doubt about it.
So very screwed.
If the 2.0 deadline weren't so soon, we could have moved to some kind
of !RTLD_GLOBAL dlopen() scheme, but I don't think it's portable, it
would make a big mess of the code, and it's basically too late for
2.0.
It's probably over the top to cut-and-paste all of old Xft and run a
sed job to change the namespace, right...
The pkg-config hack either creates a perpetual "I can't statically
link!" FAQ or has the wrong default and creates zillions of apps that
link to old Xft directly. Plus we'd need the hack deployed this week
and need some way to force people to use the new pkg-config.
(I can imagine a couple new fields in .pc files to help out:
Conflicts-Flags: -lXft
Requires: pkg-config >= 0.12
)
This situation really sucks... what does Qt do about this? dlopen?
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]