[Xcb] [RFC PATCH] New XCB socket handoff mechanism for Xlib/XCB and other libraries

Jamey Sharp jamey at minilop.net
Sat Mar 15 23:32:18 PDT 2008

On Sun, Mar 16, 2008 at 06:55:23AM +0100, Vincent Torri wrote:
> it's too complicated for me, so i just have a small (and maybe stupid) 
> question: will it break abi ?

The short answer is "no, this does not break API or ABI", but the
details are a bit tricky.

These patches do not break the API or ABI of libxcb; they do introduce
new interfaces, so new programs built against the libxcb will require
the new libxcb at runtime, but old applications built against libxcb
will continue to work.

However, the patches remove libxcb-xlib and xcbxlib.h entirely, since
they existed solely to provide access to the old Xlib-specific
interface.  Anything depending on libxcb-xlib will have to switch to the
new handoff interface.  To the best of our knowledge, only Xlib links to
libxcb-xlib, and the patches convert Xlib to the new interface;
certainly nothing else *should* have used libxcb-xlib.

Unfortunately, Xlib and XCB must be upgraded at the same time. Though we
tried, we believe the libxcb-xlib interface cannot be implemented on top
of the new handoff system, at least not without reintroducing into
libxcb something like the xcb-xlib lock that we worked so hard to

However, shared library versioning should prevent any silent failures if
you don't upgrade simultaneously.  New Xlib/XCB will neither build nor
run without new XCB.  If you install new libxcb and remove the old
libxcb-xlib, Xlib will fail to load.  If you install new libxcb and
leave the old libxcb-xlib around, libxcb-xlib should fail to load due to
missing symbols.  In all cases, if you get this wrong, you'll know it,
because you'll get a dynamic linker error.

Distribution packages can address this problem through the use of
dependencies and conflicts, to ensure that the two libraries upgrade
simultaneously.  Make the new libxcb package conflict with the old
libxcb-xlib package.

As for the sentiment of "complicated", please do let us know if you have
any concerns or if you believe it needs a more detailed explanation.  We
found that the new interface simplified implementation in both Xlib and

- Jamey Sharp and Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20080315/dd84a5a2/attachment.pgp 

More information about the Xcb mailing list