Bug 109698 - dri.pc contents invalid when built with meson
Summary: dri.pc contents invalid when built with meson
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium critical
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-20 23:11 UTC by Jeremy Whiting
Modified: 2019-02-25 16:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jeremy Whiting 2019-02-20 23:11:53 UTC
When debian packaging built mesa 18.3.2-1 with meson build system using the following configuration parameters:

-Ddri-drivers-path=/usr/lib/$(DEB_HOST_MULTIARCH)/dri
-Ddri-search-path='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri'

dri.pc got the following incorrect dridriverdir:

dridriverdir=/usr//usr/lib/x86_64-linux-gnu/dri

which caused xorg-server built against it to try to dlopen the glx libraries from the wrong path since xorg-xserver's configure uses pkg-config --variable=dridriverdir dri to get the path to dlopen glx libraries from.

Removing the two -Ddri-*-path configuration parameters from debian/rules seems to have fixed the problem which has also been reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922807
Comment 1 Sergii Romantsov 2019-02-21 08:34:36 UTC
Hello, Jeremy.
Looks like during meson configuration you are also using --prefix=/usr
So if at this moment as workaround option dri-drivers-path will exclude a 'prefix' from path it should work, like:
-Ddri-drivers-path=/lib/$(DEB_HOST_MULTIARCH)/dri

Also patch to mesa proposed: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/285
Could you, please, try if it fixes issue?
Comment 2 Emil Velikov 2019-02-21 10:42:09 UTC
AFAICT there are two issues here.

1. the prefix wrongfully added to the custom variable
2. the custom variable can be a list of paths separated by colon, yet only the first one ends up in dri.pc

Perhaps one process of prefixing (1) also broke the multiple paths (2)?
Comment 3 Emil Velikov 2019-02-25 16:12:48 UTC
Should be fixed with the following. Expect the commit to land in 18.3 and 19.0 in due time.

commit f6556ec7d126b31da37c08d7cb657250505e01a0
Author: Sergii Romantsov <sergii.romantsov@globallogic.com>
Date:   Thu Feb 21 10:28:11 2019 +0200

    dri: meson: do not prefix user provided dri-drivers-path

    The user can select the location where there dri drivers


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.