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

Dictionary dependencies are not updated when a header is removed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 6.20/00
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None
    • Environment:

      Archlinux with GCC 10.1

    • Development:

      Description

      I get a compile time error for missing files whenever I remove from my project a header file previously processed by root_generate_dictionary. The reason apparently is because the dependencies of root_generate_dictionary are not updated when a header is removed from the code tree and from the list of thefiles to be processed by root_generate_dictionary.

      I attach a simple reproducer with a git repo with an initial commit with two classes Class1 and Class2, and a second commit where Class1 is removed. By compiling the first commit, switching to the second and compiling again this error is generated:

      $ make
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/mori/analysis/HERD/HerdSoftware/tests/RootDictMissingFiles/build
      make[1]: Entering directory '/home/mori/analysis/HERD/HerdSoftware/tests/RootDictMissingFiles/build'
      make[2]: Entering directory '/home/mori/analysis/HERD/HerdSoftware/tests/RootDictMissingFiles/build'
      make[2]: *** No rule to make target '../Class1.h', needed by 'DictSrc.cxx'.  Stop.
      make[2]: Leaving directory '/home/mori/analysis/HERD/HerdSoftware/tests/RootDictMissingFiles/build'
      make[1]: *** [CMakeFiles/Makefile2:72: CMakeFiles/DictLib.dir/all] Error 2
      make[1]: Leaving directory '/home/mori/analysis/HERD/HerdSoftware/tests/RootDictMissingFiles/build'
      make: *** [Makefile:84: all] Error 2
      

      Instruction to reproduce the error:

      1. Expand the tarball; this will produce a RootDictMissingFiles folder containing the git repo checked out at the initial commit
      2. cd RootDictMissingFiles
      3. mkdir build && cd build
      4. cmake ../
      5. make
      6. git checkout master
      7. cmake ../
      8. make

      ATM the only solution I found is to wipe the build folder and configure the build from scratch.

        Attachments

          Activity

            People

            Assignee:
            axel Axel Naumann
            Reporter:
            nmori Nicola Mori
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: