-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure: swift #327836
Comments
Also failing in
The interesting part is that I could build this locally in my laptop (macOS 14.5), but it isn't working in GitHub Actions (also macOS 14.5). Here is my logs from GitHub Actions: https://github.com/thiagokokada/nix-configs/actions/runs/9976188278/job/27567744849. |
This also builds on the darwin community builder:
|
Hydra also failed by same errors https://hydra.nixos.org/build/266353277/nixlog/2 |
Hello swift maintainers @dtzWill @trepetti @dduan @Trundle @stephank on the nixpkgs trunk branch, swift-unwrapped is currently failing to build on 3/4 platforms:
two of the above platforms (aarch64-darwin, x86_64-darwin) have been broken for 1.5 months :( can you please take a look? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Just a note on how I workaround this, in case it's helpful for people who reach here. I am able to build my system with the latest unstable with (final: prev: let
pkgsDarwin= import darwin-nixpkgs {inherit (prev) system;};
in
prev.lib.optionalAttrs prev.stdenv.hostPlatform.isDarwin {
inherit (pkgsDarwin) swift;
}) where
in flake.inputs. |
Thanks @yelite for your flakes workaround I don't use flakes myself, so one workaround I'm using for the moment is excluding all packages that pull in To do this:
Here are the commands... I generated a derivation my next rebuild by using
That's my next derivation there on the last line. I turned this next derivation into a dependency tree (i output it to a file so I could browse it a bit easier):
After squinting hard at that file for a bit, it turns out that After excluding the above, the dependency tree of my next generation didn't include |
FWIW Swift is getting fixed as we speak as part of the macOS SDK rework. That’s still a few weeks out from landing in unstable, though. |
The build error occurs when running
|
It’s a SWIG 4 issue; I’m working on it. FWIW the Darwin SDK rework is not going to significantly change a lot of the problems with the Swift derivation. It’s pretty unmaintainable right now. If anyone is strongly invested in Swift, I strongly suggest trying to factor out their LLVM from the core Swift derivations. Right now it spends so much time building its own LLVM and Clang and so on. I don’t know whether the use of their specific LLVM fork is mandatory. If it isn’t, then we should just use the existing packages from Nixpkgs. If it is required, then it should at least be built with the LLVM package machinery we already have in‐tree so that we don’t have to duplicate patches and other complexity. |
(This won’t fix the Darwin problems or Hydra weirdness though.) |
The PR has now been merged and I successfully built Swift on |
Works for me, using commit 418918e from Thanks for fixing this! 🙌 |
Works for me as well on |
Thanks Emily, i hadn't been using swift stuff for a bit and can confirm it fixed the issues I was having on my builds. |
Use known version where swift works from NixOS/nixpkgs#327836 (comment)
Does hydra weirdness mean this? https://hydra.nixos.org/build/272581651/nixlog/1 |
Yes. The hope is that Randy’s SDK rework will make it go away, but I don’t think anyone understands it. It builds successfully locally for everyone, as far as I know. |
I have tried this on macOS 15.0 x86_64 and it builds failed 😭
|
Same failure when bumping devenv-nixpkgs: https://github.com/cachix/devenv/actions/runs/11140734654/job/30961906452?pr=1489#step:7:4516 |
Can someone try building swift on #346043 |
#346947 is the follow up PR for Swift that fixes it to build with the new SDK. |
Unfortunately swift still failed to build on hydra as of current staging-next https://hydra.nixos.org/job/nixpkgs/staging-next/swiftPackages.swift-unwrapped.aarch64-darwin/all I've just noticed that the weird hydra darwin timeouts and the swift build failure happened to begin about the same time, both built fine at 2024-05-21, but failed after that. https://hydra.nixos.org/job/nixpkgs/trunk/SDL_sound.aarch64-darwin/all Are there some configuration changes in hydra around 2024-06 that cause all this? |
I’ve asked in the infrastructure room. Though it seems hard to relate weird linker errors to builds hanging. It kind of looks more like Swift broke during a |
We can close this issue now. |
I'm glad that swift now builds on hydra. However I'm still confused because when I update my flake with unstable nixpkgs channel, my config still needs to build swift from source and can't find a cached binary (in this case swift-5.8 for aarch64-darwin). What am I still missing? |
@shishkin it has only been fixed for 3 days on master: https://hydra.nixos.org/jobset/nixpkgs/trunk#tabs-jobs (filter for |
Thanks @YorikSar! The PR tracker was the missing piece. Extra nice would be for CI pipeline to tag PRs once they reach various channels. |
Swift still built failed after #326588 has been merged.
Steps To Reproduce
Steps to reproduce the behavior:
Build log
Additional context
Add any other context about the problem here.
Notify maintainers
@dtzWill @trepetti @dduan @Trundle @stephank
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: