Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7244

gSystem->IsFileInIncludePath() does not understand quoted paths (esp. crucial since ROOT-7226 fix auto-quotes paths)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.04.00
    • Fix Version/s: 6.10/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      Gentoo Linux x86_64

      Description

      Dear ROOTers,

      I found today that:

      gSystem->IsFileInIncludePath()

      does not work for quoted paths. An example is a path like this:

      root [0] std::cout << gInterpreter->GetIncludePath() << std::endl;
      -I"/etc/root" -I"/usr/include/root" -I"/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4" -I"/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4/x86_64-pc-linux-gnu" -I"/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4/backward" -I"/etc/root/cling" -I"." -I"/var/tmp/portage/sci-physics/root-9999/work/root-9999" -I"/var/tmp/portage/sci-physics/root-9999/work/root-9999/"

      The function "IsInIncludePath" does not find files in these quoted paths.

      This is especially important since the fix for ROOT-7226 auto-quotes all interpreter-related paths, so they are all not treated correctly anymore.

      I found that using a test-code in our framework which works using the following structure:
      1. Load some libraries with ROOT / analysis framework classes inside. 2. Walk through full class-table.
      3. Get TClass info for each.
      4. Call GetDeclFileName() on these, this should give me the name of the header file as found in include-path during compilation.
      5. Call gSystem->IsFileInIncludePath(classHeaderFileName.Data(), &absPath), this should never fail.

      I can also try to write up some shorter code for that later if you are interested in having a ROOT-test of that functionality.

      Cheers,
      Oliver

        Attachments

          Activity

            People

            Assignee:
            axel Axel Naumann
            Reporter:
            ofreyerm Oliver Freyermuth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: