Build failure with gcc 5.1.0: trying to include iostream.h

I can’t build Root 5.34.25 with gcc 5.1.0. Configuring the build with configure I get this compilation error:

I have previously compiled Root 5.34.25 with gcc 4.9.2 and older without problems. I think that this might be a problem with gcc 5 since I use a bash script to download, configure, build and install, so I’m pretty sure that I’m doing exactly the same things I did with gcc 4.9.2.
Can anyone confirm this? Or maybe I’m totally wrong? Thanks.

1 Like

Perhaps the old .h -headers are no longer available by default in GCC5 or there’s a configuration error causing cint to try to include those instead of other versions (CINT uses macro G__NEWSTDHEADER to decide which version to include)?


Please move to ROOT 6; we are not going to add support for GCC 5 to ROOT 5.

Cheers, Axel.

Thanks Axel, understood. FYI, I have been able to compile 5.34.30 with gcc 5.1 (so if no gcc5-specific work has been done between 5.34.25 and 5.34.30 then maybe it’s not a gcc5 issue, but nevertheless the last version works).

Hi all,

I can understand that the ROOT team has to stop support now and then. But I would really like to compile root5 with gcc5.1 (I guess I could do without but that seems even harder).

Nicola, would it be possible for you to share with me how you managed to do it?

kind regards


Hi joa, actually I did nothing special for compiling 5.34.30 with gcc 5. It seems that the problem has been silently fixed, now I’m on gcc 5.2.0 and I have no problem in compiling recent versions of Root 5. I just gave up with Root 5.34.25.

Hi again,

to summarize


g++ --version
g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright © 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

I can build root 5.34/30 using the the autoconf tools

./configure --all

but it fails if I try with cmake (which I did first)

cmake -Dminuit2=YES ./…/root

this is good enough for me



1 Like

The head of the v5-34-00-patches branch should also work for CMake. We will make a patch release including it soon.

I had the necessity to compile 5.32.04 with gcc 5 so this time I went deep into the problem. I produced a patch based on commit 7dec562d1d5723b7eea08d08659dc9dc4e79c8ca which fixes the configuration files. I also found that in 5.32 there are code paths which are obsolete in C11 which is the default C dialect for gcc 5, so the gnu99 dialect must be forced with the configure option --with-cc=“gcc -std=gnu99”. I tested it with Root v5.32.04 and gcc 5.2.0 in an ArchLinux system and it worked.
I attach also the gcc 5 patch for 5.34.00 <= Root < 5.34.30, generated with ‘git format-patch -1 7dec562d1d5723b7eea08d08659dc9dc4e79c8ca’ which should be sufficient (i.e. no gnu99 flag needed) for compilation but I have not tested it.
ROOT-v5.32-GCC5.txt (2.8 KB)
ROOT-v5.34-GCC5.txt (2.71 KB)