Subject: AIGLX, MesaLib, and libpthread issues: *solved*
To: None <tech-x11@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: tech-x11
Date: 04/13/2007 01:27:37
------=_Part_612_24640267.1176442057734
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 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.
--Blair
--
Support WFMU-FM: free-form radio for the masses!
<http://www.wfmu.org/>
"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
------=_Part_612_24640267.1176442057734
Content-Type: application/octet-stream; name="configure.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="configure.patch"
JE5ldEJTRCQKCi0tLSBjb25maWd1cmUub3JpZwkyMDA2LTExLTMwIDIwOjUwOjQ5LjAwMDAwMDAw
MCAtMDUwMAorKysgY29uZmlndXJlCkBAIC0yMzUwNyw4ICsyMzUwNyw4IEBAIGNhdCA+PmNvbmZ0
ZXN0LiRhY19leHQgPDxfQUNFT0YKICNpZmRlZiBfX2NwbHVzcGx1cwogZXh0ZXJuICJDIgogI2Vu
ZGlmCi1jaGFyIHB0aHJlYWRfc2VsZiAoKTsKLWludAorI2luY2x1ZGUgPHB0aHJlYWQuaD4KK3B0
aHJlYWRfdAogbWFpbiAoKQogewogcmV0dXJuIHB0aHJlYWRfc2VsZiAoKTsKQEAgLTIzNTkwLDYg
KzIzNTkwLDggQEAgaWYgdGVzdCB4JHh0aHJlYWRzID0geHllcyA7IHRoZW4KICAgICAgICAgWFRI
UkVBRExJQj0iLXB0aHJlYWQiIDs7CiAgICAgZHJhZ29uZmx5KikKICAgICAgICAgWFRIUkVBRExJ
Qj0iLXB0aHJlYWQiIDs7CisgICAgbmV0YnNkKikKKwlYVEhSRUFETElCPSItbHB0aHJlYWQiIDs7
CiAgICAgc29sYXJpcyopCiAJWFRIUkVBRF9DRkxBR1M9Ii1EX1JFRU5UUkFOVCAtRF9QT1NJWF9Q
VEhSRUFEX1NFTUFOVElDUyIgOzsKICAgICBlc2FjCg==
------=_Part_612_24640267.1176442057734--