Subject: Re: libGLU in mesa-dri
To: Blair Sadewitz <>
From: Dieter Baron <>
List: tech-x11
Date: 04/17/2007 01:04:24

> I'm actually having issues if I don't explicitly link anything that
> links to libGL against libXxf86vm and libdrm; ldd says that libGL is
> "not found".  I'm not sure what's going on here.  Are we missing a
> linker flag?

  libGL needs to be linked against libXxf86vm and libdrm.  At least in
my build, it is not:

ldd /usr/local/
        -lXau.6 => /usr/local/lib/
        -lXdmcp.6 => /usr/local/lib/
        -lX11.6 => /usr/local/lib/
        -lXext.6 => /usr/local/lib/
        -lm.0 => /usr/lib/
        -lm.0 => /usr/lib/
        -lpthread.0 => /usr/lib/

  I'll have a look at this.  My guess is either a missing -lXxf86vm
-ldrm in the Makefiles or a screwup in mklib.

> I'm thinking that maybe we should libtoolize a build of MesaLib,
> optionally using the dri configuration.  Then, for DRI, we can build
> the drivers and libmesa.a without libtool and worry about that later.
> What do you think?

  I wont do the work, but I won't complain if others do it, either.

>  I'm not sure how critical using libtool is for
> pkgsrc overall, but given that the mesa libraries are libtoolized,
> there may be other packages which in some way depend upon the
> information in the .la files.

  At least on NetBSD, it's not very important.  libtool can use the
.la files to link against dependent libraries, but if the library is
built correctly, that isn't necessary.

> libXdamage and the rest are not necessary; they're for other libraries
> and/or programs.

  Okay.  Have you removed them?

>  Attached is the current state of the MesaLib package
> that I use. The main thing that needs to be done is add options for
> the drivers and PLIST substitution.

  Thanks, I'll have a look at it.  Maybe we should just commit it to
wip, possibly on a branch.  It certainly would make collaborating on
it easier.