Compilation of MakeClass' class takes forever on Fedora 17

Dear Experts,

I have just moved to Fedora 17 from my old Fedora 14. It of course caused a significant upgrade of gcc, from 4.1.2 to 4.7.2.
With this compiler I have built Root from source (v 5.34) and created my usual skeleton for analysis via TTree::MakeClass. This went smoothly, but now I am experiencing a problem:
When I do, like usually,:

root -l MyClass.C+

it never ends… The process is running, using 100% of one of my CPU’s and after three hours I just kill it.

The same happens if I try to build a standalone application/library with Makefiles etc.

With gcc 4.1.2 on Fedora 13 the compilation of that class used to take ~1 minute. The same for gcc-4.3.2 on SLC5.

The class is quite large as the tree contains many, many branches, so it has 25000 lines in header file, however this was not a problem before…

Maybe there is a setting that has to be passed to gcc ?

Dear saladdin,
I am also running on Fedora 17 and root works perfectly. But, I didn’t installed through yum; I download the source and compiled it. Yum doesn’t install some packages and causes errors. Obviously, these packages exist, but I don’t their names.
So I would suggest you to compile the root from source.

Hi Magistros,

I have compiled root from source, not from yum, so this is not the problem. Have you tried to compile anything from makeclass?

Just a stupid idea … can you try:
root -l MyClass.C++

[quote=“Wile E. Coyote”]Just a stupid idea … can you try:
root -l MyClass.C++[/quote]

Sure I did :slight_smile: With no results…

Just another stupid idea … can you try:
echo ‘.L MyClass.C++’ | root -b -l
and/or:
echo ‘gROOT->LoadMacro(“MyClass.C++”);’ | root -b -l
and (a test of the pure compiler):
root-config --cxx --cflags -O2 -W -Wall -c MyClass.C

This one:

works well! Thank you! So it is not related to the compiler…

Have you tried my two first ideas (these with a “pipe”)?

Yes I did. With the same problem as before - it just runs forever… I’ll try with different root versions or different installation methods…

It might be that the rootcint is “hanging” or that the compiler “hangs” while compiling the dictionary source code (generated automatically by the rootcint step).
Try any example which takes ages … see, in another terminal window, what process eats the CPU (e.g. try “top” to find which one and then find the full command line using “ps axf”).

saladin, to be honest I am trying to work outside of ROOT cint. I am using just the libraries, and then I call g++ to compile the code. :slight_smile:

I got it!

The problem occurs when I add the “-ggdb” flag to cxx line. OK, I can remove it, no rpoblems, however - why has thiis not happened before?

Cheers and thanks for all the help!