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: zed-editor #320084

Open
tqwewe opened this issue Jun 15, 2024 · 6 comments · Fixed by #329653
Open

Build failure: zed-editor #320084

tqwewe opened this issue Jun 15, 2024 · 6 comments · Fixed by #329653
Labels
0.kind: build failure 6.topic: darwin Running or building packages on Darwin

Comments

@tqwewe
Copy link

tqwewe commented Jun 15, 2024

Steps To Reproduce

Zed-editor fails to build for MaxOS Intel using NIXPKGS_ALLOW_BROKEN=1 nix-shell -p zed-editor -I nixpkgs=channel:nixos-unstable

Build log

  ...
  cargo:rerun-if-changed=/nix/store/xz8j1amvgwas4nbfqgpmcz147pkd391s-apple-framework-VideoToolbox/Library/Frameworks/VideoToolbox.framework/Headers/VTBase.h
  cargo:rerun-if-changed=/nix/store/wahwaqbn6f57ybai7akc5920vrln9s2j-apple-framework-CoreFoundation/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
  cargo:rerun-if-changed=/nix/store/xz8j1amvgwas4nbfqgpmcz147pkd391s-apple-framework-VideoToolbox/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h

  --- stderr
  thread 'main' panicked at /private/tmp/nix-build-zed-0.137.6.drv-0/cargo-vendor-dir/bindgen-0.65.1/ir/ty.rs:1074:22:
  Not able to resolve array element?: Continue
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: builder for '/nix/store/dv6kd8ljw54aw4j728cy97mqg0jxlv6y-zed-0.137.6.drv' failed with exit code 101;
       last 10 log lines:
       >   cargo:rerun-if-changed=/nix/store/a5swqw43q2yahpawgwbrsgildzqni5n1-apple-framework-CoreMedia/Library/Frameworks/CoreMedia.framework/Headers/CMBase.h
       >   cargo:rerun-if-changed=/nix/store/xz8j1amvgwas4nbfqgpmcz147pkd391s-apple-framework-VideoToolbox/Library/Frameworks/VideoToolbox.framework/Headers/VTBase.h
       >   cargo:rerun-if-changed=/nix/store/wahwaqbn6f57ybai7akc5920vrln9s2j-apple-framework-CoreFoundation/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
       >   cargo:rerun-if-changed=/nix/store/xz8j1amvgwas4nbfqgpmcz147pkd391s-apple-framework-VideoToolbox/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h
       >
       >   --- stderr
       >   thread 'main' panicked at /private/tmp/nix-build-zed-0.137.6.drv-0/cargo-vendor-dir/bindgen-0.65.1/ir/ty.rs:1074:22:
       >   Not able to resolve array element?: Continue
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run 'nix log /nix/store/dv6kd8ljw54aw4j728cy97mqg0jxlv6y-zed-0.137.6.drv'.

Additional context

Add any other context about the problem here.

Notify maintainers

@GaetanLepage

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 23.5.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.2`
 - channels(ari): `"darwin"`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@t4ccer t4ccer added the 6.topic: darwin Running or building packages on Darwin label Jun 15, 2024
@matteo-pacini
Copy link
Contributor

More about the build error here: #303233 (comment)

The Swift package is in crates/live_kit_client/LiveKitBridge - perhaps removing xcrun and adding swift swiftpm to the build inputs may fix this.
Another possibility is to integrate swiftpm2nix.

@GaetanLepage
Copy link
Contributor

More information regarding darwin: #317564 (review)

@niklaskorz
Copy link
Contributor

Building the Swift package will soon become unnecessary, as mentioned in my comment referenced by Gaétan. Unfortunately we'll have to wait for #229210 as Livekit depends on ScreenCaptureKit on macOS.

mrnugget pushed a commit to zed-industries/zed that referenced this issue Jul 9, 2024
This PR adds a Nix/NixOS development-shell (`shell.nix`), which is based
on the upstream
[nixpkgs](https://github.com/NixOS/nixpkgs/blob/c5d4d458115263ec3ee0efd974e6aeb2f787a0ed/pkgs/by-name/ze/zed-editor/package.nix),
as well as its corresponding `flake.nix` file.

To use it, run either the `nix-shell` command (uses the `shell.nix`
file), or the newer but experimental `nix develop` command (uses
`flake.nix`)

~~This has not been tested on macOS, tho preliminary code is there to
try and support it, feel free to report any issues.~~ Zed unfortunately
doesn't build on nix-darwin (see
NixOS/nixpkgs#320084), so this PR doesn't aim
to add darwin support.

---

Release Notes:

- N/A

---------

Signed-off-by: xtrm <oss@xtrm.me>
Co-authored-by: Niklas Korz <niklas@niklaskorz.de>
@jvmncs
Copy link

jvmncs commented Jul 23, 2024

Looks like #326406 merged early support for apple_sdks 12.3 -- would that resolve the blocker you mentioned @niklaskorz?

@niklaskorz
Copy link
Contributor

niklaskorz commented Jul 24, 2024

Looks like #326406 merged early support for apple_sdks 12.3 -- would that resolve the blocker you mentioned @niklaskorz?

Draft PR is available at #329653 but is blocked until zed-industries/zed#13343 is merged and released. As the draft is based on that PR branch, it however already builds and runs:

$ nix build "github:nixos/nixpkgs?ref=pull/329653/head#zed-editor"
$ result/bin/zed
grafik

Edit: now correctly produces an app bundle, and the CLI also works now

@niklaskorz
Copy link
Contributor

#329653 is now ready for review, fixing the latest Zed release on macOS. Livekit (and thus collaboration features) remains disabled on both macOS and Linux until zed-industries/zed#13343 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants