-
-
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-5.8 #320900
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/having-issues-with-swift-5-8-build/46871/2 |
Could it be marked as broken in the meantime to avoid useless work for the builders from attempting at building it ? |
Turns out the problem was with clang, using the locally built clang instead of nixpkgs's works for Darwin at least. However, this isn't ideal as it was building just fine before a certain change, i can't pinpoint. I suspect it was merged in #316075 You can test it out by simply exporting the CC and CXX, prior to building Swift to target the locally built clang. I can't dedicate enough time to this, if each time I try to test a change I have to build llvm which takes 15-25 minutes on my machine. cc @stephank |
On my machine
and then the following crash report is generated: Report
The stacktrace:
suggests that the issue happens during library initialisation, probably at first memory allocation. Also note that the code that triggers this was removed in Swift 5.10 with swiftlang/swift#67395 |
Stupid question - but is there any workaround for this issue right now? As a Nix newbie - this is stopping me from making any changes to my Nix configuration (on my macOS machine), or installing any new packages. But I'm assuming for somebody familiar with Nix, there may be some temporary workaround, or way to get their box going? (e.g. reverting to an older version?) |
I don't have the exact commit, so I can't say for unstable. However, it seems to work on 24.05. So probably that is your bet. |
Hmm, I'm using flakes, via this template. I believe it's set to use unstable packages, via this line: https://github.com/dustinlyons/nixos-config/blob/main/flake.nix#L4 Is there some way to revert just the swift package from 24.05 - if you think that might fix this issue? |
Is there any particular reason you need to be on You can change that line from this: nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; To this: nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; To change everything to If you just want to switch just nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable"; And then you can change the
|
cc @NixOS/darwin-maintainers, as suggested on the Nix macOS matrix channel. Given it's not an issue solvable by the Swift maintainer alone. |
A fix to the clang linking issues landed on main unknowingly, therefore the initial error is no longer an issue. However, two more errors arose right after. The codesigning one mentioned by @YorikSar, and building it with latest nixpkgs-unstable will error with an unsupported flag being passed. @reckenrode's ld64 upgrades (#307880) fixes the codesigning errors, and he also suggested passing Once #307880 lands on master (soon), passing |
It builds sure, but try using it. You should run into similar issues as above
|
Do you have more exact steps? For example, this (in an empty dir) seems to work for me:
I can also run I only have access to the darwin community builder, so that's what I'm testing on. |
I'm genuinely so confused, errors are disappearing and appearing 😭. I'm going to try building it off your PR, see if it works. |
Built swift off your branch and used it, it works just fine now 🎉. for anyone that runs into that codesign issue can either try to rebuild it again or wait for the ld64 upgrade PR. Given it is unknown what causes it to fail. We can close this issue after #326588 is merged, thanks @reckenrode, @emilazy, and @corngood. |
I applied the patch for #326588 and was able to build swift and therefore dockutil, so just wanted to add my voice to say this works for me :D Thank you for the fix! |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-debug-nix-cache-misses/49151/4 |
Hello swift-unwrapped maintainers @dduan @stephank @trepetti @Trundle on the nixpkgs staging-next branch, swift-unwrapped is currently failing to build on 3/4 platforms:
two of those platforms haven't had a successful build in almost 2 months :( can you please take a look? |
EDIT: Probably better to just move to a newer issue that was opened 2 weeks ago: |
Sure, I'll put my comment there |
Note
The issue's fix has been identified and will be solved soon see #320900 (comment)
Steps To Reproduce
nix build github:nixos/nixpkgs/nixpkgs-unstable#swift
Build log
https://hydra.nixos.org/build/262150427/nixlog/3
References: #316075 (comment)
Related: #319270 nix-community/home-manager#5550
@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: