Nix on macOS | 1183 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 193 Servers |
| Sender | Message | Time |
|---|---|---|
| 11 Apr 2026 | ||
| AFAICT, in the limit, we would have to ensure that nothing we build ever has a weak export for any symbol that is now or could be in the SDK in future, because those will get coalesced ignoring two-level namespaces | 21:48:20 | |
| I don’t have hours to deal with this. If resolving it is going to require more time than I can invest, then what else can I do? | 22:08:32 | |
| 12 Apr 2026 | ||
| lol I didn't think it was possible to configure any programs besides the ones officially supported by nix-darwin. Turns out you can declare settings for any Programm that has a plist file in Library/Prefrences/ | 00:07:32 | |
| * lol I didn't think it was possible to configure any programs besides the ones officially supported by nix-darwin. Turns out you can declare settings for any Programm that has a plist file in Library/Prefrences/. Not all have extensive options, but most that can be managed or are intended to be managed by an mdm | 00:09:35 | |
| 00:58:06 | ||
| 12:15:57 | ||
| Both your feelings are valid. I'm currently reading through emily's very thorough and valuable analysis in https://github.com/NixOS/nixpkgs/pull/506470 to understand the problem. I'll try to implement and verify Emily's suggestions to take off some pressure. If it doesn't work out, we can still come back to randy's PR to unblock dotnet at least. | 12:53:34 | |
| I’m not trying to downplay the research @emily did, but I am lacking enthusiasm for the idea of working upstream on this, and if I go deep into this, it’s going to chew up what limited time I have. | 13:15:31 | |
| Additionally, I actually need .NET for something I’m doing, so being broken is no good. | 13:16:15 | |
| fwiw, I tried the visibility annotation on the explicit instantiation with no luck - I think it's inherited from the template definition and from reading Clang code it seemed fairly hardcoded. everything I can find about Mach-O weak bindings implied that uses internal to a dylib should resolve to the symbol inside the dylib though. I also couldn't reproduce with a simple test program using dlopen on our ICU build while linking to Foundation. so I need to poke more at stuff there to figure out the true root cause of why this is happening to .NET | 13:47:26 | |
| I wouldn't be surprised if the re-exports have something to do with it, so using Apple's bundling code to create the libicucore is definitely nicely worth trying and not something I've tried yet. (possibly we could use the mergeable libraries stuff to make it less gross, if our ld64 supports that?) | 13:48:35 | |
| I'm hoping that figuring out exactly what's triggering this will point us to a more durable solution, because having to ensure we never have a weak symbol referencing anything that the system cache ever uses internally, now or in the future, would be super unsustainable. in the limit it's impossible to predict, but even in the immediate state it implies that building our own libxml2 is risky, and that's no good... | 13:51:21 | |
I guess in the worst case we could try to teach tools to prefix every single symbol with _nix_, but... that would be a horrendous mess 🙃 so I am really hoping that we can make two-level namespaces keep working for us here | 13:53:16 | |
| ODR when it's something pervasive like libc++ that is linked directly into programs and can easily show up in ABIs etc. is one thing to step away from and say that we're going to just use the system one or prefix our symbols, but when it's internal implementation details of system stuff leaking that aren't otherwise exposed to consumers... TBH if it's not the result of .NET doing something really weird then it seems like a screwup on Apple's part to not use the platform facilities to hide that kind of thing, but it'll also really suck to have to play whack-a-mole and have existing binaries break on new OSes. since I don't have a minimal reproducer yet I'm optimistic that in the usual case this stuff doesn't actually leak and that it's not as bad as it sounds. but I will need to dig some more. I'm also surprised if nobody other than Nixpkgs has run into this which increases my feeling that it's something messed up about .NET. | 13:59:13 | |
| (ODR also only covers full programs and the C++ standard's position on runtime dynamic loading in a system with two-level namespaces is ❓... given the complete encapsulation in the system framework here I feel we ought to be in the clear as long as we are correctly interoping for fundamentals like unwinding and RTTI, which we should be these days) | 14:01:51 | |
| anyway, would be very interested to hear how it goes if you get the Apple dylib merging step working | 14:02:20 | |
| unfortunately not sure a simpler way to test than building .NET as I'd expect we'll still get weak exports in the monolithic dylib even if it fixes the issue | 14:03:14 | |
| but maybe I will be able to rootcause it faster than .NET builds 🫠 | 14:03:44 | |
| I don’t think ld64 supports it. I think it’s only ld-prime. | 17:11:34 | |
| Does anyone other than us actually build and use Apple’s fork? The only other place I’m aware it’s used is in the Linux builds of Swift (via swift-corelibs-icu). I assume MacPorts and Homebrew use upstream ICU or link ICU from the SDK. | 17:16:48 | |
| I’ll take a look at it, but I need to rebuild my stdenv. My system does a GC weekly, which deleted all the builds from my work last week. | 17:17:32 | |
| 18:37:32 | ||
| 13 Apr 2026 | ||
| on the macos builders I often see fsevents claiming lots of swap | 00:23:25 | |
| it feels like it leaks and brings the builder into a virtual memory starvation situation | 00:23:56 | |
| I can just kill it and that gets me back 20G mem/swap (on a 16GB machine) and the machine is much more responsive again | 00:24:35 | |
| the question I want to ask is: what kind of utter garbage is this? | 00:24:59 | |
| the question I actually want answered is: is this known and is there a workaround that doesn't require manual toil? | 00:25:57 | |
Download | 00:27:19 | |
| that's two days | 00:27:38 | |
| and then it goes all in on swap for 12 hours and doesn't come back | 00:27:59 | |