!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1111 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org176 Servers

Load older messages


SenderMessageTime
13 Sep 2025
@emilazy:matrix.orgemily (but actually it should be lib.meta.availableOn stdenv.hostPlatform wayland) 00:11:12
@emilazy:matrix.orgemilyI'm so mad about this00:11:33
@reckenrode:matrix.orgRandy Eckenrode I think technically wayland should build on Darwin even though it’s useless. 00:12:06
@emilazy:matrix.orgemilywell, more to the point it's something you actively want on e.g. FreeBSD00:12:30
@reckenrode:matrix.orgRandy EckenrodeJust a bunch of protocol description stuff. Nothing useful IIRC.00:12:34
@kfiz:matrix.sopado.dekfiz indeed:
nix-repl> pkgs.lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.wayland
true
00:27:59
@emilazy:matrix.orgemily well, it should be badPlatforms if it doesn't actually build… 00:29:20
@emilazy:matrix.orgemilybut probably not related to whatever the problem is here00:30:03
@reckenrode:matrix.orgRandy EckenrodeIt probably built in the past, but no one checked Darwin in an update.00:35:11
@emilazy:matrix.orgemily szlend: I fixed that mold crash btw 02:51:46
@ihar.hrachyshka:matrix.orgIhar HrachyshkaWayland doesn't build for Darwin now but there are upstream patches in progress to make it work05:10:24
@ihar.hrachyshka:matrix.orgIhar Hrachyshkahttps://github.com/NixOS/nixpkgs/pull/43514505:11:27
@szlend:matrix.orgszlendThat’s awesome! I’m curious what caused it06:35:59
@emilazy:matrix.orgemilyit's horribly cursed https://github.com/NixOS/nixpkgs/pull/44255406:37:03
@emilazy:matrix.orgemilythey have their library dlopen another one that dlopens itself to keep it alive06:37:24
@emilazy:matrix.orgemilyotherwise stuff that it calls destructors on in a static destructor vanishes06:37:45
@emilazy:matrix.orgemilybut it uses a relative path name without making it absolute for just that one call06:38:00
@emilazy:matrix.orgemilyso it fails to keep it alive on macOS where we use absolute paths to libraries rather than rpaths06:38:18
@emilazy:matrix.orgemilyand silently ignores that error until any binary that links it segfaults on exit06:38:34
@szlend:matrix.orgszlendYikes, great job figuring all that out. I tried to attach a debugger and stepped through the code and couldn’t make any sense of it. I would have never considered that as a possibility haha06:44:24
@emilazy:matrix.orgemilyyeah I saw in the PR where it broke Nix that it was happening even for a trivial libblake3 test program that linked it but didn't use it06:45:41
@emilazy:matrix.orgemilylooked in LLDB, saw that it was static dtor stuff, glanced at the code and saw that it was calling destructors on invalid pointers, tried to step through the startup code in LLDB to no avail, set the environment variable to trace dyld logs to get some idea of how that stuff was fitting together, saw dlopen calls that were mixed relative and absolute, got a hunch, added an rpath to the blake3 example and tada it worked06:47:27
@emilazy:matrix.orgemilygrepped the code for dlopen calls, saw that it constructed absolute paths for its main call but then there was this one direct call to keep itself alive that wasn't doing that06:48:01
@emilazy:matrix.orgemilyand here we are06:48:05
@emilazy:matrix.orgemilyit has been 0 days since it was rpath06:48:35
@emilazy:matrix.orgemily(I only started looking at this because TBB 2021 is broken by the LLVM 21 jump so I'm like four yak shaves deep...)06:49:18
@emilazy:matrix.orgemilythat mystery had been bugging me a little ever since it came up in here though so I'm glad it's resolved06:49:49
@emilazy:matrix.orgemily now we just need someone to figure out the bizarre nondeterministic Git codesigning bug. @zhaofeng:zhaofeng.li we need you... 06:50:17
@zhaofeng:zhaofeng.liZhaofeng Li Oh right, need to come back to this issue. Got really sidetracked and changed to git from gitFull myself 🫠 11:38:19
@oak:universumi.fioak 🏳️‍🌈♥️ changed their profile picture.09:44:25

Show newer messages


Back to Room ListRoom Version: 6