[Mesa-dev] [PATCH] configure: Trust LLVM >= 4.0 llvm-config --libs for shared libraries

Andy Furniss adf.lists at gmail.com
Mon Aug 14 20:13:55 UTC 2017


Michel Dänzer wrote:
> On 11/08/17 01:45 AM, Emil Velikov wrote:
>> On 9 August 2017 at 02:00, Michel Dänzer <michel at daenzer.net> wrote:
>>> On 09/08/17 03:24 AM, Emil Velikov wrote:
>>>>
>>>> I think we'd want to keep the best of both - just not sure how to
>>>> exactly do that.
>>>> --libs/--libfiles was completely busted with LLVM 3.9 and is back to
>>>> normal with 4.0.
>>>>
>>>> Could we use that somehow?
>>>
>>> This patch relies on llvm-config --libs with LLVM >= 4.0. If you mean
>>> something else, please be more specific.
>>>
>> That's the thing - in some versions --libs is busted while for others
>> --libs/--libfiles.
> 
> Do you have any specific information about --libs being broken with
> recent versions of LLVM? I though that was fixed long ago.
> 
> 
>> That said, patch does exactly what it says on the
>> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> 
> Thanks, pushed.

Don't know if this is expected or not, but llvm built like -

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release 
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON 
-DLLVM_APPEND_VC_REV=OFF -DLLVM_BUILD_LLVM_DYLIB=ON

now fails to build mesa (I also tried without vulkan and it still fails 
raseonsi IIRC).

  CXXLD    libvulkan_radeon.la
/usr/lib/libLLVMSupport.a(Process.cpp.o): In function 
`llvm::sys::Process::FileDescriptorHasColors(int)':
Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x4d): 
undefined reference to `setupterm'
Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x78): 
undefined reference to `tigetnum'
Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x81): 
undefined reference to `set_curterm'
Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi+0x89): 
undefined reference to `del_curterm'
collect2: error: ld returned 1 exit status

Haven't tried llvm with -DLLVM_APPEND_VC_REV=ON yet, mesa still builds 
OK with this commit reverted.

My mesa config =

./autogen.sh --prefix=/usr --sysconfdir=/etc --enable-texture-float 
--enable-opencl --enable-omx --with-egl-platforms=x11,drm,wayland 
--with-gallium-drivers=radeonsi,swrast --with-vulkan-drivers=radeon 
--enable-gbm --enable-shared-glapi --enable-glx-tls --with-dri-drivers=



More information about the mesa-dev mailing list