Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-46988

CCache giving "preprocessor error" for targets using precompiled headers

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown
    • KV-Engine Sprint 2021 June

    Description

      With the introduction of precompiled headers for targets in platform and kv_engine (MB-43677), I'm seeing ccache no longer work (find a matching cached object file) for targets using precompiled headers.

      Instead, 'ccache -s' reports 'preprocessor error':

      cache hit (direct)                     0
      cache hit (preprocessed)               0
      cache miss                             1
      cache hit rate                      0.00 %
      preprocessor error                     1
      

      Enabling ccache debug mode and examinind a log file for a failing
      object, we see the following:

      [2021-06-17T10:57:43.280809 15720] Running preprocessor
       [2021-06-17T10:57:43.280850 15720] Executing /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ <cut> -E ../platform/src/je_arena_malloc_stats.cc
      [2021-06-17T10:57:43.508729 15720] Preprocessor gave exit status 1
      [2021-06-17T10:57:43.508839 15720] Failed; falling back to running the real compiler
       [2021-06-17T10:57:43.509102 15720] Result: preprocessor error
      

      i.e. it failed to invoke the preprocessor (via c++ -E) and hence
      couldn't lookup the file in the cache.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              drigby Dave Rigby (Inactive)
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty