Skip to content
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 (now zig) #353261

Closed
i11010520 opened this issue Nov 3, 2024 · 7 comments
Closed

Build failure: swift (now zig) #353261

i11010520 opened this issue Nov 3, 2024 · 7 comments
Labels
0.kind: build failure A package fails to build 6.topic: swift Programming language (swift.org)

Comments

@i11010520
Copy link

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix registry list: global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable
  2. nix flake update
  3. home-manager switch

Build log

[1/34/66 built, 266 copied (4012.8 MiB), 648.1 MiB DL] building swift-5.8 (buildPhase): clang-15: warning: overriding '-mmacos-ver
error: builder for '/nix/store/lwkj9z9rfs2c6zgz20ig0s3wh0h6k6jr-Yams.drv' failed with exit code 1;
       last 25 log lines:
       >
       >     "/nix/store/m4hcy0jmhdn74biq6nzn0p489yc8ix0s-swift-wrapper-5.8/bin/swiftc"
       >
       >   is not able to compile a simple test program.
       >
       >
       >   It fails with the following output:
       >
       >     Change Dir: '/tmp/nix-build-Yams.drv-0/Yams-f47ba48/_build/CMakeFiles/CMakeScratch/TryCompile-vtDYS6'
       >
       >     Run Build Command(s): /nix/store/376q3c4b1y8s6fnyk4q9vl96pqcfs9zh-ninja-1.12.1/bin/ninja -v cmTC_a4a84
       >     [1/2] /nix/store/m4hcy0jmhdn74biq6nzn0p489yc8ix0s-swift-wrapper-5.8/bin/swiftc -j 8 -num-threads 8 -c  -module-name cm
TC_a4a84 -incremental -output-file-map CMakeFiles/cmTC_a4a84.dir//output-file-map.json  /tmp/nix-build-Yams.drv-0/Yams-f47ba48/_bui
ld/CMakeFiles/CMakeScratch/TryCompile-vtDYS6/main.swift
       >     FAILED: CMakeFiles/cmTC_a4a84.dir/main.swift.o
       >     /nix/store/m4hcy0jmhdn74biq6nzn0p489yc8ix0s-swift-wrapper-5.8/bin/swiftc -j 8 -num-threads 8 -c  -module-name cmTC_a4a
84 -incremental -output-file-map CMakeFiles/cmTC_a4a84.dir//output-file-map.json  /tmp/nix-build-Yams.drv-0/Yams-f47ba48/_build/CMa
keFiles/CMakeScratch/TryCompile-vtDYS6/main.swift
       >     ninja: build stopped: subcommand failed.
       >
       >
       >
       >
       >
       >   CMake will not be able to correctly generate this project.
       > Call Stack (most recent call first):
       >   CMakeLists.txt:6 (project)
       >
       > 
       > -- Configuring incomplete, errors occurred!
       For full logs, run 'nix-store -l /nix/store/lwkj9z9rfs2c6zgz20ig0s3wh0h6k6jr-Yams.drv'.
error: 1 dependencies of derivation '/nix/store/wawzq23glmxa82cmxdk0fsm42cmn6cca-swift-driver.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cv57wvwlc9qxzv4ybyn4hfc0mfxdjh5i-swiftpm-bootstrap-5.8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fpmadmhla08a82608f7sgswkhpcryrry-swiftpm-5.8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yfa6hk0pxhi0pvi5hshln1rin5rh8zy7-swift-driver-5.8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/d73j9hlv1rxlihah9nlj206ms2nqakg7-xcodes-1.5.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7020lcv7jvg0x2h3jh65pjn5y41g2rxi-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hx47hihip4cs5v2ni9qcjhpylwr4w1ir-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fsd9dwyzn7nsrhwdprgw3vzkkhwq7x7s-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5a929ijqp22vr8yg621n5169zz09kap4-home-manager-generation.drv' failed to build

Additional context

Add any other context about the problem here.

Notify maintainers

@dduan @stephank @trepetti ...
(from search.nixos.org)

Metadata

❯ nix-shell -p nix-info --run "nix-info -m"
error:
       … while calling the 'import' builtin
         at «string»:1:18:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) 
]; } ""
             |                  ^

       … while realising the context of a path

       … while calling the 'findFile' builtin
         at «string»:1:25:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) 
]; } ""
             |                         ^

       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)


Add a 👍 reaction to issues you find important.

@i11010520 i11010520 added the 0.kind: build failure A package fails to build label Nov 3, 2024
@emilazy
Copy link
Member

emilazy commented Nov 3, 2024

I think this was already fixed (and the channel just hasn’t updated yet), though the perennial problem of the past few months of Swift not building on Hydra for unclear reasons is still present.

@i11010520
Copy link
Author

I think this was already fixed (and the channel just hasn’t updated yet), though the perennial problem of the past few months of Swift not building on Hydra for unclear reasons is still present.

What a pity.
I could build regularly not so long ago.

@i11010520
Copy link
Author

i11010520 commented Nov 6, 2024

├───home-manager: github:nix-community/home-manager/2f607e07f3ac7e53541120536708e824acccfaa8?narHash=sha256-0kZL4m%2BbKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc%3D (2024-11-05 20:18:50)
│   └───nixpkgs follows input 'nixpkgs'
├───nixpkgs: github:NixOS/nixpkgs/8c4dc69b9732f6bbe826b5fbb32184987520ff26?narHash=sha256-2S0HwIFRxYp%2BafuoFORcZA9TjryAf512GmE0MTf
EOPU%3D (2024-11-05 18:23:38)

after some updates, swift build pass, but zig failed:

❯ home-manager switch 
error: builder for '/nix/store/6pjsgwpc0s3mndk3fp96mkya2vbna9s2-zig-0.13.0.drv' failed with exit code 2;
       last 25 log lines:
       >     note: tried /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX
11.3.sdk/usr/lib/system/libsystem_symptoms.dylib
       > error: unable to resolve dependency
       >     note: while resolving /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX11.3.sdk/usr/lib/system/libsystem_trace.dylib
       >     note: a dependency of /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd
       >     note: tried /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX
11.3.sdk//nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib
/system/libsystem_trace.tbd
       >     note: tried /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX
11.3.sdk//nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib
/system/libsystem_trace.dylib
       >     note: tried /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX
11.3.sdk//nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib
/system/libsystem_trace
       >     note: tried /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX
11.3.sdk/usr/lib/system/libsystem_trace.dylib
       > error: unable to resolve dependency
       >     note: while resolving /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX11.3.sdk/usr/lib/system/libunwind.dylib
       >     note: a dependency of /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX11.3.sdk/usr/lib/system/libunwind.dylib
       >     note: a dependency of /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX11.3.sdk/usr/lib/libSystem.tbd

@mirkolenz
Copy link
Member

@emilazy With the recent changes, I was able to compile swift locally without any issues! Trying to use swiftc in a derivation however leads to the following error (on x86_64-darwin):

/nix/store/d2jm2gdf5qmyfbqk579f7h65sbi497sr-clang-wrapper-16.0.6/resource-root/include/emmintrin.h:47:9: error: __bf16 is not supported on this target

Should I open a new issue for this error or is this to be expected currently? BWT: Thanks for all the great work that went into the new Apple SDK pattern 😄

@i11010520 i11010520 changed the title Build failure: swift Build failure: swift (now zig) Nov 6, 2024
@emilazy
Copy link
Member

emilazy commented Nov 7, 2024

Zig is fixed by #353383, which should land in the next staging cycle (next few weeks).

I’m not sure about that error, @mirkolenz; I wonder if it might be a deployment target version thing or some wrapper issue. Could you open a new issue for it?

@mirkolenz
Copy link
Member

@emilazy Thanks for the feedback, I just opened a new issue with more details: #354160

Any help is appreciated 😄

@tomodachi94 tomodachi94 added the 6.topic: swift Programming language (swift.org) label Nov 7, 2024
@i11010520
Copy link
Author

Zig is fixed by #353383, which should land in the next staging cycle (next few weeks).

@emilazy Thanks! Expect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 6.topic: swift Programming language (swift.org)
Projects
None yet
Development

No branches or pull requests

4 participants