-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New reproducibility NIX_CFLAGS_COMPILE breaks ccache caching #109033
Comments
The solution referenced by the lean4 package works to trim out the |
I marked this as stale due to inactivity. → More info |
Upstream has added support for the flag. ccache/ccache#1168 You need explicitly enable it via 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
in |
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 #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:
The text was updated successfully, but these errors were encountered: