snapcrafters / alacritty

A community-maintained package to easily install Alacritty on Linux
MIT License
9 stars 12 forks source link

[BUG] Fails to run on latest version of Fedora (and possibly others) #23

Closed cat-master21 closed 5 months ago

cat-master21 commented 5 months ago

Describe the bug

After doing some debugging, it seems that Alacritty requires libwayland-egl.so.1 (or libwayland-egl.so) for Wayland. The Snap does not include this, so it loads from the system library path, which creates a library mismatch on Fedora 39 and corresponding Ubuntu version.

To Reproduce

Steps to reproduce the behavior:

  1. Make sure you are using an OS with a different Glib version than core22 Snap (e.g. Fedora 40)
  2. Install the Alacritty Snap like normal
  3. Run the Alacritty Snap like normal
  4. See the error

Expected behavior

Alacritty is expected to run/startup.

Environment:

Additional context

Shell output:

me@fedora:~$ snap run alacritty
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-sys-0.31.1/src/egl.rs:46:43:
Library libwayland-egl.so could not be loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Running export LD_DEBUG=libs first:

find library=libwayland-egl.so.1 [0]; searching
      5224:  search path=/home/me/unsnap/alacritty/current/bin/../usr/lib/x86_64-linux-gnu:/snap/core22/current/lib/x86_64-linux-gnu        (RPATH from file /home/me/unsnap/alacritty/current/bin/alacritty)
      5224:   trying file=/home/me/unsnap/alacritty/current/bin/../usr/lib/x86_64-linux-gnu/libwayland-egl.so.1
      5224:   trying file=/snap/core22/current/lib/x86_64-linux-gnu/libwayland-egl.so.1
      5224:  search path=/home/me/unsnap/alacritty/current/usr/lib/x86_64-linux-gnu/dri     (LD_LIBRARY_PATH)
      5224:   trying file=/home/me/unsnap/alacritty/current/usr/lib/x86_64-linux-gnu/dri/libwayland-egl.so.1
      5224:  search cache=/etc/ld.so.cache
      5224:   trying file=/lib64/libwayland-egl.so.1
      5224: 
      5224: /snap/core22/current/lib/x86_64-linux-gnu/libc.so.6: error: version lookup error: version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libwayland-egl.so.1) (fatal)
      5224: find library=libwayland-egl.so [0]; searching
      5224:  search path=/home/me/unsnap/alacritty/current/bin/../usr/lib/x86_64-linux-gnu:/snap/core22/current/lib/x86_64-linux-gnu        (RPATH from file /home/me/unsnap/alacritty/current/bin/alacritty)
      5224:   trying file=/home/me/unsnap/alacritty/current/bin/../usr/lib/x86_64-linux-gnu/libwayland-egl.so
      5224:   trying file=/snap/core22/current/lib/x86_64-linux-gnu/libwayland-egl.so
      5224:  search path=/home/me/unsnap/alacritty/current/usr/lib/x86_64-linux-gnu/dri     (LD_LIBRARY_PATH)
      5224:   trying file=/home/me/unsnap/alacritty/current/usr/lib/x86_64-linux-gnu/dri/libwayland-egl.so
      5224:  search cache=/etc/ld.so.cache
      5224:   trying file=/lib64/libwayland-egl.so
      5224: 
      5224: /snap/core22/current/lib/x86_64-linux-gnu/libc.so.6: error: version lookup error: version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libwayland-egl.so) (fatal)
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-sys-0.31.1/src/egl.rs:46:43:
Library libwayland-egl.so could not be loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
cat-master21 commented 5 months ago

With the latest commit, this issue is solved for me.