[Mesa-dev] [PATCH v2] meson: Don't confuse the install and search paths for dri drivers
Ilia Mirkin
imirkin at alum.mit.edu
Wed Jan 24 13:54:48 UTC 2018
On Jan 24, 2018 13:32, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
On 23 January 2018 at 18:44, Dylan Baker <dylan at pnwbakers.com> wrote:
> Quoting Emil Velikov (2018-01-19 10:28:18)
>> On 17 January 2018 at 21:34, Dylan Baker <dylan at pnwbakers.com> wrote:
>> > Currently there is not a separate option for setting the search path of
>> > DRI drivers in meson, like there is in scons and autotools. This is an
>> > oversight and needs to be fixed. This adds an extra option
>> > `dri-search-path`, which will default to the value of
>> > `dri-drivers-path`, like autotools does.
>> >
>> > v2: - Split input list before joining.
>> >
>> I was wondering for a while, if we really need both options in autotools.
>>
>> Esp. since to use a custom loader one needs to
>> LD_PRELOAD/LD_LIBRARY_PATH it already.
>> Thus adding the LIBGL_DRIVERS_PATH is trivial, either way.
>>
>> The following approach is a bit shorter and easier to read.
>>
>> dri_search_path = get_option('dri-search-path')
>> iif dri_search_path == ''
>> dri_search_path = dri_drivers_path
>> endif
>>
>> -Emil
>
> That won't actually do what we want, because the argument is comma
> delimited, but the pound define needs to be semi-colon delimited. I
picked this approach
> because when we move to a newer meson version we can take advantage of
meson's
> native array type argument, which use commas.
>
> I'd be happy to drop this option if you want to drop it from autotools as
well.
>
Actually the search path must be _colon_ delimited - as seen by the
strchr(..., ':') in all three DRI loaders.
Some digging showed that semi-colon has not worked for a while, if ever.
GLX - 0896268b9767 back in 2009
EGL - 42fa009e641c back in 2010
GBM - 2ff797060d4f back in 2011
Looking at different distros - Linux, BSD, even more exotic ones like
NixOS and GNU Hurd (guix):
None pass multiple paths to --with-dri-searchpath, so we can just say
the option takes a single path and tweak the help string.
s/semicolon delimited DRI driver search directories/directory searched
for DRI drivers/
s/directory for the DRI drivers/directory where DRI drivers are installed/
Ilia, others
Can we buy you to use LIBGL_DRIVERS_PATH instead of the
--with-dri-searchpath option?
Alternatively, making --with-dri-searchpath a single path [as opposed
to a list of paths] should keep your dev. setup in shape while
cleaning the mess a tiny bit.
Here's the usecase:
I want to crosscompile. At install time, the results have to go into a
chroot. The machine that runs out of the chroot would like things to work.
I don't think setting environment cars, esp ones as unadvisable as libgl
driver's path is an acceptable solution. Perhaps there's some destdir thing
I should be using, never looked into it.
Otoh it's the first I hear that the search path can be multiple things.
Can't think of a use case for that off the top of my head, but perhaps
there is one.
What's the difficulty in passing string args through the build? Sound like
the problems you're hitting are largely artificial.
-ilia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180124/0f70235a/attachment.html>
More information about the mesa-dev
mailing list