LLVM 3.5 fails to link

2020-07-01 06:49发布

When compiling with the experimental LLVM3.5 libraries link the following link errors appear:

/usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x85b): undefined reference tosetupterm' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x87a): undefined reference totigetnum' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x888): undefined reference toset_curterm' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x890): undefined reference todel_curterm'

The link command line was generated with llvm-config, so why is this failing?

标签: llvm
2条回答
你好瞎i
2楼-- · 2020-07-01 07:44

llvm-config is not adding the link option for the Terminfo library. Add

-ltinfo

To link in the library and all should be well.

查看更多
爷、活的狠高调
3楼-- · 2020-07-01 07:46

Add llvm-config --system-libs in link option

查看更多
登录 后发表回答