[Beignet] [PATCH] cmake: Fix linking with LLVM/Terminfo

Zhigang Gong zhigang.gong at linux.intel.com
Thu Feb 13 07:02:14 CET 2014


This issue is caused by a LLVM 3.4 bug. I just haven't found a
good method to check the current LLVM is 3.4 and the LLVM was
built with Terminfo, then we can add tinfo into the LLVM_SYSTEM_LIBS
manually.

Simply add the tinfo into gbe link libraries unconditional is
not good. What do you think?

On Thu, Feb 13, 2014 at 08:01:22AM +0400, Igor Gnatenko wrote:
> DEBUG: [  9%] Building CXX object backend/src/CMakeFiles/gbe_bin_generater.dir/gbe_bin_generater.cpp.o
> DEBUG: Linking CXX executable gbe_bin_generater
> DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
> DEBUG: (.text+0x717): undefined reference to `setupterm'
> DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
> DEBUG: (.text+0x727): undefined reference to `tigetnum'
> DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
> DEBUG: (.text+0x730): undefined reference to `set_curterm'
> DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
> DEBUG: (.text+0x738): undefined reference to `del_curterm'
> 
> Signed-off-by: Igor Gnatenko <i.gnatenko.brain at gmail.com>
> ---
>  backend/src/CMakeLists.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
> index 33494a0..86ab107 100644
> --- a/backend/src/CMakeLists.txt
> +++ b/backend/src/CMakeLists.txt
> @@ -179,6 +179,7 @@ ll_add_library (${pcm_lib} pcm_sources)
>  ADD_DEPENDENCIES (gbe pch_object ${pcm_lib})
>  target_link_libraries(
>                        gbe
> +                      tinfo
>                        ${DRM_INTEL_LIBRARY}
>                        ${DRM_LIBRARY}
>                        ${OPENGL_LIBRARIES}
> -- 
> 1.8.5.3
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list