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.org | 187 Servers |
| Sender | Message | Time |
|---|---|---|
| 16 Oct 2025 | ||
| Longer 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 | |
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 | |
| i can try and pull up the work i did | 17:52:39 | |
You can probably get away with having your xcode-select stub ech "$DEVELOPER_DIR". | 17:52:44 | |
* You can probably get away with having your xcode-select stub echo "$DEVELOPER_DIR". | 17:54:22 | |
https://github.com/getsentry/sentry-cli/blob/b6d72df9a9f69bd244fc605cc18c8bfd2fd31a56/apple-catalog-parsing/build.rs#L87 should work as written with SDKROOT set. | 17:55:19 | |
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 | |
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 | |
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 | |
* 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 | |
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 | |
In reply to @reckenrode:matrix.orgFWIW I think this is not an issue if you add both swift and swiftpm | 18:14:08 | |
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 | |
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 | |
In reply to @reckenrode:matrix.orgI 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 | |
| * 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 errors | 18:23:50 | |
| am actively on the way to the airport rn but will post the work I did when I get a chance | 18:24:13 | |
| I 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 | |
| https://github.com/NixOS/nixpkgs/pull/452676 | 18:44:09 | |
| running a nixpkgs-review on that now but it looks good to me | 19:06:26 | |
| ugh it needs a linux builder for some reason? | 19:08:28 | |
| nvm then | 19:08:31 | |
| Should I retarget staging? | 19:09:42 | |
| The rebuild count isn’t high, but it rebuilds nixos-tests, which I guess is heavy? | 19:09:57 | |
| that seems reasonable | 19:15:53 | |
| That’s what the tooltip for the label said, so I switched it to staging. | 19:16:09 | |
| here's my work on sentry-cli. it still fails with the following warnings:
followed by a LOT of "unavailable symbol" errors | 19:16:56 | |
| i 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 path | 19:26:05 | |
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 | |
| 20:01:20 | |