fails to build from source on nixos #32282
Closed
andrewrk
started this conversation in
Zed Packaging and Platform Support
Replies: 1 comment 2 replies
-
Sorry I missed this issue, did you try using the nix shell provided in our repo? on the latest HEAD ( |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
On NixOS 25.05.803471.4792576cb003 (Warbler), which is the latest stable version released on May 23 2025, Zed fails to build from source without workarounds.
I actually did get it built successfully, but then it crashed at runtime. I was able to work around those crashes as well, resulting in a viable binary.
I'm using KDE Plasma version 6.3.5, which uses Wayland (but supports the X11 protocol just fine).
To reproduce the issue, start with this:
Where
zed.nix
contains:Next, run
cargo build --release
.The first problem is:
Somehow this produced a binary with missing rpaths:
Even though
zstd
is available and reported bypkg-config
:I suspect this is due to hard-coding a dependency on
mold
and not relying on standard system linking.I worked around this by using
patchelf
:After continuing the build, a
zed
binary is produced. However it has a similar problem:Again these problems can be worked around with
patchelf
:Next we hit this problem, with the
zed
binary crashing at runtime:This is unexpected because the wayland library is indeed available, configured, in the appropriate paths, etc.
With the additional workaround of
WAYLAND_DISPLAY=""
, we get to the next problem:Again, can be worked around by adding another rpath to the binary:
Finally, we get a viable binary.
Zed Version and System Specs
46773eb
Beta Was this translation helpful? Give feedback.
All reactions