[LLVMdev] include's are not being located

Joseph Morgan its.jojo.77 at gmail.com
Tue Jun 17 07:01:45 PDT 2014


On Jun 17, 2014, at 7:02 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:

> On 17 Jun 2014, at 05:57, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> 
>> On Mon, Jun 16, 2014 at 05:20:55PM -0500, Joseph wrote:
>>> Undefined symbols for architecture x86_64:
>>> "_del_curterm", referenced from:
>>>     terminalHasColors(int) in libLLVMSupport.a(Process.o)
>> 
>> Need to link against libterminfo / libtinfo / libncurses, depending on
>> your platform. Alternatively, disable terminfo support via cmake/configure.
> 
> Recent versions of llvm-config provide a --system-libs option that will provide this.  I don't know why llvm-config provides a separate flag for this, when every pkg-config distribution just puts these in ldflags, but adding the output from this to your build system is the best thing to do.
> 
> Unfortunately, old versions of llvm-config don't provide this and produce an error message when you pass it, so you'll need to do a version check in your build system for it too.


Thank you all for your input. I can finally compile the tutorial files. Heres what I used for chapter three:

clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core --system-libs` -o toy

Note as Joerg and David suggested,  --system-libs is required to link against appropriate libraries. 

Also note that --cxxflags is used instead of --cppflags which is opposed to the instructions located on the tutorial page: http://llvm.org/docs/tutorial/LangImpl3.html#full-code-listing

So the question is: Are others required to use these options? If so then is it possible that the documentation is incorrect/incomplete? If the problem is unique to my system, then is it something I did wrong when building LLVM/Clang?


Joseph Morgan






More information about the llvm-dev mailing list