clang++, libc++ on Kubuntu (c++11, c++0x) Compiling and Linking

This is what I did to compile the latest Clang on Kubunut (AKA Kuboobtu).

 

First things first. You’ll need to download llvm. You may need to set permissions on /usr/local/src

Then you will need clang.

 

Next, you will need to patch up clang/lib/Frontend/InitHeaderSearch.cpp

I can’t remember why I did it this way…You should be able to write strings directly as the first argument of AddPath, but I didn’t, it was like 1 a.m. and you go with what you know.

Hopefully that will take care of getting clang on your system. At this point, I created a tar of the whole shebang as it was a successful build and I wanted to keep it around just in case I fucked things up after this point.

Then

Many thanks to solarianprogrammer as most of the details actually came from his post on the same topic. There were 1 or 2 small differences in what I did to get success. I post it here because sites and blogs come and go.

About Jason

I am a 31 year old programmer living in the south of France. I currently work actively in the fields of Ruby/PHP/Javascript and server/website administration.
This entry was posted in c/C++, C/C++ Programming, c++0x/c++11, Topics, Tutorials and tagged , , , , . Bookmark the permalink.