Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50372

ninja and SCons do not see each others ccache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      reproduced on master commit: 0662433ac038f4f3cf137a1be30ca245c180e990

      Repro system:
      Ubuntu 18.04 virtual workstation

      Steps to reproduce:

      1. Start with clean checkout and clean cache:
        git clean -xfd
        ccache -Cz
      2. build with scons
        /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache build/opt/mongo/db/global_settings.o
      3. delete the object file and set ccache to log:
        rm build/opt/mongo/db/global_settings.o
        export CCACHE_LOGFILE=scons_ccache.log
      4. build again
        /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache build/opt/mongo/db/global_settings.o
      5. now set the log file to something else:
        export CCACHE_LOGFILE=ninja_ccache.log
      6. generate ninja and build
        /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache --ninja --build-tools=next generate-ninja
        ninja build/opt/mongo/db/global_settings.o
      7. Now remove the file and cache log so we can minimize the log
        rm ninja_ccache.log
        rm build/opt/mongo/db/global_settings.o
        ninja build/opt/mongo/db/global_settings.o
      8. compare the log files.
      Show
      reproduced on master commit: 0662433ac038f4f3cf137a1be30ca245c180e990 Repro system: Ubuntu 18.04 virtual workstation Steps to reproduce: Start with clean checkout and clean cache: git clean -xfd ccache -Cz build with scons /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache build/opt/mongo/db/global_settings.o delete the object file and set ccache to log: rm build/opt/mongo/db/global_settings.o export CCACHE_LOGFILE=scons_ccache.log build again /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache build/opt/mongo/db/global_settings.o now set the log file to something else: export CCACHE_LOGFILE=ninja_ccache.log generate ninja and build /usr/bin/python3.8 "buildscripts/scons.py" CCACHE=ccache --ninja --build-tools=next generate-ninja ninja build/opt/mongo/db/global_settings.o Now remove the file and cache log so we can minimize the log rm ninja_ccache.log rm build/opt/mongo/db/global_settings.o ninja build/opt/mongo/db/global_settings.o compare the log files.
    • Sprint:
      Dev Platform 2020-09-07

      Description

      When building first with SCons or ninja, then deleting the built object file, and then rebuilding with the opposing tool, SCons and ninja do not use each others ccache and instead will build and put the object file in ccache twice with different hashes.

       

      Attached log files show two cache hits, but with different hashes.

        Attachments

        1. ninja_ccache.log
          4 kB
        2. scons_ccache.log
          3 kB

          Activity

            People

            Assignee:
            ryan.egesdahl Ryan Egesdahl
            Reporter:
            daniel.moody Daniel Moody
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: