zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.55k stars 3.04k forks source link

Build fails on release 0.140.5 because of missing clang #13279

Closed SpidFightFR closed 4 months ago

SpidFightFR commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

cannot compile zed because of missing clang among the build steps:

   Compiling proc-macro2 v1.0.81
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.202
   Compiling libc v0.2.153
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling once_cell v1.19.0
   Compiling typeid v1.0.0
   Compiling version_check v0.9.4
   Compiling itoa v1.0.11
   Compiling pin-project-lite v0.2.13
   Compiling memchr v2.7.2
   Compiling pkg-config v0.3.27
   Compiling crunchy v0.2.2
   Compiling tiny-keccak v2.0.2
error: linker `clang` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `serde` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `tiny-keccak` (build script) due to 1 previous error
error: could not compile `proc-macro2` (build script) due to 1 previous error
error: could not compile `crunchy` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error

Adding clang 15 or 17 manually (via a package manager) solves this error but adds another one later on.

Environment

Linux distribution: Void-Linux 6.9.5_1 Cargo version: 1.78.0
Rust version: 1.78.0 Zed version: 0.140.5

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log


Calandracas606 commented 4 months ago

(note: i am the llvm maintainer for void)

What "clang" package are you adding to the build? you should try llvm17-devel

Providing the full error log of what happens AFTER adding clang would be helpful

SpidFightFR commented 4 months ago

llvm17-devel

i'm trying that right away. I'll keep you in touch !

As for the log, i didn't save the one that happened after adding clang. I'll post it here if it happens again.

juliobonon commented 4 months ago

hey @SpidFightFR the following solved for me:

sudo apt install clang mold lld llvm