[Mesa-dev] [RFC] glx: Prefer library path given by pkgconfig over the system

Aaron Watry awatry at gmail.com
Tue Mar 21 14:49:12 UTC 2017


On Mon, Mar 20, 2017 at 4:03 PM, Grazvydas Ignotas <notasas at gmail.com>
wrote:

> On Mon, Mar 20, 2017 at 9:43 PM, Pohjolainen, Topi
> <topi.pohjolainen at gmail.com> wrote:
> > On Mon, Mar 20, 2017 at 04:45:22PM +0000, Emil Velikov wrote:
> >> On 20 March 2017 at 10:27, Grazvydas Ignotas <notasas at gmail.com> wrote:
> >> > On Mon, Mar 20, 2017 at 11:28 AM, Topi Pohjolainen
> >> > <topi.pohjolainen at gmail.com> wrote:
> >> >> Recent change to use drmGetDevices2() made me realize that
> >> >> build configured using
> >> >>
> >> >> PKG_CONFIG_PATH=my_drm_lib_path/pkgconfig ./autogen.sh
> >> >>
> >> >> considers the libdrm path gotten from pkgconfig only during
> >> >> make. When invoking "make install" the relink command puts
> >> >> system library ahead of the path gotten from pkgconfig
> >> >> (and starts to fail as system libdrm isn't new enough).
> >> >>
> >> >> This change forces the relink command to respect pkgconfig
> >> >> settings.
> >> >
> >> > Nice, this issue is really annoying, and using Emil's workarounds from
> >> > bug 100259 is cumbersome.
> >> Indeed they are - too many bugs to get around to sorting libtool, I'm
> afraid :-\
> >>
> >> > Tested-by: Grazvydas Ignotas <notasas at gmail.com>
> >> >
> >> >>
> >> >> It looks to me that in
> >> >>
> >> >> https://bugs.freedesktop.org/show_bug.cgi?id=100259
> >> >>
> >> >> Emil et al are discussing similar case with gbm.
> >> >>
> >> >> CC: Matt Turner <mattst88 at gmail.com>
> >> >> CC: Emil Velikov <emil.velikov at collabora.com>
> >> >> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> >> >> ---
> >> >>  src/glx/Makefile.am | 1 +
> >> >>  1 file changed, 1 insertion(+)
> >> >>
> >> >> diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
> >> >> index 79d416a..ced5227 100644
> >> >> --- a/src/glx/Makefile.am
> >> >> +++ b/src/glx/Makefile.am
> >> >> @@ -175,6 +175,7 @@ GL_LIB_VERSION=1:2
> >> >>  endif
> >> >>
> >> >>  GL_LIBS = \
> >> >> +       $(LIBDRM_LIBS) \
> >> If we are to do this, please add a comment - "HACK" or "W/A" with why
> >> we need it/how it works.
> >> This way we can purge it in a few months as distros catch up ;-)
> >
> > Shouldn't there be something of this sort in general? Build system should
> > respect the configuration gotten from pkgconfig, right?
> >
> > And isn't libdrm upstream almost always ahead of distros. Once distros
> reach
> > 2.4.75 libdrm, upstream is likely to have moved forward, don't you think?
> >
> > I can keep this patch in my private tree to make it work for me in case
> there
> > aren't other people needing it.
>
> If I wasn't clear enough, there is at least one person.
>

This hit me a few nights ago as well. I eventually ended up forcibly
upgrading the system libdrm to a newer version, but it was annoying that
the libdrm I've got in /usr/local was being used during compile, but
ignored during the relink during 'make install' (after the entire build and
make check had already succeeded).

I agree that this is something that WILL happen again, and we might as well
get the install target to use the same settings as the build itself.

I can try to test this later today (either remotely, or after I get home),
if we need another guinea pig.

--Aaron


>
> GraÅžvydas
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170321/d5960473/attachment.html>


More information about the mesa-dev mailing list