Removing entry from include path

Hello,

I’m having trouble with getting a script to run. The issue seems to be that it finds multiple copies of a header file that software I use is including and then gives me an error that the function is ambiguous.

The issue stems from running on a system that I don’t manage. There are other versions of the software that I am using already installed; but they are older versions that don’t have the functionality I need for the work I’m doing. These versions are needed for other colleagues that are more embedded in the work than I am, so requesting an upgrade could cause problems.

I have opted to build the software in my own directory and all is well except when I go to run a ROOT script. I set my ROOT_INCLUDE_PATH to point to my local installations, but ROOT seems to automatically add other paths to this as well. The “problem” entry is “-isystem /usr/local/include”. Is there are way to remove this entry from the default path so that it doesn’t look there?

I think I know of a way I can circumvent this problem altogether, but it’s additional hassle. I’ll do that if that’s what I need to do, but this seems the easiest solution if it’s possible.

Thanks!


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.26.10
Platform: Not Provided
Compiler: Not Provided


Hi @TJHague!

welcome back to the forum! Maybe @bellenot could help with this?

Cheers,
Marta

Hi, I think you can simply make sure the include path you want comes before the -isystem /usr/local/include one. But I will need to try. Which platform are you working on? (I’m working on Windows, so…)
And BTW, you can take a look at the ${ROOTSYS}/bin/thisroot.sh script, there is a drop_from_path() function that might be useful

Hi!

The machine is suse linux, but I’m working within a container that is debian.

The correct path does come before the -isystem /usr/local/path/ include, but it seems that the issue comes from the header files each defining the same template class.

I’m not sure that drop_from_path() will work in my case, since that works on system environmental variables, but this seems to be defined internally in ROOT. It’s not present in my ROOT_INCLUDE_PATH or any other variables shown when I run printenv.


Well… may have just found the issue. Seems that it wasn’t the existence of that in the ROOT includes, but rather I had mistakenly left a dangling ‘:’ at the end of my ROOT_INCLUDE_PATH. I updated my environment setup script to deal with that and that problem disappears. The script still fails, but the error doesn’t appear to be from ROOT anymore. Now it seems that I likely have incompatible versions of some of the other software that I’m using.

Anyway, thanks for looking into this! :slight_smile:

1 Like

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