!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
16 Oct 2025
@reckenrode:matrix.orgRandy EckenrodeLonger term (after I land Swift 6.2), Swift Build will be available as a package. It’s the engine used by Xcode.17:51:53
@samasaur:matrix.orgsamasaur managed to get it to build the swift package fine (add swift and swiftpm to buildInputs, set dontUseSwiftpmBuuld, possibly patch build.rs in that subdirectory), but it had linking errors 17:52:25
@samasaur:matrix.orgsamasauri can try and pull up the work i did17:52:39
@reckenrode:matrix.orgRandy Eckenrode You can probably get away with having your xcode-select stub ech "$DEVELOPER_DIR". 17:52:44
@reckenrode:matrix.orgRandy Eckenrode * You can probably get away with having your xcode-select stub echo "$DEVELOPER_DIR". 17:54:22
@reckenrode:matrix.orgRandy Eckenrode https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L87 should work as written with SDKROOT set. 17:55:19
@reckenrode:matrix.orgRandy Eckenrode https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L33 should be /usr/lib/swift/macosx. The linker will find it relative to the SDKROOT. 17:56:06
@reckenrode:matrix.orgRandy Eckenrode https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L39_L61 needs to be swift-build due to the way we package Swift and SwiftPM. It expects to find swift-<subcommand> in the same path as swift. 17:57:30
@reckenrode:matrix.orgRandy Eckenrode https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L91 could just readDEVELOPER_DIR from the environment if xcode-select fails. 17:58:50
@reckenrode:matrix.orgRandy Eckenrode * https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L91 could just read DEVELOPER_DIR from the environment if xcode-select fails. 17:58:57
@reckenrode:matrix.orgRandy Eckenrode Using build.rs to run a Swift build is certainly a choice, but those are the only things that leap out to me. 18:00:03
@samasaur:matrix.orgsamasaur
In reply to @reckenrode:matrix.org
https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L39_L61 needs to be swift-build due to the way we package Swift and SwiftPM. It expects to find swift-<subcommand> in the same path as swift.
FWIW I think this is not an issue if you add both swift and swiftpm
18:14:08
@reckenrode:matrix.orgRandy Eckenrode It’s been a while since I messed with the Swift stuff, but I’m pretty sure it fails due to swift-build not being in the right place. That’s why the hook is written to invoke swift-build. I could be wrong though. 18:15:13
@reckenrode:matrix.orgRandy Eckenrode This time failure is weird. It fails to detect sighandler_t then uses __sighandler_t instead even though its provided signal.h provides a definition of sighandler_t. 18:19:25
@samasaur:matrix.orgsamasaur
In reply to @reckenrode:matrix.org
It’s been a while since I messed with the Swift stuff, but I’m pretty sure it fails due to swift-build not being in the right place. That’s why the hook is written to invoke swift-build. I could be wrong though.
I am basing my claim off the fact that I got past that stage of the build.rs file without changing it to swift-build
18:23:24
@samasaur:matrix.orgsamasaur* managed to get it to build the swift package fine (add swift and swiftpm to buildInputs, set dontUseSwiftpmBuild, possibly patch build.rs in that subdirectory), but it had linking errors18:23:50
@samasaur:matrix.orgsamasauram actively on the way to the airport rn but will post the work I did when I get a chance18:24:13
@reckenrode:matrix.orgRandy EckenrodeI have a fix. This issue was due to a GCC 15 fix that only works on glibc. There was another patch proposed that fixes the failure in a portable way. I’m currently building to confirm.18:42:09
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/pull/45267618:44:09
@samasaur:matrix.orgsamasaurrunning a nixpkgs-review on that now but it looks good to me19:06:26
@samasaur:matrix.orgsamasaurugh it needs a linux builder for some reason?19:08:28
@samasaur:matrix.orgsamasaurnvm then19:08:31
@reckenrode:matrix.orgRandy EckenrodeShould I retarget staging?19:09:42
@reckenrode:matrix.orgRandy EckenrodeThe rebuild count isn’t high, but it rebuilds nixos-tests, which I guess is heavy?19:09:57
@samasaur:matrix.orgsamasaurthat seems reasonable19:15:53
@reckenrode:matrix.orgRandy EckenrodeThat’s what the tooltip for the label said, so I switched it to staging.19:16:09
@samasaur:matrix.orgsamasaur

here's my work on sentry-cli. it still fails with the following warnings:

sentry-cli>   = note: ld: warning: directory not found for option '-L/nix/store/2rynnwc94yn21j5d4acci5ww4qgp4608-apple-sdk-14.4/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftObservation'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftFoundation'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swift_StringProcessing'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swift_Concurrency'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftXPC'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCompatibilityPacks'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftUniformTypeIdentifiers'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftIOKit'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftDarwin'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCore'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftDispatch'
sentry-cli>           ld: warning: Could not find or use auto-linked library 'swiftCompatibility56'

followed by a LOT of "unavailable symbol" errors

19:16:56
@samasaur:matrix.orgsamasauri won't be able to look at this for a bit but hopefully that is helpful. best of luck to anyone who tries, hopefully it's just adjusting the linking path19:26:05
@reckenrode:matrix.orgRandy Eckenrode This patch works for me: https://gist.github.com/reckenrode/8bae7645d17a60f8659439e7944199cd. You need to use replaceVars with swiftLib = lib.getLib swift; on the patch. 20:01:06
@reckenrode:matrix.orgRandy Eckenrode
$ result/bin/sentry-cli --version
sentry-cli 2.56.1
20:01:20

Show newer messages


Back to Room ListRoom Version: 6