!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
24 Oct 2025
@emilazy:matrix.orgemilyif we make it expand to a real availability annotation in one, it's wrong for the other01:55:48
@reckenrode:matrix.orgRandy EckenrodeWe would use the SDK’s stubs, which means we want functioning checks for private symbols.01:56:13
@emilazy:matrix.orgemilyright01:56:26
@emilazy:matrix.orgemilybut only for XNU headers because we are not building our own XNU01:56:34
@emilazy:matrix.orgemilynot for anything else we actually build01:56:40
@emilazy:matrix.orgemilydespite those things sometimes using XNU headers01:56:47
@emilazy:matrix.orgemilygiven the divergence here, there's no way out of patching the XNU headers, because you want two different meanings for the same expression in different contexts01:57:02
@emilazy:matrix.orgemilyApple doesn't do what we do, so they don't run into the inconsistency01:57:20
@reckenrode:matrix.orgRandy EckenrodeWe would in fact want those to have functioning checks too because they are using private APIs that may not be available on our deployment target.01:57:44
@emilazy:matrix.orgemily"those" as in the source releases we build?01:58:14
@emilazy:matrix.orgemilydid you look at the examples I linked? :(01:58:29
@emilazy:matrix.orgemily it's stuff defining those symbols 01:58:37
@reckenrode:matrix.orgRandy EckenrodeYes. I had to add an availability check to one of the releases.01:58:38
@emilazy:matrix.orgemilythat's different01:58:50
@emilazy:matrix.orgemily that's an API_* check 01:58:54
@emilazy:matrix.orgemilyand not something in a source release defining its own symbol01:59:01
@reckenrode:matrix.orgRandy EckenrodeIIRC we don’t install the private headers for libpcap or libffi. How the symbols are defined for them doesn’t matter.01:59:51
@reckenrode:matrix.orgRandy EckenrodeIf we do, then we should strip out the checks. I do agree with that.02:00:28
@emilazy:matrix.orgemily dyld is a much more relevant example 02:01:26
@reckenrode:matrix.orgRandy Eckenrode How? It doesn’t install any headers. The only dylib it installs is libdsc_extractor.dylib, which doesn’t have any public API. 02:02:42
@emilazy:matrix.orgemily
    substituteInPlace include/mach-o/utils_priv.h \
      --replace-fail 'SPI_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0))' ""

we do this. if we did not do this, it would start failing to build due to availability errors

02:03:39
@emilazy:matrix.orgemilyincorrectly02:03:43
@reckenrode:matrix.orgRandy EckenrodeThat’s actually probably wrong.02:05:06
@emilazy:matrix.orgemily the only cases where SPI_AVAILABLE(…) should actually expand to a runtime check in anything we use is xnu headers that define APIs that tbh I literally cannot find code calling at all 02:05:16
@reckenrode:matrix.orgRandy Eckenrode That function is defined in libdyld/utils.cpp, which we don’t build. 02:05:17
@emilazy:matrix.orgemilyuh, shouldn't we be building it…? 🫠02:05:56
@reckenrode:matrix.orgRandy Eckenrode No. We don’t build libdyld.dylib. 02:06:08
@reckenrode:matrix.orgRandy EckenrodeWe link against the system one.02:06:20
@reckenrode:matrix.orgRandy EckenrodeIf we link against it at all.02:06:32
@reckenrode:matrix.orgRandy EckenrodeYou’re right if we’re actually building and consuming something with private APIs, we want to remove the annotations to make sure that works correctly for consumers (including the build itself), but that’s not the case here. The dyld source release is pretty nasty, so I try to build as little as possible to get the tools I want out of it.02:08:50

Show newer messages


Back to Room ListRoom Version: 6