[Xcb] XCB on *BSD: many pthread-related problems
Diego 'Flameeyes' Pettenò
flameeyes at gentoo.org
Fri Nov 3 12:46:57 PST 2006
So, I've been trying to find why X didn't start after having it built fine
with xcb enabled... and I've seen there's a little big mess with it on
FreeBSD (and DragonFly and OpenBSD at least, not sure on NetBSD, but it's
likely to be the same).
Background: on *BSD systems there's more than one library providing pthread
functions, the result is that the -pthread flag (as well as -lpthread) does
not link the threading libraries when producing a shared object, but only
when the final executable is generated, so that you don't end up with two
different threading implementations in a single executable (that will result
in a crash); when linking a non-threaded program to a threaded library, you
_need_ to pass -pthread to it to let it build correctly.
libX11 wasn't threaded previously, but libxcb and libxcb-xlib are now. The
result is that programs linking to libX11 will now need to use -pthread to
finalise the link, or they won't work. The patches I've sent today will fix
this problem for the packages using pkg-config to locate libX11 (mostly
modular-x packages right now, I suppose), but for everything else, a lot of
patching will be needed for xcb to be usable on FreeBSD (unless of course
Ports will try again to cut the edge and tinker with packages without fixing
the issue properly).
I'll try to provide some quick ways to work around the issue, fixing the
packages I can find broken on my system, but I'd sure welcome some help :) Or
even just an acknowldgement that I'm not doing this pointlessy.
--
Diego "Flameeyes" Pettenò - http://farragut.flameeyes.is-a-geek.org/
Gentoo/Alt lead, Gentoo/FreeBSD, Video, Sound, ALSA, PAM, KDE, CJK, Ruby ...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061103/155b158c/attachment.pgp
More information about the Xcb
mailing list