Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8044797

Building with clang gives: fatal error: file '...' has been modified since the precompiled header was built

XMLWordPrintable

    • b22

      When building with clang and changing a file that is part of the precompiled header, you can get:

      fatal error: file '/Users/staffan/mercurial/jdk9-hs-rt/hotspot/src/share/vm/runtime/thread.hpp' has been modified since the precompiled header was built

      clang behaves differently than gcc here.


      Example with clang:

      $ ls
      test.h
      $ cat test.h
      #include <stdio.h>
      $ clang -x c-header -include test.h test.h -o test.h.pch
      $ touch test.h
      $ clang -x c-header -include test.h test.h -o test.h.pch
      fatal error: file '/Users/staffan/tmp/pch/test.h' has been modified since the precompiled header was built
      1 error generated.

      Same with gcc:

      $ ls
      test.h
      $ cat test.h
      #include <stdio.h>
      $ gcc -x c-header -include test.h test.h -o test.h.pch
      $ touch test.h
      $ gcc -x c-header -include test.h test.h -o test.h.pch


            sla Staffan Larsen (Inactive)
            sla Staffan Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: