dotnetCorePackages.dotnet_{8,9}: ensure build can find the Swift overlay#346968
dotnetCorePackages.dotnet_{8,9}: ensure build can find the Swift overlay#346968emilazy merged 1 commit intoNixOS:stagingfrom
Conversation
|
Is this meant to fix builds of the dotnet_8/9 packages, or just a particular use of the SDK? I've been able to build all the SDK tests on darwin, including AOT, so I'm just wondering if there's a way we can get test coverage of the problem. Also, the targets file fix looks like it might also apply to the binary SDKs. Should we perhaps be patching those here: or maybe even in |
822bde5 to
0836925
Compare
ee7fb7e to
183877a
Compare
|
The nixfmt-check errors are for files not in this PR. |
I just tested this again on master, and Should I be testing on the target branch of this PR? |
This is a follow up PR (hence draft) for the Darwin refactor in #346043. It also depends on #346947 to fix the Swift build after the refactor is merged. You probably want to test on the target branch with the Swift PR and this one applied. BackgroundThe Darwin refactor significantly changes how SDKs work in nixpkgs. Instead of having individual frameworks that you need to add, the stdenv has a default SDK (10.12 and 11.3 for x86_64-darwin and aarch64-darwin respectively). The old frameworks have been converted into stubs for evaluation compatibility purposes. The only time you will need to worry about the SDK is when you want to change the default, which you do by adding it as a package. The Darwin SDK provides all frameworks together and propagates certain packages that it builds from source (like libiconv and libresolv). It is also set up to work with xcbuild and provides As a consequence of providing a full SDK, some changes are needed to packages. Swift framework overlays are located at Other Items of InterestThis is one of the few packages that uses darwin.ICU. It has been upgraded to 74221, which is the version shipped in macOS 15 and corresponds roughly to ICU 74.2. It has been refactored to build like the standard, top-level icu package (with all the same dev outputs and dylibs) with a compatibility Going forward, the Darwin source releases will be updated regularly as Apple releases updates. darwin.ICU may be made the default, top-level icu for Darwin in 25.05 (like darwin.libiconv is currently). |
I’m not sure whether it’s needed, but it probably doesn’t hurt to apply it. Is there a good candidate package I can test? |
183877a to
1fd30e4
Compare
383b4bb to
cdf3897
Compare
|
I'm trying it on your branch, but I'm getting: |
|
That’s not good. The linker is crashing building libiconv. Does it happen every time? What architecture? |
|
This is the community darwin builder, This seems to be from Also: |
|
Oh, yeah. That’s a known problem until the bootstrap tools are updated. Someone with root access needs to |
|
I don't have root, unfortunately. Is there a way I can test with the updated bootstrap tools? |
Thanks, but Should I do dotnet_9 and sdk_9_0? |
Yes, sorry, should be |
|
Update: I just saw your comment. I’ll test AOT on the binary 8.0 SDK and do the console test on the source-built 8.0 one. This is what I’m building to test (with $ nix-build --log-format multiline . -A dotnetCorePackages.dotnet_8.sdk.tests.console -A dotnetCorePackages.sdk_8_0.tests.aot -A dotnetCorePackages.dotnet_9.sdk.tests.aot -A dotnetCorePackages.sdk_9_0.tests.aot --keep-going |
cdf3897 to
65f176f
Compare
|
I adapted the replacement to |
a240201 to
4112f1a
Compare
Clang should find the Swift overlay, but clang in nixpkgs does not include any path under `<sysroot>/usr` in its search paths unless that path is added manually as a normal search path (as done here).
65f176f to
8641252
Compare
a1adff0 to
e3f2829
Compare
|
LGTM. Thanks! |
Clang should find the Swift overlay, but clang in nixpkgs does not include any path under
<sysroot>/usrin its search paths unless that path is added manually as a normal search path (as done here).Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.