[Xcb] [PATCH:libX11] Don't need to link libX11-xcb against libX11
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Nov 22 10:22:55 PST 2013
On 11/21/13 02:06 PM, Adam Jackson wrote:
> On Wed, 2013-11-20 at 16:23 -0800, Josh Triplett wrote:
>> On Fri, Nov 15, 2013 at 06:03:25PM -0800, Alan Coopersmith wrote:
>>> libX11-xcb only accesses data structures defined in X11 headers,
>>> it doesn't call any functions or reference any global variables
>>> in libX11 itself. (Seems to have been left from previous XCL
>>> implementation.)
>>>
>>> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
>>
>> That's not the only reason for this dependency. As you said, libX11-xcb
>> accesses data structures defined in libX11 headers. In particular, it
>> relies on the newly added "xcb" field in Display. Without a dependency
>> on libX11, it would be possible for an application to link with
>> libX11-xcb and with an older version of libX11 that does not have the
>> "xcb" field (and doesn't use libxcb underneath).
>
> That argument doesn't make sense. Nothing about the way that dependency
> is expressed requires a "sufficiently new" libX11. All that's required
> is that it have a soname of libX11.so.6, which even pre-xcb libX11's
> had.
Basically all libX11's since X11R6.0 in 1994 have had that soname. (On Solaris,
we actually still ship as libX11.so.4, since there were no ABI breaks we needed
to bump soname for in X11R5 or R6.)
And at least with Solaris library versioning this doesn't help either, since
we only record versions as being required if you link to a symbol from them,
and this doesn't.
I mainly noticed this when I turned on ld debugging to look at another issue and
noticed libX11 was being discarded as unneeded by our equivalent of --as-needed.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list