<div dir="ltr">If you recompile llvm and mesa each time, are there any downsides of using the shared libs?<div><br></div><div>I think there were some issues with some programs / games that had clashing symbols but I'm not sure if that's still an issue</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 13 Oct 2016 at 11:15 Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 13 October 2016 at 04:07, Michel Dänzer <<a href="mailto:michel@daenzer.net" class="gmail_msg" target="_blank">michel@daenzer.net</a>> wrote:<br class="gmail_msg">
> On 13/10/16 03:37 AM, Tobias Droste wrote:<br class="gmail_msg">
>> Am Mittwoch, 12. Oktober 2016, 11:53:50 CEST schrieb Emil Velikov:<br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> +LLVM_VERSION_REQUIRED_OPENCL=3.6.0<br class="gmail_msg">
>>>> +LLVM_VERSION_REQUIRED_R600=3.6.0<br class="gmail_msg">
>>>> +LLVM_VERSION_REQUIRED_RADEONSI=3.6.0<br class="gmail_msg">
>>><br class="gmail_msg">
>>> There's a small related gotcha: as-is at build time we get the<br class="gmail_msg">
>>> different codepaths thus, as people build against shared LLVM (hello<br class="gmail_msg">
>>> Archlinux, I'm looking at you) and update their LLVM without<br class="gmail_msg">
>>> rebuilding mesa (Arch I'm looking at you again) things go funny.<br class="gmail_msg">
><br class="gmail_msg">
> What exactly happened there? LLVM upstream generates shared libraries<br class="gmail_msg">
> named libLLVM-<major>.<minor>.so*, so it shouldn't be possible for a<br class="gmail_msg">
> simple LLVM package update to break Mesa, unless Arch did something<br class="gmail_msg">
> really stupid.<br class="gmail_msg">
><br class="gmail_msg">
The issue is not specific to Arch, but anyone who links against shared LLVM.<br class="gmail_msg">
<br class="gmail_msg">
Here is another take on it:<br class="gmail_msg">
At least swr and r600/radeonsi depend at _build_ time on the _patch_<br class="gmail_msg">
version of LLVM. The latter of which is not part of the DSO name. Thus<br class="gmail_msg">
at runtime as you change your LLVM (3.9.x>3.9.y) you'll execute the<br class="gmail_msg">
"3.9.x" codepath even though you are be using "3.9.y" LLVM. If<br class="gmail_msg">
anything I'm calling it a LLVM bug, since shared/static library users<br class="gmail_msg">
should not need to know patch version, let alone have different<br class="gmail_msg">
codepaths based on it. Runtime ones might be ok, compile time<br class="gmail_msg">
definitely not.<br class="gmail_msg">
<br class="gmail_msg">
On our end, we could a) bump the requirement such that there's no<br class="gmail_msg">
compile time patch version check, b) suggest static linking or c)<br class="gmail_msg">
pretend the {mis,ab,}use isn't there ;-)<br class="gmail_msg">
<br class="gmail_msg">
><br class="gmail_msg">
>>> Tl;Dr; We really want to enable static linking by default and prod<br class="gmail_msg">
>>> distros to use it.<br class="gmail_msg">
>><br class="gmail_msg">
>> I'm all in favor of statically linking LLVM (that's the way I'm doing this on<br class="gmail_msg">
>> my pc).<br class="gmail_msg">
>> I think the only reason this is not done is because people (also here on the<br class="gmail_msg">
>> list) don't want any static linkg of external libraries because of size or<br class="gmail_msg">
>> whatever.<br class="gmail_msg">
>> So changing the default to static is easy, but I doubt it will make everyone<br class="gmail_msg">
>> happy ;-)<br class="gmail_msg">
><br class="gmail_msg">
> Indeed, it'd probably make many distro packagers unhappy, because<br class="gmail_msg">
> they'll just have to re-enable shared linking, because packaging<br class="gmail_msg">
> policies generally strongly discourage if not outright forbid static<br class="gmail_msg">
> linking.<br class="gmail_msg">
><br class="gmail_msg">
The toggle is there and is not going away, afaict. If people are going<br class="gmail_msg">
to get upset that the default does not meet their policy... just<br class="gmail_msg">
toggle and get on with other things ;-)<br class="gmail_msg">
<br class="gmail_msg">
Thanks<br class="gmail_msg">
Emil<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
mesa-dev mailing list<br class="gmail_msg">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="gmail_msg" target="_blank">mesa-dev@lists.freedesktop.org</a><br class="gmail_msg">
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br class="gmail_msg">
</blockquote></div>