Open Kha opened 3 years ago
The solution referenced by the lean4 package works to trim out the -frandom-seed
.
I marked this as stale due to inactivity. → More info
Upstream has added support for the flag. https://github.com/ccache/ccache/pull/1168
You need explicitly enable it via sloppiness = random_seed
in the ccache config file though.
Given that we enable it for all packages by default, perhaps ccacheStdenv should enable it by default too.
You can also enable that flag with an environment variable similar to how you set CCACHE_DIR
according to https://nixos.wiki/wiki/CCache, by adding
export CCACHE_SLOPPINESS=random_seed
in extraConfig
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/bisect-linux-kernel-without-recompiling-every-time/42633/3
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/really-low-ccache-hit-rates-when-overriding-a-package/47421/4
Describe the bug After https://github.com/NixOS/nixpkgs/pull/102251, a new
-frandom-seed
C compiler flag is inserted with a value that changes whenever the derivation hash has changed. This will change the ccache cmdline hash, completely defeating any use ofccacheWrapper
etc.Additional context Arguably, ccache should probably ignore
frandom-seed
since caching modulo that value is no worse than caching a cmdline that did not contain the flag in the first place, which effectively sets it to a random value. But it would be great to be able to at least opt out of the new behavior until this is "fixed" upstream (if accepted at all).Notify maintainers @andir
Maintainer information: