Compiling root-6.06.04 on a CentOS 7 machine (at DESY)

Dear rooters,

I have found problems to compile root-6.06.04 in a CentOS 7 machine (CentOS Linux release 7.2.1511).
The way I do it is the “classic one”:

  1. Extract the root source in a certain location e.g. /usr/local/root
  2. Define ROOTSYS to that location and ‘cd’ there
  3. Type configure
  4. Type make

This procedure worked like a charm on my Mac (OS X 10.11.5).
However I have found compilation errors when I tried on a linux CentOS 7 machine at work (DESY):

[code]g++ -O2 -DNDEBUG -pipe -m64 -std=c++11 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -Wno-deprecated-declarations -pthread -Icore/base/src -D__CLING__ -Ietc -Ietc/cling -I/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/interpreter/cling/include -I/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/interpreter/llvm/inst/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fomit-frame-pointer -std=c++11 -fPIC -fdata-sections -Wcast-qual -fno-strict-aliasing -DNDEBUG -Wno-shadow -Wno-unused-parameter -MMD -MP -I. -o core/base/src/G__Core.o -c core/base/src/G__Core.cxx
core/base/src/G__Core.cxx:50:10: warning: null character(s) preserved in literal [enabled by default]
#include "/afs/des#include “/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/core/base/inc/TSystemFile.h”

core/base/src/G__Core.cxx:50:2239: fatal error: /afs/des: No such file or directory
#include "/afs/des#include “/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/core/base/inc/TSystemFile.h”

compilation terminated.
[/code]

By editing the problematic file core/base/src/G__Core.cxx:50, I have found a strange mistake in the path to TQCommand.h file, i.e.:

#include "/afs/des^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^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@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@\ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@core/base/inc/TQCommand.h"

Of course I have tried to correct this error by removing all these @'s and setting the right path to that file.
However the compilation is still crashing for G__Core.cxx and multiple errors appear:

g++ -O2 -DNDEBUG -pipe -m64 -std=c++11 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -Wno-deprecated-declarations -pthread -Icore/base/src -D__CLING__ -Ietc -Ietc/cling -I/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/interpreter/cling/include -I/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/interpreter/llvm/inst/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fomit-frame-pointer -std=c++11 -fPIC -fdata-sections -Wcast-qual -fno-strict-aliasing -DNDEBUG -Wno-shadow -Wno-unused-parameter -MMD -MP -I. -o core/base/src/G__Core.o -c core/base/src/G__Core.cxx core/base/src/G__Core.cxx: In function ‘ROOT::TGenericClassInfo* ROOT::GenerateInitInstanceLocal(const TCanvasImp*)’: core/base/src/G__Core.cxx:818:33: error: incomplete type ‘TCanvasImp’ used in nested name specifier instance("TCanvasImp", ::TCanvasImp::Class_Version(), "TCanvasImp.h", 32, ^ core/base/src/G__Core.cxx:819:38: error: invalid use of incomplete type ‘class TCanvasImp’ typeid(::TCanvasImp), ::ROOT::Internal::DefineBehavior(ptr, ptr), ^ In file included from core/base/src/G__Core.cxx:52:0: /afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/core/base/inc/TVirtualPad.h:51:7: error: forward declaration of ‘class TCanvasImp’ class TCanvasImp; ^ core/base/src/G__Core.cxx:820:20: error: incomplete type ‘TCanvasImp’ used in nested name specifier &::TCanvasImp::Dictionary, isa_proxy, 16, ^ core/base/src/G__Core.cxx:821:38: error: invalid application of ‘sizeof’ to incomplete type ‘TCanvasImp’ sizeof(::TCanvasImp) ); ^

etc.

Do you know what is causing this problem?
Thanks!

PS: I can use the binaries that you provide here for CentOS Cern 7 gcc4.8:
root.cern.ch/content/release-60604
but I am interested in installing the whole source tree.

Hi,

is there a particular reason why you are sticking to the classic build?
Would it be possible to try out the CMake one?

Cheers,
Danilo

[quote=“dpiparo”]
is there a particular reason why you are sticking to the classic build?
Would it be possible to try out the CMake one?[/quote]
Hi,
Yes, it is much simpler in my opinion.
In addition, I don’t have cmake installed by default on Mac OS X.

cmake is present in linux CentOS 7, though.
Following the instructions here:
root.cern.ch/installing-root-source

I create a build folder called root-6.06.04-build, while the root source is in root-6.06.04.
and then, from the build folder, I type:
cmake …/root-6.06.04

The process took much longer than “configure” to check what is present in the system, but it finished now.
After this I do:
make -j8

And it seems to be compiling well.
I’ll report in a little while if it succeeded or not.

In any case, I think it would be good to have backwards compatibility with the classic installation method.

Cheers,
Alberto

Hi again,

Compilation failed with cmake too:

[code]Building CXX object core/base/CMakeFiles/Base.dir/src/Match.cxx.o
[ 41%] /afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04-build/core/base/G__Core.cxx:137:666: fatal error: /afs/desy.d: No such file or directory
#include "/afs/desy.d#include "/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-Building CXX object core/base/CMakeFiles/Base.dir/src/Match.cxx.o
[ 41%] /afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04-build/core/base/G__Core.cxx:137:666: fatal error: /afs/desy.d: No such file or directory
#include "/afs/desy.d#include “/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04/core/cont/inc/TArrayS.h”

compilation terminated.
[/code]

And it seems that failed for the same reason.
Somehow root does not like the full paths that I am using, e.g.:
/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-6.06.04

This ‘.’ in desy.de seems to be the problem.
Check the error line:

fatal error: /afs/desy.d: No such file or directory #include "/afs/desy.d#include "/afs/desy.de/group/fla/plasma/data002/SOFTWARE/root-Building CXX object core/base/CMakeFiles/Base.dir/src/Match.cxx.o
The include line seems to be crippled , i.e. #include "/afs/desy.d#include .

Any ideas?

Cheers,
Alberto

Hi Alberto,

we have a “.ch” and the dot is not an issue. This has to be investigated further.
What is the configuration command you used?
I understand from the error that the build is taking place on AFS. In general this is something which is avoided given the poor performance of the FS in presence of IO intensive procedures such as compilations. ROOT is perfectly relocatable and can be built on local disks and then installed/moved on afs if needed.

Cheers,
D

Can it be that something recognizes “.d” as a “dependency file”?
I remember similar problems long time ago with “/.automount/” subdirectories which were recognized as “.a” libraries.

[quote=“dpiparo”]Hi Alberto,
I understand from the error that the build is taking place on AFS. In general this is something which is avoided given the poor performance of the FS in presence of IO intensive procedures such as compilations. ROOT is perfectly relocatable and can be built on local disks and then installed/moved on afs if needed.
[/quote]

Good tip!
Using the classic method root compiled with not a single warning in a non-AFS location.
I haven’t tried with cmake but I guess it would work too.
Thanks a lot!

PS: Yeah, the “.” can’t be the issue, but perhaps something related with it.
What about this? [quote=“Pepe Le Pew”]Can it be that something recognizes “.d” as a “dependency file”?
I remember similar problems long time ago with “/.automount/” subdirectories which were recognized as “.a” libraries.[/quote]

Hi Alberto,

glad you found a solution to your issue and that as a side effect, you have a faster build procedure.
As a side note, this is a standard procedure for LHC experiments (at least up to the point they relied on afs and not cvmfs).

Cheers,
Danilo