[Mesa-dev] [PATCH] build: Fix LLVM shared library detection on systems with libLLVM.so.

Nicolai Hähnle nhaehnle at gmail.com
Wed Apr 13 14:01:37 UTC 2016


On 13.04.2016 08:25, Emil Velikov wrote:
> On 13 April 2016 at 00:17, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> On 12.04.2016 12:58, Kenneth Graunke wrote:
>>>
>>> Arch Linux ships libLLVM.so.3.7.1 rather than libLLVM-3.7.1.so;
>>> Mesa's configure script failed to find LLVM shared libraries in this
>>> case.  I believe they build LLVM with CMake, but there is still only
>>> one .so file.
>>>
> We had a similar patch [1] from the Archlinux maintainer and we sort
> of rejected it. Why ?
>
> Because it's a bug in the cmake build which (iirc) was fixed with LLVM
> 3.8. Shame that LLVM 3.7 series is busted with autoconf, thus one is
> forced to use cmake ahead of autoconf deprecation (with 3.8).
>
> Tom, I am a bit out of my waters here - can someone familiar with LLVM
> flesh out a backport for the 3.7 (and 3.8?) series ?
> Pretty please :-)
>
>>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>>> ---
>>>    configure.ac | 6 ++++++
>>>    1 file changed, 6 insertions(+)
>>>
>>> This is mostly a strawman.  llvmpipe hasn't built on my system for
>>> quite some time, and I finally got around to figuring out why.  I don't
>>> know much about LLVM build issues (it seems complicated), so feel free
>>> to throw this patch out and do it properly...
>>
>>
>> I'm not that big on build system twiddling, so feel free to ignore me,
>> but... why aren't we using $LLVM_CONFIG --libs here?
>>
> Because --libs produces
>   - llvm 3.4 and earlier - the static libraries (modules) and their
> dependencies (system libs)
>   - llvm 3.5 and later only the static libraries (modules)
>
> Neither of which is what we want in case of building against shared
> LLVM. They are used when static linking LLVM.

Interesting. On my own build, `llvm-config --libs` produces the shared 
library, which is why I asked. OTOH, on the system LLVM, it produces the 
static libs even though the system installation also includes the shared 
libs. So yeah, this means it's unusable in its current form.

Cheers,
Nicolai

> Thanks
> Emil
>
> [1] https://patchwork.freedesktop.org/patch/60665/
>


More information about the mesa-dev mailing list