Nixpkgs Stdenv | 257 Members | |
| 80 Servers |
| Sender | Message | Time |
|---|---|---|
| 6 Aug 2023 | ||
| https://github.com/NixOS/nixpkgs/pull/247478 | 07:52:25 | |
| 10 Aug 2023 | ||
I want to try and debug the lack of an $AR variable set while building a package without incurring a full rebuild. Is there a good way to turn on tracing (set -x) while all the setup scripts run for nix develop? (context: https://github.com/NixOS/nixpkgs/pull/246577#issuecomment-1672980907) | 10:44:44 | |
In reply to @p14:matrix.orgNIX_DEBUG is the variable used by setup.sh | 10:52:12 | |
| Set it to 6 | 10:52:17 | |
| Ah, thanks. I also managed to turn it on directly using preHook = "set -x" which revealed that: /nix/store/9kaazhysw3pmzlrslpb1nsgy97hq8hlm-x86_64-unknown-linux-gnu-llvm-binutils-wrapper-15.0.7/nix-support/setup-hook is empty where /nix/store/kcc44cgi7bclnhgs66v50a1jhr6nsqy5-x86_64-unknown-linux-gnu-llvm-binutils-wrapper-16.0.6/nix-support/setup-hook is 5 kiB | 10:52:50 | |
| and explains the missing $AR. | 10:53:00 | |
But the nix-diff of the llvm-binutils wrapper is pretty boring | 10:53:40 | |
| uuuh, I turned on NIX_DEBUG and now 15.0.7's setup-hook is not empty. Nice.. | 10:59:58 | |
| Oh dear. Turning on NIX_DEBUG for the binutils wrapper actually causes debug print output to end up in setup-hook. | 11:01:43 | |
| Or at least something which shouldn't be ending up in there. | 11:02:07 | |
| My repro is to insert
And the first line of setup-hook reads:
| 11:04:07 | |
| I guess I'm seeing: https://github.com/NixOS/nixpkgs/blob/2283bf968f3b6a2f100d81fb43db6d91f6aea706/pkgs/stdenv/generic/setup.sh#L936 | 11:09:48 | |
| Shouldn't this really go to stderr? | 11:09:52 | |
| 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:
What's going on? | 11:15:53 | |
| Redacted or Malformed Event | 11:16:13 | |
| * 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:
| 11:16:15 | |
| * 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:16:32 | |
| * 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 | |