Changing the default path reported by gSystem->GetIncludePath

After installing version 6 of root I’m finding that gSystem->GetIncludePath includes a directory in the build tree (which no longer exists). This doesn’t seem to happen with version 5. Where is this path defined? Is it in a file that I can edit after installing root, or is it compiled into the root binaries?

Thanks for any information.


_ROOT Version: 6.14.00
_Platform: CentOS 7
_Compiler: GNU gcc 4.8.5

Which directory is the problematic one?
The default include directory should be $ROOTSYS/include with the global variable $ROOTSYS pointing to the main directory of your root installation. It is declared in the script everytimeyou initialize root.
Unless you have a .rootrc file in your home directory which declares Unix.*.Root.IncludePath: … there should be no problem. Maybe a leftover from a previous installation?

There’s no .rootrc file. The path returned by gSystem->GetIncludePath is:

(const char *) “-I$ROOTSYS/include -I”/share/apps/physics/root/6.14.00/include" -I"/share/apps/physics/root/6.14.00/etc" -I"/share/apps/physics/root/6.14.00/etc/cling" -I"/sfs/nfs/apps/contrib/physics/root/6.14.00/etc" -I"/sfs/nfs/apps/contrib/physics/root/6.14.00/etc/cling" -I"/sfs/nfs/apps/contrib/physics/root/6.14.00/include" -I"/share/apps/physics/root/6.14.00/include" -I"/sfs/lustre/scratch/blarg/root-6.14.00/build/include""

where ROOTSYS is “/share/apps/physics/root/6.14.00”. The last directory is the problematic one.

Is there a global .rootrc file that I could use to to set the default path for all users?

Could this be a recurrence of the bug that was fixed in 6.09?:


For what it’s worth, I’ve also tried setting Unix.*.Root.Include.Path and ACLiC.IncludePaths in system.rootrc, but this doesn’t change what I see from gSystem->GetIncludePath.

Hmm, I’m sorry, in this case I can’t help you, my root installation has only one path in gSystem->GetIncludePath().

Just to summarize the things I’ve tried that didn’t work:

  • Setting the value of Unix.*.Root.IncludePath in system.rootrc
  • Setting the value of ACLiC.IncludePaths in system.rootrc
  • Setting the value of ROOT_INCLUDE_PATH in the environment

Part of the problem seems to be that gSystem->SetIncludePath doesn’t behave as documented here:

where it says that this function will “overwrite the existing path”. Experimenting with it, I find that it only ever appends onto the existing path. This happens under both root 5 and root 6.

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