Subject: Re: AIGLX, MesaLib, and libpthread issues: *solved*
To: Blair Sadewitz <email@example.com>
From: Eric Anholt <firstname.lastname@example.org>
Date: 04/13/2007 11:34:04
On Fri, 2007-04-13 at 01:27 -0400, Blair Sadewitz wrote:
> OK, here's the deal:
> 1) libX11 in pkgsrc was being built with its own thread stubs. This
> is wrong, as NetBSD provides thread stubs; it wasn't detecting them
> because it wasn't including <pthread.h> during the autodetection. A
> patch for this is attached.
> 2) _Don't_ link the Xorg server nor _any library in Mesa_ with
> -lpthread. It is merely thread-aware, and only needs stubs. If it's
> used by a threaded program, it will work automagically.
> In addition to removing -lpthread from all "LIB_DEPS" in the config
> files, you have to remove it from src/mesa/drivers/dri/glcore/Makefile
> as well (it's in the rule for libmesa.a).
I'm glad to hear this. For XCB, the solution they chose was to make a
little module called "thread-stubs" which installs either a library
containing thread stubs, or nothing, and provides a .pc file for
thread-stubs which will link the library or nothing as appropriate for
your OS. It might make sense to fix that package for NetBSD if
necessary and switch Mesa and non-XCBed libX11 to using it.
> That's it, I think, but I might be forgetting something. Oh, yeah, in
> order to build many packages properly with Mesa 6.5.2, you need to
> change -DGLX_GLXEXT_LEGACY in the buildlink3.mk file to
> -DGLX_GLXEXT_PROTOTYPES. If this is not done, programs won't get what
> they want from the headers (qt3 and glitz are examples).
> Also, the mesa-dri package should not build libGLU, and it should not
> install most of those header files. I will fix up this package if it
> is OK with the maintainer.
> Let me know how this works out for you guys.
Eric Anholt anholt@FreeBSD.org
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
-----END PGP SIGNATURE-----