Commit graph

64 commits

Author SHA1 Message Date
Ahmed ElSayed
1b3d6139b8
Add libx11 to openSUSE build dependencies (#35553)
building on opensuse fails without `libx11-devel`

**Repro:**

```bash
$ cd $(mktemp -d)
$ git clone https://github.com/zed-industries/zed .
$ docker run --rm -it -v $(pwd):/zed -w /zed opensuse/tumbleweed

(opensuse) $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(opensuse) $ ./script/linux
(opensuse) $ cargo build --release
```

**Expected:** to work

**Actual:** 

```
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/x11-2.21.0/build.rs:42:14:
  called `Result::unwrap()` on an `Err` value:
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags x11 'x11 >= 1.4.99.1'

  The system library `x11` required by crate `x11` was not found.
  The file `x11.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `x11.pc`.

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```
2025-08-04 06:17:42 +00:00
Ben Kunkle
cbb6c221b3
Remove netcat dependency (#28920)
Closes #28813
Closes #27749

Release Notes:

- Removed the need to have openbsd `netcat` (`nc`) installed on your
system in order to enter passwords for `git` or `ssh` (remote
development). If you previously installed `netcat` specifically for Zed,
you may uninstall it.
2025-04-16 19:46:36 -04:00
Michael Sloan
8cfb9beb17
Reapply support for X11 screenshare (#28160)
Reapplies #27807 after [revert due to not building on
ARM](https://github.com/zed-industries/zed/pull/28141) by updating scap
to include [a fix to its build on
ARM](08f0a01417)

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-04-06 11:25:29 -06:00
Michael Sloan
c1259c136e
Revert "Use scap library to implement screensharing on X11 (#27807)" (#28141)
This reverts commit c2afc2271b.

Build on ARM if failing, likely because `c_char` is `u8` on arm and `i8`
on x86:

```
error[E0308]: mismatched types
   --> /home/runner/.cargo/git/checkouts/scap-40ad33e1dd47aaea/5715067/src/targets/linux/mod.rs:75:74
    |
75  |     let result = unsafe { XmbTextPropertyToTextList(display, &mut xname, &mut list, &mut count) };
    |                           -------------------------                      ^^^^^^^^^ expected `*mut *mut *mut u8`, found `&mut *mut *mut i8`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note:    expected raw pointer `*mut *mut *mut u8`
            found mutable reference `&mut *mut *mut i8`
note: function defined here
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/x11-2.21.0/src/xlib.rs:552:10
    |
552 |   pub fn XmbTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int,
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
```

Release Notes:

- N/A
2025-04-05 06:01:27 +00:00
Michael Sloan
c2afc2271b
Use scap library to implement screensharing on X11 (#27807)
While `scap` does have support for Wayland and Windows, but haven't seen
screensharing work properly there yet. So for now just adding support
for X11 screensharing.

WIP branches for enabling wayland and windows support:

* https://github.com/zed-industries/zed/tree/wayland-screenshare
* https://github.com/zed-industries/zed/tree/windows-screenshare


Release Notes:

- Added support for screensharing on X11 (Linux)

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Junkui Zhang <364772080@qq.com>
2025-04-04 21:31:03 +00:00
Conrad Irwin
9114ca973c
Revert "Revert "Upgrade to rustls v0.23.22" (#24197)" (#24210)
try to reland rustls without breaking linux arm builders

See: 
- #24197
- #24138

Release Notes:

- N/A
2025-02-05 14:24:21 -07:00
Mikhail Filippov
614eaec278
Add mold dependency to fix build on Ubuntu 24.10 (#23230)
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-01-16 13:43:47 -05:00
Hossein Khosravi
8c253af451
linux: Fix regex patterns for detecting Fedora in script/linux (#22611)
In `script/linux` file, in order to install build dependencies we check
ID and VERSION_ID fields of `/etc/os-release` file for installing
os-specific packages. The regex patterns for those fields are wrong
because there's no `"` character after `ID=` or `VERSION_ID=`. This
causes `grep` to fail.
So I extended the pattern by adding `"?` after each `"` character to
bypass the cause of failure.

Release Notes:

- N/A

Signed-off-by: thehxdev <hossein.khosravi.ce@gmail.com>
2025-01-03 16:28:07 +00:00
Connor Tsui
62a6a755ec
Add musl package for Arch Linux (#21830)
It seems like `musl` is required to build on Arch Linux, but it is not included in the dependencies list.
2024-12-10 21:05:53 -05:00
Peter Tripp
165d50ff5b
Add openbsd netcat to script/linux (#21478)
- Follow-up to: https://github.com/zed-industries/zed/pull/20751

openbsd-netcat is required for interactive SSH Remoting prompts
(password, passphrase, 2fa, etc).
2024-12-03 15:27:12 -05:00
Agustin Gomes
c2cd84a749
Add musl-gcc as dependency (#21366)
This addition comes after attempting building Zed from source.

As part of the process, one of the components (a crate I presume) called
`ring` failed to compile due to the following sequence of console
messages:

```log
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?

error: failed to run custom build command for `ring v0.17.8`
```

Adding this library should help fix the issue on Fedora 41 at least, and
possibly will help fixing it for other RedHat based distributions as
well.

Closes #ISSUE

Release Notes:

- Add musl-gcc as dependency

Signed-off-by: Agustin Gomes <me@agustingomes.com>
2024-11-30 13:20:31 -08:00
Lars Diederich
eca3424cb5
Update openSUSE dependencies to build on fresh Tumbleweed installation (#20298) 2024-11-06 11:05:13 -05:00
Patrick Decat
c2cf4c45c0
Fix path to install-mold script in linux script (#20286)
Release Notes:

- N/A
2024-11-06 12:18:31 +02:00
Conrad Irwin
a9f48bd9d1
Try to build with musl on CI (#19571)
- Closes #19092 
- Closes #15411

Release Notes:

- SSH Remoting: Build with musl (adds support for machines with old, or
no glibc)
2024-10-22 16:00:00 -06:00
Peter Tripp
3cbaa08d89
Fix script/linux for Linux Mint (#19096)
- Closes: https://github.com/zed-industries/zed/issues/18827

Release Notes:

- N/A
2024-10-11 16:29:35 -04:00
Agustin Gomes
59f0f4ac42
Fix script/linux on RHEL/Fedora (#18788)
- Add missing `/etc/os-release` from a grep call
- Remove typo `grep grep` from another.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-10-06 14:47:48 -04:00
Peter Tripp
3010dfe038
Support More Linux (#18480)
- Add `script/build-docker`
- Add `script/install-cmake`
- Add `script/install-mold`
- Improve `script/linux` 
  - Add missing dependencies: `jq`, `git`, `tar`, `gzip` as required.
  - Add check for mold
  - Fix Redhat 8.x derivatives (RHEL, Centos, Almalinux, Rocky, Oracle, Amazon)
  - Fix perl libs to be Fedora only
  - Install the best `libstdc++` available on apt distros
  - ArchLinux: run `pacman -Syu` to update repos before installing. 
  - Should work on Raspbian (untested) 

This make it possible to test builds on other distros using docker:
```
./script/build-docker amazonlinux:2023
```
2024-09-30 17:46:21 -04:00
Peter Tripp
432de00e89
ci: Use BuildJet Ubuntu 20.04 runners for better glibc compatibility (#18442)
Use BuildJet Ubuntu 20.04 runners.
- Linux arm64 unchanged (glibc >= 2.35)
- Linux x64 glibc requirement becomes to >= 2.31 (from glibc >= 2.35).

Note: Ubuntu 20.04 repo cmake (3.16.3) is normally too old to build Zed, but `ubuntu-2004` [includes cmake
3.30.3](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md#tools).
2024-09-30 17:02:19 -04:00
Peter Tripp
30ef7e62bf
Fix arm buildjet (#18023)
Run `apt-get update` before `apt-get install` on Linux. Hopefully will fix building on Linux Arm.
2024-09-18 14:28:00 -04:00
Richard Feldman
e6c4076ef0
Add cmake to dev build instructions (#17943)
Release Notes:

- N/A
2024-09-17 14:07:50 -04:00
Bai
4441150809
Add missing Void Linux dependencies (#17827)
Release Notes:

- N/A
2024-09-16 18:46:49 -06:00
Aditya Kumar
45d4de75b3
Add jq as a dependency for Linux script for Arch Linux (#13569)
## Error
```sh
./script/install-linux 

+ [[ 0 -gt 0 ]]
+ export ZED_CHANNEL=dev
+ ZED_CHANNEL=dev
++ pwd
+ export 'ZED_UPDATE_EXPLANATION=You need to fetch and rebuild zed in /home/adityakrcodes/repos/zed'
+ ZED_UPDATE_EXPLANATION='You need to fetch and rebuild zed in /home/adityakrcodes/repos/zed'
+ script/bundle-linux
+ getopts h flag
+ export ZED_BUNDLE=true
+ ZED_BUNDLE=true
+ channel=dev
++ script/get-crate-version zed
script/get-crate-version: line 16: jq: command not found <-- ERROR
+ version=
```
The script fails to install zed on Arch Linux due to a missing
dependency, `jq`.
## My machine info
OS: Arch Linux
Kernel: 6.6.34-1-lts 
WM: dwm 
Terminal: kitty
CPU: Ryzen 5 5500U with Radeon Graphics
GPU: AMD ATI 04:00.0 Lucienne 
Memory: 16 GB

## Error Description
The error occurs when running the script in `script/install-linux`,
which is unable to find the `jq` package, which is not installed by
default on the machine.
## Solution
To resolve this issue, you can install `jq` independently by running
`sudo pacman -S jq`. Alternatively, I have updated script `script/linux`
to include `jq` as a dependency ([link to the
commit](2349ad111f)),
ensuring it is installed automatically when running the initial script
for system libraries.

Release Notes:

- N/A
2024-06-27 09:58:53 -06:00
Conrad Irwin
fe7d53cb96
Dynamicer builds (#13074)
Fixes https://github.com/zed-industries/zed/issues/13073

Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-21 16:32:32 -07:00
Winston Hoy
068b1c235c
Add elfutils dep for Debian (#13023)
Release Notes:

- Fixed https://github.com/zed-industries/zed/issues/13021
2024-06-13 20:05:58 -06:00
Philip Schatz
ce51c264a6
Add libstdc++-12-dev for linux (#12962)
Release Notes:

- N/A

PS: 👋 Congrats on the release 🎊 and hey from
discussing CRDTs at the [GitPod/DevX conference last
year](https://www.youtube.com/watch?v=wXT73bBr83s)! Just read the [blog
post](https://zed.dev/blog/zed-decoded-linux-when) and thought I'd
finally try zed out (I have a linux laptop). This was the only snag I
ran into 👏
2024-06-13 12:39:58 -07:00
DocKDE
3c0310273b
Add missing Linux build dependencies (#12972)
I found that builds failed on Arch and OpenSUSE so I added missing
dependencies. I also found that OpenSUSE Leap is currently not able to
install the required dependencies so I added a check to limit the
supported distros to Tumbleweed.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-13 10:45:39 -07:00
Joel Tony
a35947c883
Add dependencies for Ubuntu/Debian (#12959)
Release Notes:

- Fixed #12890
2024-06-13 08:36:18 -06:00
Subodh Upreti
cfbf5dca7a
Add mold package for opensuse, arch, void and gentoo (#12964)
Release Notes:

- N/A
2024-06-13 10:47:37 +03:00
Conrad Irwin
ec086945fc
Use clang+mold on linux (#12944)
Takes a clean build on my machine from 222s to 185s

Release Notes:

- N/A
2024-06-12 15:16:05 -06:00
DocKDE
7f56f4e78e
Add libgit2 build dependency to Arch-based distros (#12924)
Release Notes:

- N/A
2024-06-12 14:16:27 -06:00
Conrad Irwin
89641acf2f
Fix ordering of keyboard shortcuts so that you can use AI on linux (#12714)
Release Notes:

- N/A
2024-06-05 21:58:37 -06:00
派卡 (pi-cla)
74c972fa37
Fix openSUSE Vulkan package name (#12301)
Release Notes:

- N/A
2024-05-26 17:14:09 -07:00
yodatak
719e6e9777
linux: Add more missing dependencies on Fedora (#11868)
see https://docs.rs/openssl/latest/openssl/

Release Notes:

- N/A
2024-05-17 10:38:16 -07:00
yodatak
1c62839295
Add missing linux dependencies for compiling openssl on Fedora (#11857)
Release Notes:

- N/A
2024-05-15 11:17:59 -06:00
Marshall Bowers
b34ab6f3a1
Remove references to submodules (#11673)
This PR removes the references to initializing Git submodules as part of
building Zed.

These are no longer needed, as our only submodule was removed in #11672.

Release Notes:

- N/A
2024-05-10 14:33:53 -04:00
Kirill Bulatov
bca639bda9
Use larger runners for Linux CI steps (#11574)
To speed up Linux CI builds, use a set of self-hosted Linux machines and
use them to run all slow CI steps for Linux: "tests", bundling and
nightly builds.

Also adds a set of dev icons as Linux bundling script required them for
`run-bundling`-tagged builds from regular PRs.
Same icons as for Preview were used, but, ideally, something different
could be created.

Release Notes:

- N/A
2024-05-10 00:44:31 +03:00
Martin Ashby
fd3831861b
Add pkgconf to arch linux required dependencies (#11449)
It's needed to build openssl crate

Fixes: #11448

Release Notes:

- N/A
2024-05-06 13:21:54 -07:00
Mikayla Maki
f99b24acca
Update linux script
Added the git submodule initialization to the linux dependency script
2024-05-06 09:56:56 -07:00
Conrad Irwin
28bcc95468
installer (#11229)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-04-30 16:01:07 -06:00
shimataro
ce643e6bef
Add Gentoo support to Linux dependency script (#11141)
This PR adds dependencies for Gentoo Linux.

Release Notes:

- N/A
2024-04-29 16:08:22 -07:00
Max Linke
e9a965fe81
Add missing linux dependencies (#10814)
At least one of the dependencies requires cmake to configure the build
process.

On ubuntu libgit2-dev was missing. Debian and derivates do not install
development headers by default.



Release Notes:

- Improved Linux development setup scripts.

Co-authored-by: Max Linke <max.linke88@gmail.com>
2024-04-22 12:05:12 -07:00
Jakob Grønhaug
7bba9da281
Fix dependency install script on RHEL derivatives (#9684)
Added a check to `script/linux` so the script does not try to enable CSB
or add EPEL if the user is on Fedora, which does not need these steps.
The script now runs nicely on Fedora! :)

Release Notes:

- N/A
2024-03-25 11:14:11 -07:00
Conrad Irwin
ac4c6c60f1
Make it (a tiny bit) easier to run your own collab (#9557)
* Allow creating channels when seeding
* Allow configuring a custom `SEED_PATH`
* Seed the database when creating/migrating it so you don't need a
  separate step for this.

Release Notes:

- N/A
2024-03-20 21:00:02 -06:00
Nathan Sobo
8ae5a3b61a
Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367)
Co-authored-by: Antonio <antonio@zed.dev>

Resurrected this from some assistant work I did in Spring of 2023.
- [x] Resurrect streaming responses
- [x] Use streaming responses to enable AI via Zed's servers by default
(but preserve API key option for now)
- [x] Simplify protobuf
- [x] Proxy to OpenAI on zed.dev
- [x] Proxy to Gemini on zed.dev
- [x] Improve UX for switching between openAI and google models
- We current disallow cycling when setting a custom model, but we need a
better solution to keep OpenAI models available while testing the google
ones
- [x] Show remaining tokens correctly for Google models
- [x] Remove semantic index
- [x] Delete `ai` crate
- [x] Cloud front so we can ban abuse
- [x] Rate-limiting
- [x] Fix panic when using inline assistant
- [x] Double check the upgraded `AssistantSettings` are
backwards-compatible
- [x] Add hosted LLM interaction behind a `language-models` feature
flag.

Release Notes:

- We are temporarily removing the semantic index in order to redesign it
from scratch.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-03-19 19:22:26 +01:00
Mart Zielman
0be20d0817
fix: vulkan dependencies in script/linux (#9116)
Just a quick pull request and a small fix, someone reported a dependency
was erroring for him, so I decided to open a small pull request. On top
of that, any `devel` header is not needed because Vulkan is only a
runtime dependency.

Release Notes:

- Fixed names of Vulkan dependencies that didn't exist
2024-03-11 08:29:06 -07:00
Bing Wang
35c7b5d7dd
Add vulkan linux dependency (#8932)
Release Notes:

- Fixed ([#8934](https://github.com/zed-industries/zed/issues/8934)).

Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.

**or**

- N/A

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2024-03-07 15:40:27 -08:00
Owen Law
a25edcc5a8
Add libxcb-devel build dep to void linux script (#8872)
Added missing libxcb-devel to build dependency script for void-linux.
2024-03-05 09:16:08 -08:00
feelamee
1442fcb497
Add doas support in script/linux (#8788)
Release Notes:
- n/a
2024-03-03 13:44:39 -08:00
feelamee
49f378ead3
Fix name of zstd package in Arch Linux repos (#8789)
Fixed name of [zstd](https://archlinux.org/packages/core/x86_64/zstd/)
package in Arch Linux repos in script for installing deps, required for
building Zed on linux

Release Notes:

- N/A
2024-03-03 13:26:09 -08:00
aryal
37ffa86043
Add libzstd to script/linux (#8780)
add a missing dependency to linux script
2024-03-03 11:21:36 -08:00