[Mesa-dev] Build fail since configure.ac: rework llvm libs handling for 3.9+

Emil Velikov emil.l.velikov at gmail.com
Wed Oct 18 15:41:02 UTC 2017


On 17 October 2017 at 15:39, Andy Furniss <adf.lists at gmail.com> wrote:
> Emil Velikov wrote:
>
>>>> On a "bad" build (-DLLVM_BUILD_LLVM_DYLIB=ON) I get
>>>>
>>>> andy [~]$ llvm-config --link-shared --libs bitwriter
>>>> llvm-config: error: missing: /usr/lib/libLLVMDemangle.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMSupport.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMBinaryFormat.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMCore.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMBitReader.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMMC.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMMCParser.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMObject.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMProfileData.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMAnalysis.so
>>>> llvm-config: error: missing: /usr/lib/libLLVMBitWriter.so
>>
>>
>> These here indicate that something in LLVM broke. Please report it
>> ASAP so that we don't get a LLVM release with this bug.
>
>
> https://bugs.llvm.org/show_bug.cgi?id=34977
>
Great, thank you. In the interim please use the LLVM_LINK_LLVM_DYLIB workaround.
Just checked LLVM 5.0 w/o LLVM_LINK_LLVM_DYLIB - seems to also be
broken in the same way.

Considering distributions (checked Fedora, Arch, Ubuntu and Debian)
toggle both BUILD and LINK together, I'm inclined to keep things
as-is.

Skimming through strace, I've noticed that llvm-config _always_ checks for:

-- with --link-shared
libLLVM-$version.so - correct
libLLVM$component.so - wrong, should be removed

The above two should be swapped if BUILD_SHARED_LIBS is set

-- with --link-static
libLLVM-$version.so - wrong, should be removed
libLLVM$component.a - correct

Thanks
Emil


More information about the mesa-dev mailing list