Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How would I go about installing version 3 of Clang/LLVM in Ubuntu 10.10? Ubuntu 10.10 installs version 2.8 by default. Version 3 has more extensive/up to date support for C++ and possibly C (I am not totally sure about C). I know that I could possibly compile from source but was wondering if there is a ppa or other method to avoid compiling it from source.

If I compile from source do I have to tell it where to find the std c library etc. or is that automatically done.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I haven't found a PPA for maverick - you will need a later version of ubuntu to get v3.

However, to compile is very straightforward. Clang themselves have the instructions well written. A few pointers:

You will need the following packages to be installed before you compile

sudo apt-get install build-essential subversion

Start at the second instruction "2. Checkout LLVM"

At step 4 there is a mistake - it should read cd ../projects

I didnt need to specify my C/C++ headers - configure worked this out by itself.

Word of warning - it takes hours to compile - best to leave this as an overnight job!

share|improve this answer
    
Thanks. Once compiled should I checkisntall it or leave it as is. I am building it as we speak in a build folder in /usr/local/src/build. Should I leave it there or move it to /usr/local/bin. I don't think /usr/local/src is in my path but I can easily add it to my path. –  haziz Dec 19 '11 at 0:51
1  
personally I would just have build it in my local home folder. The choice is yours where the folder locations will be - my personal opinion - make install will install in the default folders - it makes it easier if you build and install a newer version in the future - if you need to adjust your path if required. –  fossfreedom Dec 19 '11 at 11:28
    
I was just following tradition in using /usr/local/ for locally installed software besides /usr/local/bin is already in the automatically generated path. –  haziz Dec 19 '11 at 15:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.