!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
24 Oct 2025
@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
@emilazy:matrix.orgemilyfair enough02:09:38
@emilazy:matrix.orgemily maybe just doing a #define __SPI_AVAILABLE API_AVAILABLE etc. is the way to go for the internal SDK then 02:10:03
@emilazy:matrix.orgemilyat worst we'll have to patch it out in some places02:10:09
@reckenrode:matrix.orgRandy EckenrodeMaybe it sucks less if we can use their Xcode project. We still need to get a Swift Build that can build something non-trivial.02:10:26
@reckenrode:matrix.orgRandy EckenrodeAs far as patching things, my ideal is building a source release without having to do anything to get it to build.02:11:26
@emilazy:matrix.orgemilywell, if it's yelling at you about missing availability checks for a symbol defined in the same source release…02:13:11

Show newer messages


Back to Room ListRoom Version: 6