[Mesa-dev] [PATCH v2] meson: Don't confuse the install and search paths for dri drivers
Emil Velikov
emil.l.velikov at gmail.com
Wed Jan 24 11:32:28 UTC 2018
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.
Thanks
Emil
More information about the mesa-dev
mailing list