Building LLVM 3.9: cannot find malloc.h

Hi Alex,
sorry for the probably stupid question.

In order to install compile root 6.04.04 on my Ubuntu 14.04, I’m trying to pre-install cling (is this the correct procedure?).

I just downloaded the build script: … r/
and tried to run it.

It downloads the current version (3.9) but then it crashed during the cmake with the following message:
CMake Error at tools/cling/CMakeLists.txt:101 (include):
include could not find load file:
(I attach the files CMakeError.log and CMakeOutput.log)

This did not happen last week when the code version was 3.7. I’m sorry but I could not find where the problem is.

Can you give me some hints please.
Thank you. Kindest regards.
CMakeOutput_log.txt (127 KB)
CMakeError_log.txt (21.4 KB)

Use the Ubuntu’s default gcc 4.8.4.


[quote]I’m trying to pre-install cling (is this the correct procedure?).[/quote] No :slight_smile:. Cling (and the needed version of llvm and clang) comes bundled with ROOT. To install ROOT from source, follow the instruction at


Dear Pepe Le Pew and pcanal, thank you for your prompt help !

Yes, Pepe, I was already using gcc 4.8.4 (CMakeOutput_log.txt shows that).

Yes, pcanal, I tried that way (instruction at . I gave the command :
cmake -DCMAKE_INSTALL_PREFIX=/cern/root_v6.06.04 -DCMAKE_INSTALL_SYSCONFDIR=etc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -Dafdsmgrd=OFF /home/flavio/LOCAL_REPOSITORY/root_v6.06.04 >& /home/flavio/LOCAL_REPOSITORY/root_v6.06.04/root_v6.06.04_cmake.log

but at the end I got three errors like :
CMake Error: install(EXPORT “ROOTExports” …) includes target “Cling” which requires target “clingInterpreter” that is not in the export set.
for the targets “clingInterpreter” , “clingMetaProcessor” and “clingUtils” (please see attached root_v6.06.04_cmake_log.txt).

If I ignore them and proceed with the command
cmake --build . >& /home/flavio/LOCAL_REPOSITORY/root_v6.06.04/root_v6.06.04_cmake_build.log
the build crashes with the errors:
make[2]: *** [interpreter/llvm/src/lib/] Error 1
make[1]: *** [interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2
(please see attached root_v6.06.04_cmake_build_log.txt)

So I’m I’m afraid I’m doing something else wrong.
I’ve downloaded the source “root_v6.06.04.source.tar.gz” from . Is this the right repository ?

Thanks a lot once more.
Kindest regards.
root_v6.06.04_cmake_build_log.txt (29.2 KB)
root_v6.06.04_cmake_log.txt (2.27 KB)

Hi all.

I would like to update the status of my trials.

First point.
It seems that the LLVM stuff version 3.9 now works. I downloaded it again today and the build script … r/ does not produce the mentioned error anymore.

Second point.
The error I mentioned when building root 6.04.04 (that is :
CMake Error: install(EXPORT “ROOTExports” …) includes target “Cling” which requires target “clingInterpreter” that is not in the export set.
disapprears when I do not use " -DBUILD_SHARED_LIBS=ON" , leaving the default . In this case the produced CMakeCache.txt contains:
//Build all libraries as shared libraries instead of static

Kindest regards.

As already pointed out by Philippe, you cannot use your own versions of cling / llvm with ROOT 6.
ROOT 6 contains it’s own source code for there tools which is incompatible with any other versions (these tools are then automatically built when ROOT 6 is being built).

Dear Pepe and Philippe,

OK, now I got the point (sorry).
Thanks to your help I finally got my ROOT 6 installation working :smiley: :smiley:
Kindest regards,