Nixpkgs Stdenv | 230 Members | |
| 74 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Aug 2023 | ||
| * Wow, this is unfortunate. If I build:
-r--r--r-- 1 root root 0 Jan 1 1970 result/nix-support/setup-hook
preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;
-r--r--r-- 1 root root 4781 Jan 1 1970 result/nix-support/setup-hook
| 11:39:43 | |
| * Wow, this is unfortunate. If I build:
-r--r--r-- 1 root root 0 Jan 1 1970 result/nix-support/setup-hook
preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;
-r--r--r-- 1 root root 4781 Jan 1 1970 result/nix-support/setup-hook
| 11:40:10 | |
| * Wow, this is unfortunate. If I build:
I get:
Now if I try to determine why setup-hook is empty by setting the preHook to include 'set -x', then, it's non-empty and works correctly:
I end up with:
What's going on? | 11:40:35 | |
In reply to @p14:matrix.orghttps://github.com/NixOS/nixpkgs/blob/b8392f9eb12070b647d711c3964ebc89c5d34854/pkgs/stdenv/generic/setup.sh#L1438 | 11:56:28 | |
| this putting the output to setup-hook | 11:56:38 | |
| Yep | 11:56:58 | |
| making a pr | 11:57:03 | |
| https://github.com/NixOS/nixpkgs/pull/248340 | 12:09:24 | |
| I need some trofi -like magic for identifying the cause of this bizzarro behaviour. | 13:41:29 | |
| On my machine,
| 13:42:13 | |
| * On my machine,
Apparently, with --rebuild, reproducibly gives me a zero-byte setup-hook. But not on another machine. So, nondeterminism lurking somewhere nasty? | 13:42:19 | |
| If I drop into a dev shell I don't get the zero byte setup hook. Is this a case of something bad getting cached in my nix store? I'm a long way away from running out of disk space (Terabytes free). | 13:43:49 | |
| I'm afraid that if I simply delete the bad paths I won't be able to reproduce this. Though I dare say that keeping the bad outputs doesn't help me much either. That said, I'm doing a | 13:45:25 | |
| Inserting diagnostics like NIX_DEBUG makes the problem go away | 13:46:26 | |
| dropping into a develop shell makes the problem go away | 13:46:40 | |
Is it an exact command? THe command coplains to me as error: flake 'flake:nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52' does not provide attribute | 13:46:45 | |
| Uh, should be, is it possible I have something in my flake registry messing things up? | 13:47:06 | |
How about ix build --rebuild github:nixos/nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools -L; stat -c%s result/nix-support/setup-hook ? | 13:47:25 | |
* How about nix build --rebuild github:nixos/nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools -L; stat -c%s result/nix-support/setup-hook ? | 13:47:31 | |
nix build --rebuild nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools works fine here | 13:48:03 | |
| fine as in no error: flake... | 13:49:22 | |
getting 4781 here. is it a nixos? | 13:49:25 | |
| Yes, it's a nixos. | 13:49:33 | |
| And I get 4781 on my good machine as well | 13:49:42 | |
| But 0 on the bad (obv). | 13:49:52 | |
| And nothing different in build log either compared to the "good" one? Let's see what populates that setup-hook. | 13:50:42 | |
| Build logs appear the same.
| 13:51:18 | |
I'm wondering how I can get my hands on more detailed diagnostics without perturbing the problem as NIX_DEBUG and set -x seem to. One idea is to diff the build closures of the good machine and bad machine somehow | 13:51:54 | |
| Though I kinda suspect they'll be the same | 13:52:02 | |
| Another idea is to use 'perf trace record' or similar and try and get a trace of what the builder is doing. | 13:52:29 | |