Subject: AIGLX, MesaLib, and libpthread issues: *solved*
To: None <>
From: Blair Sadewitz <>
List: tech-x11
Date: 04/13/2007 01:27:37
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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).

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 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.

Support WFMU-FM: free-form radio for the masses!

"The frivolity and boredom which unsettle the established order, the
vague foreboding of something unknown, these are the heralds of
approaching change.  The gradual crumbling that left unaltered the
face of the whole is cut short by a sunburst which, in one flash,
illuminates the features of the new world."  --G.W.F. Hegel,
_Phenomenology of Spirit_ 5:11

Content-Type: application/octet-stream; name="configure.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="configure.patch"