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

Dieter N├╝tzel Dieter at nuetzel-hh.de
Mon Oct 16 22:32:15 UTC 2017


Am 16.10.2017 20:13, schrieb Andy Furniss:
> Emil Velikov wrote:
>> On 16 October 2017 at 03:22, Jan Vesely <jan.vesely at rutgers.edu> 
>> wrote:
>>> On Sun, 2017-10-15 at 00:00 +0100, Andy Furniss wrote:
>>>> Andy Furniss wrote:
>>>>> Since
>>>>> 
>>>>> commit 13a53c4f5cdd664fd155c9e78fb46a4387af006c
>>>>> Author: Emil Velikov <emil.velikov at collabora.com>
>>>>> Date:   Thu Oct 5 11:19:05 2017 +0100
>>>>> 
>>>>>       configure.ac: rework llvm libs handling for 3.9+
>>>>> 
>>>>> I am getting 00s of
>>>>> 
>>>>> .... /mesa/src/amd/common/..... undefined reference to LLVM......
>>>>> 
>>>>> Using git llvm have tried with -DLLVM_APPEND_VC_REV=OFF
>>>>> 
>>>>> My llvm config =
>>>>> 
>>>>> cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
>>>>> -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON
>>>>> -DLLVM_BUILD_LLVM_DYLIB=ON
>>>> 
>>>> Build is OK with llvm built with -DLLVM_LINK_LLVM_DYLIB=ON
>>> 
>>> THis is weird. that option should only set whether llvm executables 
>>> are
>>> dynamically linked. is the llvm-config output different when you 
>>> toggle
>>> this setting?
>>> 
>> Precisely what I was wondering as well.
>> 
>> Andy can you please share the output of the following commands across
>> your build combinations:
>> llvm-config --link-shared --libs bitwriter
>> llvm-config --link-static --libs bitwriter
>> llvm-config --link-static --system-libs
> 
> 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
> andy [~]$
> andy [~]$ llvm-config --link-static --libs bitwriter
> -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject
> -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat
> -lLLVMSupport -lLLVMDemangle
> andy [~]$
> andy [~]$ llvm-config --link-static --system-libs
> -lrt -ldl -lcurses -lpthread -lz -lm
> 
> On a "good" (-DLLVM_LINK_LLVM_DYLIB=ON) I get

With both:
-DLLVM_BUILD_LLVM_DYLIB=ON and -DLLVM_LINK_LLVM_DYLIB=ON

> andy [~]$ llvm-config --link-shared --libs bitwriter
> -lLLVM-6.0svn
> andy [~]$ llvm-config --link-static --libs bitwriter
> -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject
> -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat
> -lLLVMSupport -lLLVMDemangle
> andy [~]$ llvm-config --link-static --system-libs
> -lrt -ldl -lcurses -lpthread -lz -lm

I get mostly the same:

Radeon/Mesa> llvm-config --link-shared --libs bitwriter
-lLLVM-6.0svn
Radeon/Mesa> llvm-config --link-static --libs bitwriter
-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject 
-lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat 
-lLLVMSupport -lLLVMDemangle
Radeon/Mesa> llvm-config --link-static --system-libs
-lrt -ldl -ltinfo -lpthread -lz -lm
           ^^^^^^^^

Dieter


More information about the mesa-dev mailing list