Nix Zürich | 115 Members | |
| https://zurich.nix.ug/ - Next ZHF event 23-24 November 2024 | 28 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Nov 2025 | ||
| the issue i’m running into is that i can enter the failing build container, but then i don’t know what command to run in there. functions like “postPatch” or “genericBuild” are not available somehow | 11:41:18 | |
zekjur: usually you just ran phases manually one by one e.g. eval "${unpackPhase:-unpackPhase}" | 11:42:31 | |
| thanks, but this is what i get: sudo /nix/store/sikvbjrwks8hpbyglk76cn6iq3zvn0lp-attach/bin/attach 4486029 bash-5.3# eval "${unpackPhase:-unpackPhase}" bash: unpackPhase: command not found bash-5.3# | 11:43:14 | |
wait, sorry, I guess I am confused, I am not really sure what you are talking about when you say “containers”. Is this different from like nix develop? The build phase scripts are just passed as environment variables to the build (form the derivation), so, I guess, if you just attach to the namespace, you do not get the env (but you can probably source it somehow?) | 11:44:42 | |
| Fabio Lenherr: Can I add you here as a reviewer? https://github.com/NixOS/nixpkgs/pull/461889 | 11:45:49 | |
| in a current nixpkgs checkout, i modified frigate like so: --- i/pkgs/by-name/fr/frigate/package.nix
and then i run nix build .#frigate, which ultimately prints something like: [1/0/1 built] building frigate-0.16.2 (pytestCheckPhase): sudo /nix/store/sikvbjrwks8hpbyglk76cn6iq3zvn0lp-attach/bin/attach 5167301 that’s what i run | 11:46:20 | |
| * in a current nixpkgs checkout, i modified frigate like so:
and then i run nix build .#frigate, which ultimately prints something like: [1/0/1 built] building frigate-0.16.2 (pytestCheckPhase): sudo /nix/store/sikvbjrwks8hpbyglk76cn6iq3zvn0lp-attach/bin/attach 5167301 that’s what i run | 11:46:35 | |
| * in a current nixpkgs checkout, i modified frigate like so: https://paste.noname-ev.de/paste/113 and then i run nix build .#frigate, which ultimately prints something like: [1/0/1 built] building frigate-0.16.2 (pytestCheckPhase): sudo /nix/store/sikvbjrwks8hpbyglk76cn6iq3zvn0lp-attach/bin/attach 5167301 that’s what i run | 11:47:43 | |
ok, I see, I have never heard of this hook tbh. I usually just do nix devleop and then run phases manually. There used to be a wiki page explaining this (basically, how to troubleshoot failing builds with nix-shell but I can’t see to find it now :/) | 11:49:24 | |
| yeah the wiki page instructions never worked for me 🤷 maybe all my packages are unusual somehow :D | 11:49:47 | |
@zekjur anyway, what works for me is nix develop .#frigate, then, in the shell, you just do eval "${unpackPhase:-unpackPhase}", then the same with patchPhase, and then you, um, figure out what it does next, because the expression has dontBuild = true so I assume it just runs the tests or something. That’s the traditional way of debugging builds | 11:57:25 | |
* zekjur: anyway, what works for me is nix develop .#frigate, then, in the shell, you just do eval "${unpackPhase:-unpackPhase}", then the same with patchPhase, and then you, um, figure out what it does next, because the expression has dontBuild = true so I assume it just runs the tests or something. That’s the traditional way of debugging builds | 11:57:33 | |
* zekjur: anyway, what works for me is nix develop .#frigate, then, in the shell, you just do eval "${unpackPhase:-unpackPhase}", then cd in to the directory, then the same with patchPhase, and then you, um, figure out what it does next, because the expression has dontBuild = true so I assume it just runs the tests or something. That’s the traditional way of debugging builds | 11:57:58 | |
| thanks. let me try how far i get with the different phases | 12:04:28 | |
| running eval "${buildPhase:-buildPhase}" results in an entirely different error :( 2.009 × Failed to build installable wheels for some pyproject.toml based projects
| 12:05:58 | |
| okay, so the phase that fails is pytestCheckPhase, but when i run unpackPhase and pytestCheckPhase, i get a different error, too :-/ | 12:24:08 | |
| Nix gives you reproducibility they say | 12:29:24 | |
| Oh it segfaults lol | 12:31:19 | |
Yeah, the easy way to check is /nix/store/ab4v2qp7q426zrizz38d4jfx025xifdf-pytest-check-hook/nix-support/setup-hook: line 23: 541 Segmentation fault – if you look at that line, you’ll see it is the pytestCheckPhase | 12:32:01 | |
| ok, so this is failure is a known upstream issue (see https://github.com/blakeblackshear/frigate/discussions/20663), but not sure why i ran into that only this once -.- | 12:39:26 | |
| ok, i give up. there are too many unknowns for me (not familiar with python apps, frigate dev env instructions are very bare, nix debugging is a mystery) | 13:02:19 | |
| Mini-PRs Ready for review: https://github.com/NixOS/nixpkgs/pull/461902 | 13:06:46 | |
| Please vote if you haven't yet. | 13:06:47 | |
| PR ready for Review: https://github.com/NixOS/nixpkgs/pull/461918 | 13:17:37 | |
In reply to @ners:nixos.devLooks like we’ll do it today. | 13:18:56 | |
| https://www.neuhauschocolates.com/en_FI/home | 13:22:11 | |
| zekjur: I’ve reproduced the failure:
| 13:33:02 | |
| I’m not really sure what you are going to do with it though, because it is a segfault, so you will probably want to whip out gdb and then, um... get debug builds of CPython and all the packages involved that have C components? | 13:33:57 | |
Actually, you don’t even need to run any of the tests, just the collection (run pytest --co -q in the shell after going through all the phases) segfaults | 13:36:10 | |
| thank you! that gets me a core dump at least (after ulimit -c unlimited) :) | 13:38:14 | |