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.

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
    
Are you talking about the "Interactive C++ interpreter and JIT compiler"? –  Braiam Jan 16 at 22:29
    
Yes this one root.cern.ch/drupal/content/cling –  nsl Jan 16 at 22:57

1 Answer 1

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 http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
git clone http://root.cern.ch/git/cling.git
cd ..
cat tools/cling/patches/*.diff | patch -p0
cd ../llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk 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
make

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 –  nsl Jan 16 at 23:49
    
I built it.. but, it lacks cling bin .. I found that make doesn't build cling.. am I missing anything? –  nsl Jan 17 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 at 16:04

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.