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

Igor Gnatenko i.gnatenko.brain at gmail.com
Thu Feb 13 08:41:29 CET 2014


On Thu, 2014-02-13 at 14:02 +0800, Zhigang Gong wrote:
> 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?
Yes. It's so. I just sent new patch where checking for LLVM version.
Unfortunately I can't fix it in FindLLVM.cmake, but fixed in
backend/src/CMakeLists.txt
> 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


-- 
-Igor Gnatenko



More information about the Beignet mailing list