[Mesa-stable] [Mesa-dev] [PATCH 7/7] configure.ac: static link LLVM by default

Emil Velikov emil.l.velikov at gmail.com
Thu Oct 5 17:40:48 UTC 2017


On 5 October 2017 at 18:11, Tom Stellard <tstellar at redhat.com> wrote:
> On 10/05/2017 08:40 AM, Emil Velikov wrote:
>> On 5 October 2017 at 16:16, Tom Stellard <tstellar at redhat.com> wrote:
>>> On 10/05/2017 06:33 AM, Michel Dänzer wrote:
>>>> On 05/10/17 12:19 PM, Emil Velikov wrote:
>>>>> From: Emil Velikov <emil.velikov at collabora.com>
>>>>>
>>>>> A while back Michel reported that LLVM has symbol versioning to avoid
>>>>> symbol collisions. Based on observations LLVM 5.0 is the first upstream
>>>>> version to actually has it.
>>>>
>>>> Not exactly. Adam Jackson originally added symbol versioning in LLVM 3.6
>>>> (in SVN r214418), but it was only effective when LLVM was built with
>>>> autotools. As of 5.0, it's effective with cmake as well.
>>>>
>>>>
>>>>> Since symbol collisions do come up again and again (fortunately not so
>>>>> often) let's flip the switch back to static.
>>>>
>>>> It seems a bit weird to make this change now, that LLVM is solving the
>>>> issue for good. But I don't feel strongly about it.
>>>>
>>>>
>>>
>>> I agree with this, symbol versioning should solve the issues with  symbol
>>> collisions, so why change this now?
>>>
>> LLVM with symbol versioning as not so widely used as I/we hope it was.
>> See the list in my other reply.
>>
>
> I looked at the list, but my preference is still that LLVM shared libraries
> should remain the default.  What is motivating the change to static by
> default?  Do the symbol collision problems affect most users?
>
Feel free to grep through our bugzilla. IIRC there's over a dozen of
cases, most dismissed roughly as "it's working now".
As one does not reliably hit the issue.

There are multiple others across the internets from the Khronos Vulkan
Loader repo on github, to Steam forums.

> Static linking really just works around a bug/deficiency in older versions
> of LLVM and I think this is something distros should be handling.
>
Some distros have fixes for months that never really made it upstream,
for whatever reason.
The rest, including people to build Mesa themselves... well they are
in a pickle.

> static linking has the added downside of build breakage when LLVM changes
> the component names for it's static libraries, which can be a pain.  Not
> to mention the increase in library size.
>
I believe you mention that every time this comes up. And as before -
these are dead trivial to handle.

> As a compromise, if shared libraries are really causing a lot of issues,
> then maybe you could make static the default for for LLVM < 5.0, but I really
> prefer using shared libraries for all versions.
>
No more LLVM version hacks, please? We had enough fun experience - see
the start of the series.

If people know what they're doing they can toggle it to suit their
needs. Otherwise - they will have a slightly larger binary yet they
won't get random crashes.
Say, as they run vulkaninfo or alike.

Thanks
Emil


More information about the mesa-stable mailing list