graphics/dri: pkg-config metadata should probably list -pthread in libraries

Andriy Gapon avg at icyb.net.ua
Tue Jun 30 18:31:27 UTC 2009


Robert,

I think that the following should not be a port patch but rather should be sent to
upstream developers (Mesa) for a discussion.

I propose to augment src/mesa/drivers/dri/dri.pc.in with something like the following:
 Requires.private: @DRI_PC_REQ_PRIV@
 Cflags: -I${includedir}
+Libs: @GL_PC_LIB_PRIV@

Right now we have:
$ pkg-config --libs dri
<nothing>

But drivers (shared objects) installed by this port are all linked with a thread
library. On FreeBSD this means that any executable using (loading) those drivers
should also be linked to a threads library. But this is not reflected pkg-config
meta-data. As a result, for example, X may be not linked to a threading library
resulting in a crash on certain pthread_* calls.

-- 
Andriy Gapon


More information about the freebsd-x11 mailing list