Depends build does not use ccache on macOS 12.4 #25387

issue Sjors openend this issue on June 16, 2022
  1. Sjors commented at 8:37 am on June 16, 2022: member

    I have ccache version 4.6.1 via homebrew. On master @ d6832217ef45ea0c858e3fcdec5d4fe87097c839:

    0ccache -C
    1ccache --zero-stats
    2cd depends
    3make NO_QT=1 NO_ZMQ=1 NO_BDB=1 NO_UPMP=1 NO_NATPMP=1
    4ccache --show-stats
    

    This builds a bunch of stuff, but nothing ends up in the ccache:

     0Summary:
     1  Hits:               0 /     0
     2    Direct:           0 /     0
     3    Preprocessed:     0 /     0
     4  Misses:             0
     5    Direct:           0
     6    Preprocessed:     0
     7Primary storage:
     8  Hits:               0 /     0
     9  Misses:             0
    10  Cache size (GB): 0.00 / 10.00 (0.00 %)
    

    Possibly related to #21552, but no cross-compilation is involved here.

    This may have the case forever; I only noticed today while experimenting with distcc. This uses $CCACHE_PREFIX=distcc (which I disabled above) in order to first check the cache and only then distribute a compilation job. I noticed no jobs got distributed when building depends, which is annoying, because that’s by far the slowest compilation task (part of why I rarely use it).

  2. Sjors added the label Bug on Jun 16, 2022
  3. fanquake removed the label Bug on Jun 16, 2022
  4. fanquake commented at 8:40 am on June 16, 2022: member
    Depends doesn’t use ccache by default. If you want to use it, pass the required flags in your CXX etc.
  5. Sjors commented at 9:00 am on June 16, 2022: member

    @fanquake TIL. We should probably mention that in the productivity notes. Any particular reason for that? Was it causing problems?

    The following causes at least some things to get cached:

    0export CXX="ccache c++"
    1export CC="ccache c" 
    
  6. laanwj commented at 5:39 pm on June 20, 2022: member

    Any particular reason for that? Was it causing problems?

    I guess we assume that a depends build is a rare enough thing that using ccache doesn’t really matter, it’s not worth the extra complexity of detecting it and passing to to all sub-build systems.

  7. Sjors commented at 8:58 am on June 21, 2022: member
    It happens a bit more often when switching branches for review, but for other use cases it won’t. Just having the right instructions in the productivity notes is probably enough. Not sure if my guess above is enough.
  8. fanquake commented at 1:51 pm on August 8, 2022: member
    Closing for now, as this isn’t a bug or an issue. Feel free to open a PR to add some documentation if you want.
  9. fanquake closed this on Aug 8, 2022

  10. bitcoin locked this on Aug 8, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me