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.71k stars 3.06k forks source link

Ubuntu 20.04 can't build Zed #12100

Closed tictac22 closed 5 months ago

tictac22 commented 5 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

On the ubuntu 20, I can't build zed. I am getting the error:

cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.66s
     Running `target/debug/Zed`
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: NotSupportedError" at crates/gpui/src/platform/linux/x11/window.rs:347:14
   0: Zed::reliability::init_panic_hook::{closure#0}
             at crates/zed/src/reliability.rs:54:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/boxed.rs:2034:9
      std::panicking::rust_panic_with_hook
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/result.rs:1654:5
   7: <core::result::Result<blade_graphics::hal::Context, blade_graphics::NotSupportedError>>::unwrap
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/result.rs:1077:23
      <gpui::platform::linux::x11::window::X11WindowState>::new
             at crates/gpui/src/platform/linux/x11/window.rs:337:13
   8: <gpui::platform::linux::x11::window::X11Window>::new
             at crates/gpui/src/platform/linux/x11/window.rs:419:41
   9: <gpui::platform::linux::x11::client::X11Client as gpui::platform::linux::platform::LinuxClient>::open_window
             at crates/gpui/src/platform/linux/x11/client.rs:767:22
  10: <gpui::platform::linux::x11::client::X11Client as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:230:9
  11: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:623:35
  12: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>::{closure#0}
             at crates/gpui/src/app.rs:496:30
  13: <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>::{closure#0}>
             at crates/gpui/src/app.rs:361:22
  14: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>
             at crates/gpui/src/app.rs:493:9
  15: <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#8}>
             at crates/gpui/src/app/async_context.rs:154:12
  16: <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:969:17
  17: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/future/future.rs:123:9
  18: <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
  19: <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  20: <async_task::runnable::Runnable>::run
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  21: <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}
             at crates/gpui/src/platform/linux/x11/client.rs:154:17
  22: <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:327:61
  23: <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}>::{closure#0}
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:187:32
  24: <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}>::{closure#0}>::{closure#0}
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:138:21
  25: <calloop::sources::generic::Generic<calloop::sources::ping::eventfd::ArcAsFd> as calloop::sources::EventSource>::process_events::<<calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}>::{closure#0}>::{closure#0}>
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/generic.rs:290:9
  26: <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}>::{closure#0}>
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:127:9
  27: <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events::{closure#0}>
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:184:9
  28: <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::x11::client::X11Client>::new::{closure#0}>> as calloop::sources::EventDispatcher<gpui::platform::linux::x11::client::X11Client>>::process_events
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:326:9
  29: <calloop::loop_logic::EventLoop<gpui::platform::linux::x11::client::X11Client>>::dispatch_events
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:445:31
  30: <calloop::loop_logic::EventLoop<gpui::platform::linux::x11::client::X11Client>>::dispatch::<core::option::Option<core::time::Duration>>
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:559:9
  31: <calloop::loop_logic::EventLoop<gpui::platform::linux::x11::client::X11Client>>::run::<<gpui::platform::linux::x11::client::X11Client as gpui::platform::linux::platform::LinuxClient>::run::{closure#0}, core::option::Option<core::time::Duration>>
             at /home/artjomsfomins/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:596:13
  32: <gpui::platform::linux::x11::client::X11Client as gpui::platform::linux::platform::LinuxClient>::run
             at crates/gpui/src/platform/linux/x11/client.rs:929:9
  33: <gpui::platform::linux::x11::client::X11Client as gpui::platform::Platform>::run
             at crates/gpui/src/platform/linux/platform.rs:129:9
  34: <gpui::app::App>::run::<Zed::main::{closure#3}>
             at crates/gpui/src/app.rs:140:9
  35: Zed::main
             at crates/zed/src/main.rs:332:5
  36: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
  37: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/sys_common/backtrace.rs:155:18
  38: std::rt::lang_start::<()>::{closure#0}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:166:18
  39: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panic.rs:146:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panic.rs:146:14
      std::rt::lang_start_internal
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:148:20
  40: std::rt::lang_start::<()>
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/rt.rs:165:17
  41: main
  42: __libc_start_main
             at /build/glibc-e2p3jK/glibc-2.31/csu/../csu/libc-start.c:308:16
  43: _start

Environment

cargo 1.78.0 (54d8815d0 2024-03-26) OS: Ubuntu 20.04.6 LTS

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.

No response

SomeoneToIgnore commented 5 months ago

It's not failing on building, as you can see in the logs:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.66s
     Running `target/debug/Zed`

This seems to be a duplicate of https://github.com/zed-industries/zed/issues/11642 so I will close it.

Presumably MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0 warning is the culprit, and the usual starting advice to troubleshoot the GPU issue is to check whether there are driver updates available.