ROOT configure --enable-cling doesn't work

Hi,

I would like to try out cling, but didn’t manage to configure the ROOT build for cling.

As described at root.cern.ch/drupal/content/clin … structions I tried

$ ./configure --build=debug --with-llvm-config=/opt/local/bin --enable-cling

but this did not work

Checking whether to integrate experimental cling ... no 

This is on Mac OS X 10.7 with XCode 4.3 and llvm, clang installed via Macports, i.e. here:

/opt/local/bin

What am I doing wrong?
Is the PATH given to the --with-llvm-config option correct?
The cling build instructions web page mentioned above doesn’t say what it should be set to.

Hi,

I build LLVM/clang from source and works for me. Could it be issues with the permissions of /opt/local/bin? How does /opt/local look like? Could you ls -la?

Vassil

I don’t know how the cling configure works, so yes, as far as I know permissions could be the problem.

Macports builds llvm / clang from source as user root inside /opt/local, now I’m installing ROOT myself, not as user root, still I should have read access to everything in /opt.

Note that configure doesn’t say anything about not finding llvm / clang, as is the case if I don’t give the --with-llvm-config=/opt/local/bin option.

$ ls -la /opt/local
total 8
drwxr-xr-x    14 root  admin    476 Mar  9 09:09 .
drwxr-xr-x     3 root  admin    102 Feb 29 11:24 ..
drwxr-xr-x     5 root  wheel    170 Mar 19 10:05 Library
drwxr-xr-x  2007 root  admin  68238 Apr 20 23:14 bin
drwxr-xr-x    30 root  admin   1020 Apr 20 20:55 etc
drwxr-xr-x   379 root  admin  12886 Apr 20 23:14 include
drwxr-xr-x  1638 root  admin  55692 Apr 20 23:14 lib
drwxr-xr-x    31 root  admin   1054 Apr 18 21:49 libexec
lrwxr-xr-x     1 root  admin      9 Feb 29 11:24 man -> share/man
drwxr-xr-x     3 root  admin    102 Mar  9 09:09 pkg
drwxr-xr-x    18 root  admin    612 Mar 25 19:35 sbin
drwxr-xr-x   110 root  admin   3740 Apr 20 20:55 share
drwxr-xr-x    10 root  admin    340 Mar  9 09:09 src
drwxr-xr-x    10 root  admin    340 Mar  2 03:59 var

Another possible problem is that I have llvm 3.0 and 3.1 installed via Macports in addition to the Apple llvm in /usr/bin and the ROOT configure script gets confused without telling me about it. Here’s what I get on llvm-:

$ llvm-
llvm-ar-mp-3.0          llvm-cov-mp-3.0         llvm-dwarfdump-mp-3.1   llvm-ld-mp-3.1          llvm-objdump-mp-3.1     llvm-size-mp-3.0
llvm-ar-mp-3.1          llvm-cov-mp-3.1         llvm-extract-mp-3.0     llvm-link-mp-3.0        llvm-prof-mp-3.0        llvm-size-mp-3.1
llvm-as-mp-3.0          llvm-cpp-4.2            llvm-extract-mp-3.1     llvm-link-mp-3.1        llvm-prof-mp-3.1        llvm-stress-mp-3.1
llvm-as-mp-3.1          llvm-diff-mp-3.0        llvm-g++                llvm-mc-mp-3.0          llvm-ranlib-mp-3.0      llvm-stub-mp-3.0
llvm-bcanalyzer-mp-3.0  llvm-diff-mp-3.1        llvm-g++-4.2            llvm-mc-mp-3.1          llvm-ranlib-mp-3.1      llvm-stub-mp-3.1
llvm-bcanalyzer-mp-3.1  llvm-dis-mp-3.0         llvm-gcc                llvm-nm-mp-3.0          llvm-readobj-mp-3.1     llvm-tblgen-mp-3.0
llvm-config-mp-3.0      llvm-dis-mp-3.1         llvm-gcc-4.2            llvm-nm-mp-3.1          llvm-rtdyld-mp-3.0      llvm-tblgen-mp-3.1
llvm-config-mp-3.1      llvm-dwarfdump-mp-3.0   llvm-ld-mp-3.0          llvm-objdump-mp-3.0     llvm-rtdyld-mp-3.1      

FYI, I’ve made a Macports feature request to optionally build ROOT with cling:
trac.macports.org/ticket/34171

Hi,
For now I’d recommend you to build llvm and clang from source. As far as I know, we haven’t tested --enable-cling with llvm and clang binary distribution.
Cheers,
Vassil

I did build llvm and clang from source on my machine.
I just had a Mac package manager, Macports, do it for me, so it’s located in /opt/local.

Hi,

We don’t support MacPorts builds. The binaries have to be called as they are called by the regular build system, no …-mp…

Axel.

Chris Jones is working on getting cling with Macports:
trac.macports.org/ticket/34171

At the moment possibly the only required change is to make Macports install the clang headers, but I’m not sure, this is under investigation:
trac.macports.org/ticket/34214

Being able to get cling with a simple

port install root +cling

would probably mean many more cling users on the Mac in the coming months.