!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

256 Members
79 Servers

Load older messages


SenderMessageTime
10 Aug 2023
@p14:matrix.orgp14

My repro is to insert NIX_DEBUG = if bintoolsName == "llvm-binutils" then 6 else null; onto pkgs/build-support/bintools-wrapper/default.nix and then build for example pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc. It results in:

x86_64-unknown-linux-gnu-clang-wrapper> /nix/store/mldrk9c17hjsqjv938hp1192i7f56844-x86_64-unknown-linux-gnu-llvm-binutils-wrapper-15.0.7/nix-support/setup-hook: line 1: /nix/store/yl01rd58vp4m8bbhkihpk132cprfmx6f-expand-response-params/bin/expand-response-params: Permission denied

And the first line of setup-hook reads:

@expandResponseParams@ -> /nix/store/yl01rd58vp4m8bbhkihpk132cprfmx6f-expand-response-params/bin/expand-response-params
11:04:07
@p14:matrix.orgp14I guess I'm seeing: https://github.com/NixOS/nixpkgs/blob/2283bf968f3b6a2f100d81fb43db6d91f6aea706/pkgs/stdenv/generic/setup.sh#L93611:09:48
@p14:matrix.orgp14Shouldn't this really go to stderr?11:09:52
@p14:matrix.orgp14

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools

I get:

-r--r--r-- 1 root root 0 Jan  1  1970 result/nix-support/setup-hook

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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;

What's going on?

11:15:53
@p14:matrix.orgp14Redacted or Malformed Event11:16:13
@p14:matrix.orgp14 *

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools

I get:

-r--r--r-- 1 root root 0 Jan  1  1970 result/nix-support/setup-hook

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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;

I end up with:

-r--r--r-- 1 root root 4781 Jan  1  1970 result/nix-support/setup-hook


What's going on?
11:16:15
@p14:matrix.orgp14 *

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools

I get:

-r--r--r-- 1 root root 0 Jan  1  1970 result/nix-support/setup-hook

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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;

I end up with:

-r--r--r-- 1 root root 4781 Jan  1  1970 result/nix-support/setup-hook

What's going on?

11:16:32
@p14:matrix.orgp14 *

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools```

I get:

-r--r--r-- 1 root root 0 Jan 1 1970 result/nix-support/setup-hook


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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;


I end up with:

-r--r--r-- 1 root root 4781 Jan 1 1970 result/nix-support/setup-hook


What's going on?
11:39:43
@p14:matrix.orgp14 *

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools
```
I get:

-r--r--r-- 1 root root 0 Jan 1 1970 result/nix-support/setup-hook


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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;


I end up with:

-r--r--r-- 1 root root 4781 Jan 1 1970 result/nix-support/setup-hook


What's going on?
11:40:10
@p14:matrix.orgp14 *

Wow, this is unfortunate. If I build:

nix build --rebuild pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools

I get:

-r--r--r-- 1 root root 0 Jan  1  1970 result/nix-support/setup-hook

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:

preHook = if bintoolsName == "llvm-binutils" then "set -x" else null;

I end up with:

-r--r--r-- 1 root root 4781 Jan  1  1970 result/nix-support/setup-hook

What's going on?

11:40:35
@artturin:matrix.orgArtturin
In reply to @p14:matrix.org
I guess I'm seeing: https://github.com/NixOS/nixpkgs/blob/2283bf968f3b6a2f100d81fb43db6d91f6aea706/pkgs/stdenv/generic/setup.sh#L936
https://github.com/NixOS/nixpkgs/blob/b8392f9eb12070b647d711c3964ebc89c5d34854/pkgs/stdenv/generic/setup.sh#L1438
11:56:28
@artturin:matrix.orgArtturinthis putting the output to setup-hook11:56:38
@p14:matrix.orgp14Yep11:56:58
@artturin:matrix.orgArtturinmaking a pr11:57:03
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/24834012:09:24
@p14:matrix.orgp14 I need some trofi -like magic for identifying the cause of this bizzarro behaviour. 13:41:29
@p14:matrix.orgp14

On my machine,

nix build --rebuild nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools
stat -c%s result/nix-support/setup-hook
``
Apparently, with --rebuild, reproducibly gives me a zero-byte setup-hook. But not on another machine. So, nondeterminism lurking somewhere nasty?
13:42:13
@p14:matrix.orgp14 *

On my machine,

nix build --rebuild nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools
stat -c%s result/nix-support/setup-hook

Apparently, with --rebuild, reproducibly gives me a zero-byte setup-hook. But not on another machine. So, nondeterminism lurking somewhere nasty?

13:42:19
@p14:matrix.orgp14 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
@p14:matrix.orgp14

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 --rebuild, that shouldn't keep corrupted paths on disk would it? This means surely that I'm repeatably generating the bad file, (I hope, tell me if I'm wrong?)

13:45:25
@p14:matrix.orgp14Inserting diagnostics like NIX_DEBUG makes the problem go away13:46:26
@p14:matrix.orgp14dropping into a develop shell makes the problem go away13:46:40
@trofi:matrix.orgtrofi Is it an exact command? THe command coplains to me as error: flake 'flake:nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52' does not provide attribute 13:46:45
@p14:matrix.orgp14Uh, should be, is it possible I have something in my flake registry messing things up?13:47:06
@p14:matrix.orgp14 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
@p14:matrix.orgp14 * 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
@artturin:matrix.orgArtturin nix build --rebuild nixpkgs/73f18ca8b33ad1281958193e7e35f63b6ef47e52#pkgsLLVM.llvmPackages_15.compiler-rt-no-libc.stdenv.cc.bintools works fine here 13:48:03
@artturin:matrix.orgArtturinfine as in no error: flake...13:49:22
@trofi:matrix.orgtrofi getting 4781 here. is it a nixos? 13:49:25
@p14:matrix.orgp14Yes, it's a nixos.13:49:33

Show newer messages


Back to Room ListRoom Version: 9