When I use
flox build I often get errors like this
± flox build --fallback rust ockam flox/default
warning: not writing modified lock file of flake 'git+file:///Users/etorreborre/projects/rust/ockam':
• Updated input 'floxpkgs/nixpkgs/nixpkgs':
→ 'github:flox/nixpkgs/2788904d26dda6cfa1921c5abb7a2466ffe3cb8c' (2022-11-22)
error: cannot link '/nix/store/.tmp-link-34737-1532350256' to '/nix/store/.links/0p6lsw02532xw0i38x1y01nly5wlgdprcxkrjpgrzv1d80m6sg42': File exists
And the build eventually succeeds. It seems to me that those errors should be warnings or even not displayed if there’s nothing a user can do about it. Is there a way to suppress those errors from the output of
Also, after a long build I eventually end-up with this error
error: derivation '/nix/store/qpd4pf2p7hrx14cf6hl5nc7ff9fl5pj5-rustc-1.64.0.drv' requires non-existent output 'out' from input derivation '/nix/store/a221zrlxgwn0zmjd4h9jj440d887ik5g-llvm-14.0.6.drv'
Why does this happen? What can I do about it?
I restarted the build and it eventually finished but this is certainly surprising for a first time, non-nix user.
At least the second issue is a known nix bug. The fix is merged upstream and will trickle into flox.
We’ll see if we can fast track that and backport that fix into the nix shipping with flox.
As Yannik mentions the second issue is a Nix bug, but this first issue is the default behaviour of Nix itself. You can squelch the message by typing
flox flake update, at which point the flake.lock will be modified to refer to the new “stable” version of nixpkgs, but that will just silence the warning for a month.
I’ll log an issue to figure out a better way to deal with these messages going forward. (This issue of dealing with stability “bumps” has been a subject of debate internally for some time!) Thanks for the feedback!