[cfe-dev] What configure options should I use to build clang with clang?

Eric Christopher echristo at apple.com
Tue Sep 7 18:12:05 PDT 2010


>>> 
>> 
>> Your obvious need for all of those -I command line options means that there is something incorrect in the search paths to find the header files on your host.
>> 
>> You need a compiler that will just work like:
>> 
>> clang++ hello.cc -o hello
>> 
>> and have that just work.
>> 
>> Until then it doesn't matter what you pass to configure - you won't be able to compile clang with clang.
>> 
>> -eric
> Your not helping at all. Your just restating the problem that I'm having. Yes clang doesn't include the headers by default, but what I can do about it?  I just recently try rebuilding it with --with-cxx-include-root configure on and it still doesn't search for the header files by default. On the"getting started" one of the solutions is so vague when it says "changes the lines below to include that path". What changes exactly? Any examples? 

You will likely need to modify clang to use the headers on your system.  Take a look your sources for areas that look like the header paths you're including.  I don't have a cygwin system handy so I don't know what those are.  You may need to modify lib/Frontend/InitHeaderSearch.cpp to contain the correct values.

Otherwise you haven't included any commands you may have used to configure so I don't know what you've done wrong if anything.

You also need to likely specify a link path if the system g++ doesn't know how to link against the installed libstdc++ - the error that you have seems to indicate that your c++ library was compiled without cxa_atexit while your compiler thinks that you have it.  I don't know what to do about that offhand, you'll probably need to debug the process yourself some.

Good luck.

-eric






More information about the cfe-dev mailing list