'has incomplete type' error while installing ROOT

Dear ROOT users, I am installing ROOT with gcc7.5.0 on ubuntu18 and the following error occurred.

There are more errors later but I think this ‘incomplete type’ is the cause. I can post full error log if necessary.

I have installed ROOT on this computer before, I’m actually reinstalling. And my copy of ROOT source code works fine on another computer.
Also, I encountered ‘redefination error’ when I build ROOT without ‘-j4’.
I guess there’s something wrong with my complier, but I don’t know where to start.

Thanks in advance.

some elements that would help us reconstruct what’s going wrong:

  • what is the ROOT commit or version that you are trying to build?
  • how did you get the source code?
  • what is the exact sequence of commands you ran to create the build directory and start the build?
  • does the error happen when starting the build from a previously empty build directory?


I forked ROOT from official repository one mouth ago, the version should be v6.22.
There are some modifications in ‘graf3d’ folder while rest of the codes remain untouched.
The modifications are tested and committed to my forked repository. Then I cloned the modified codes to another computer and tried to build it by

$ cd root_build
$ sudo rm -rf *
$ cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src 
$ cmake --build . -- install -j4 

and the error occured.

The codes are cloned and GitHub record shows that the ‘tree’ folder as well as all other folders except ‘graf3d’ are untouched

As for the modification, you may see Axes don't show up in the projection of a imported gdml geometry in eve

This error still happens when the build directory is empty.


can you try checking out the v6-22-00-patches branch or one of the release tags? Those have to compile.

Maybe you picked a very unlucky commit in master that has build issues.


The error still occurs :anguished:

$ git clone --branch v6-22-00-patches https://gitclone.com/github.com/root-project/root.git root_src2
$ cd root_build
$ sudo rm -rf *
$ cmake -DCMAKE_INSTALL_PREFIX=/home/huangchh/SoftWare/modfiied_root/root_install ../root_src2
$ cmake --build . -- -j4

And errors are the same.

What is https://gitclone.com/? Can you check that your core/base/inc/TDatime.h on disk corresponds to what we have in https://github.com/root-project/root/blob/master/core/base/inc/TDatime.h?

Cheers, Axel.

It’s a GitHub mirror to accelerate clone process. I manually compared the “TDatime.h” from gitclone with the one from Github, they are the same.

I am also cloning directly from GitHub now and I think it’s gonna take the whole day. I’ll try this very original source code once the cloning is done.

The output list both:




most likely the problem is that the version of ROOT installed in /include is not the same as in the one in your modified_root.

1 Like

Indeed, the ROOT in /include/ is of different version. But why does this affect the installation? I don’t understand why it looks for headers in a seemingly irrelevant directory of /include/ instead of the build directory or the source directory.
I thought I could have two ROOT installed at the same time. It is possible to do so? If it is, what am I missing here?


Yes, it should work but depending on how you configured it may or may not cause interferences.
Did you run any “thisroot.sh” command?
What was your cmake comand line for the ROOT build?

Maybe @oshadura has additional advise?

I didn’t run any “thisroot.sh” in shell or .bashrc. Cmake command is just like my second reply in this topic. I also removed environment variable ROOTSYS.

I temporarily bypassed this problem by renaming the include/ to something else and run a clean build, it was a successful installation. But I am still hoping to figure out what happen and actually solve the problem since this solution may affect the user who are using the ROOT in include/ (or in some other reasonable directory).

Thanks for the hint, it really helps. :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.