!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
24 Oct 2025
@emilazy:matrix.orgemily so __SPI_AVAILABLE(macos(15.0), …) just means "this wasn't in dyld before macOS 15.0", I guess (why that's useful I don't know) 01:35:18
@emilazy:matrix.orgemilywhen we're building the source releases ourselves it seems the public SDK behaviour of eliding those availability checks is exactly the correct thing01:35:48
@emilazy:matrix.orgemilyhttps://github.com/search?q=repo%3Aapple-oss-distributions%2Flibdispatch%20dispatch_time_from_nsec&type=code another example01:36:15
@emilazy:matrix.orgemily so… all the darwin.AvailabilityVersions version of it would do is incorrectly mark stuff we're building as unavailable depending on SDK version, essentially 01:37:10
@reckenrode:matrix.orgRandy EckenrodeIt probably depends on whether we’re linking to the implementation in one of the source releases or to the symbol exported by the system in the SDK.01:37:19
@emilazy:matrix.orgemilyright01:37:28
@emilazy:matrix.orgemilybut I think this stuff is mostly not exported by the SDK?01:37:36
@emilazy:matrix.orgemilybecause it's all stuff in private headers01:37:40
@reckenrode:matrix.orgRandy EckenrodeThe symbols are.01:37:42
@reckenrode:matrix.orgRandy EckenrodeThey’re in the text-based stubs.01:37:48
@emilazy:matrix.orgemily right, ok, dispatch_time_from_nsec is there 01:38:06
@emilazy:matrix.orgemilyit seems at least very contextual whether you'd want them to expand to availability checks01:38:16
@emilazy:matrix.orgemily like any time you're compiling something directly you don't want SPI_AVAILABLE on its own definitions 01:38:48
@emilazy:matrix.orgemily what probably makes sense is rewriting SPI_API_ inside the XNU headers etc. themselves 01:39:15
@reckenrode:matrix.orgRandy EckenrodeI’d only want to elide them if we were actually building and using libdispatch on Darwin in lieu of using the system library. I would want those SPI checks in this case when using the system library because they may not be available on older releases. I ran into at least one of those with the 14.0 min version that required patching to check availability.01:39:25
@emilazy:matrix.orgemily libdispatch was just an example 01:39:34
@emilazy:matrix.orgemily dyld is more relevant 01:39:50
@emilazy:matrix.orgemily(since we actually build that)01:40:00
@emilazy:matrix.orgemilyhttps://github.com/apple-oss-distributions/libpcap/blob/e5deb8a7884f6f0d24343e81dfd0a4585a03880a/libpcap/pcap-util.h#L6101:40:37
@emilazy:matrix.orgemily we also build libpcap 01:40:40
@reckenrode:matrix.orgRandy EckenrodeThe only libraries we build are ICU, libffi, libiconv, libresolv, libsbuf, libutil, and libpcap.01:40:44
@emilazy:matrix.orgemilythough I guess we don't use the internal SDK for that01:40:47
@emilazy:matrix.orgemily we build the Mach-O lib in dyld at least… 01:41:10
@emilazy:matrix.orgemilywhich has such annotations01:41:13
@reckenrode:matrix.orgRandy EckenrodeMost things that want to use private libpcap symbols re-declare the function definition. Only Apple bothers to use the private headers.01:41:26
@reckenrode:matrix.orgRandy EckenrodeIt’s a static library that isn’t installed.01:41:57
@reckenrode:matrix.orgRandy EckenrodeI did that to avoid having the same lists of files for multiple executables.01:42:45
@reckenrode:matrix.orgRandy Eckenrode I do export the libdsc_extractor dylib though. 01:43:14
@emilazy:matrix.orgemily fwiw, the repos that mention SPI_AVAILABLE are: libpthread, libmalloc, xnu, mDNSResponder, dyld, Security, WebKit, libdispatch, WebCore, configd, libplatform, libpcap, IOKitUser, Libinfo, eap8021x, libffi 01:44:33
@emilazy:matrix.orgemily I think that the only time we'll be using headers with SPI_* stuff and not just wanting them to be elided (because we're building stuff ourselves and so it's available invariant of runtime OS version) is really just the xnu headers 01:45:13

Show newer messages


Back to Room ListRoom Version: 6