<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jan 24, 2018 13:32, "Emil Velikov" <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On 23 January 2018 at 18:44, Dylan Baker <<a href="mailto:dylan@pnwbakers.com">dylan@pnwbakers.com</a>> wrote:<br>
> Quoting Emil Velikov (2018-01-19 10:28:18)<br>
>> On 17 January 2018 at 21:34, Dylan Baker <<a href="mailto:dylan@pnwbakers.com">dylan@pnwbakers.com</a>> wrote:<br>
>> > Currently there is not a separate option for setting the search path of<br>
>> > DRI drivers in meson, like there is in scons and autotools. This is an<br>
>> > oversight and needs to be fixed. This adds an extra option<br>
>> > `dri-search-path`, which will default to the value of<br>
>> > `dri-drivers-path`, like autotools does.<br>
>> ><br>
>> > v2: - Split input list before joining.<br>
>> ><br>
>> I was wondering for a while, if we really need both options in autotools.<br>
>><br>
>> Esp. since to use a custom loader one needs to<br>
>> LD_PRELOAD/LD_LIBRARY_PATH it already.<br>
>> Thus adding the LIBGL_DRIVERS_PATH is trivial, either way.<br>
>><br>
>> The following approach is a bit shorter and easier to read.<br>
>><br>
>> dri_search_path = get_option('dri-search-path')<br>
>> iif dri_search_path == ''<br>
>>   dri_search_path = dri_drivers_path<br>
>> endif<br>
>><br>
>> -Emil<br>
><br>
> That won't actually do what we want, because the argument is comma<br>
> delimited, but the pound define needs to be semi-colon delimited. I picked this approach<br>
> because when we move to a newer meson version we can take advantage of meson's<br>
> native array type argument, which use commas.<br>
><br>
> I'd be happy to drop this option if you want to drop it from autotools as well.<br>
><br>
</div>Actually the search path must be _colon_ delimited - as seen by the<br>
strchr(..., ':') in all three DRI loaders.<br>
<br>
Some digging showed that semi-colon has not worked for a while, if ever.<br>
GLX - 0896268b9767 back in 2009<br>
EGL - 42fa009e641c back in 2010<br>
GBM - 2ff797060d4f back in 2011<br>
<br>
Looking at different distros - Linux, BSD, even more exotic ones like<br>
NixOS and GNU Hurd (guix):<br>
None pass multiple paths to --with-dri-searchpath, so we can just say<br>
the option takes a single path and tweak the help string.<br>
<br>
s/semicolon delimited DRI driver search directories/directory searched<br>
for DRI drivers/<br>
s/directory for the DRI drivers/directory where DRI drivers are installed/<br>
<br>
Ilia, others<br>
Can we buy you to use LIBGL_DRIVERS_PATH instead of the<br>
--with-dri-searchpath option?<br>
Alternatively, making --with-dri-searchpath a single path [as opposed<br>
to a list of paths] should keep your dev. setup in shape while<br>
cleaning the mess a tiny bit.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Here's the usecase:</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">What's the difficulty in passing string args through the build? Sound like the problems you're hitting are largely artificial.</div><div dir="auto"><br></div><div dir="auto">  -ilia</div><div dir="auto"><div class="gmail_extra"><br></div></div></div>