Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install cling in Ubuntu 12.04. I thought that the proper way was to download the binaries, as they are available here, but the extracted folder looks like this:

~/Desktop/cling » ls      
bin  docs  include  lib  share

This requires, I think, to merge the directories content with some directories of my filesystem. I am not familiar with this method but it seems to me a bit dirty; how can I install it, upgrade it, delete it?

I was thinking about packaging it with a deb, but I never did one so I do not know if it is the correct way..

Is there a better way to install cling?

share|improve this question
Yes this one – fbrundu Jan 16 '14 at 22:57

Ok, this is not a weekend project and apparently it needs too many stuff to be installed before operative. So, I haven't tested this myself, but is what the instructions says (+ some bits of Ubuntu):

Get the tools first, you need some other may be installed on your system, so to prevent this just:

sudo apt-get install build-essential zlib-bin zlib1g-dev subversion texinfo git

Now, create a directory empty to do your experiment:

mkdir ~/cling-clang
cd ~/cling-clang

This step will take a while if you have slow connection (please use one line at time):

svn co llvm
cd llvm/tools
svn co clang
git clone
cd ..
cat tools/cling/patches/*.diff | patch -p0
cd ../llvm/projects
svn co compiler-rt
cd ../..
mkdir build
cd build

Now start the fun. If nothing of the above failed you can continue:

../llvm/configure --enable-targets=host

This will build LLVM, Clang and Cling. There should be a package maintainer that do this stuff for Debian/Ubuntu, I tip my hat off. This will have the Cling built, but not installed. You may want to use checkinstall instead of sudo make install.

share|improve this answer
Awesome.. I will test it and use it.. Thanks – fbrundu Jan 16 '14 at 23:49
I built it.. but, it lacks cling bin .. I found that make doesn't build cling.. am I missing anything? – fbrundu Jan 17 '14 at 16:00
@Francesco forgot this part "Now follow the clang web page again for ./configure; make-based build instructions. You must specify --enable-targets=host to configure!" – Braiam Jan 17 '14 at 16:04
Wow, that's a lot of work – Pithikos Feb 6 '15 at 10:37
Building llvm with configure and make is no longer supported, we have to use cmake. – M.R. Feb 25 at 22:03

Cling now provides binary snapshots for Ubuntu (as well as Fedora and OSX) which you can find here

share|improve this answer

Your Answer


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.