Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wezterm: libEGL.so: libEGL.so: cannot open shared object file: No such file or directory #172878

Closed
benwbooth opened this issue May 13, 2022 · 7 comments

Comments

@benwbooth
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to run wezterm or wezterm-gui, I get this message:
 2022-05-13T15:21:05.198Z INFO  wezterm_mux_server_impl::local > setting up /run/user/30386/wezterm/gui-sock-9313
 2022-05-13T15:21:05.214Z ERROR wezterm_gui::frontend          > Failed to create window: with_egl_lib failed: with_egl_lib(libEGL.so.1) failed: egl GetDisplay: Failed but with error code: SUCCESS, libEGL.so: libEGL.so: cannot open shared object file: No such file or directory, with_egl_lib(libEGL.so.1) failed: egl GetDisplay: Failed but with error code: SUCCESS, libEGL.so: libEGL.so: cannot open shared object file: No such file or directory

Notify maintainers

@SuperSandro2000

@SuperSandro2000
Copy link
Member

On what system are you trying to run wezterm?

@benwbooth
Copy link
Contributor Author

I've tried it on Manjaro Linux and Ubuntu 20.04 with the same result.

@benwbooth
Copy link
Contributor Author

I"m using nixpkgs unstable from commit 7f9b6e2.

@benwbooth
Copy link
Contributor Author

The weird thing is it looks like libEGL is in there if I run ldd:

$ ldd /home/bbooth/.nix-profile/bin/wezterm-gui
	linux-vdso.so.1 (0x00007ffd813a1000)
	/nix/store/pi2h6nky70gww75w05zq1ch9fmycrvvy-libGL-1.4.0/lib/libEGL.so.1 (0x00007f16aa1ee000)
	libssl.so.1.1 => /nix/store/2aprvflf41z1dfma87mzd3md51xm2g71-openssl-1.1.1m/lib/libssl.so.1.1 (0x00007f16aa157000)
	libcrypto.so.1.1 => /nix/store/2aprvflf41z1dfma87mzd3md51xm2g71-openssl-1.1.1m/lib/libcrypto.so.1.1 (0x00007f16a9e67000)
	libdl.so.2 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libdl.so.2 (0x00007f16a9e62000)
	libxcb-util.so.1 => /nix/store/zvh4j1c2w4q8zlc1xrvxpp242pdmkxs4-xcb-util-0.4.0/lib/libxcb-util.so.1 (0x00007f16a9e5a000)
	libxcb.so.1 => /nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libxcb.so.1 (0x00007f16a9e2e000)
	libxkbcommon.so.0 => /nix/store/xk8lbp1dabz3vm49j22jgmlyqf3gcxw3-libxkbcommon-1.3.1/lib/libxkbcommon.so.0 (0x00007f16a9de8000)
	libxkbcommon-x11.so.0 => /nix/store/xk8lbp1dabz3vm49j22jgmlyqf3gcxw3-libxkbcommon-1.3.1/lib/libxkbcommon-x11.so.0 (0x00007f16a9ddb000)
	libxcb-icccm.so.4 => /nix/store/ysj4pshwqiairh83hrzzhl0bjpsqwbbn-xcb-util-wm-0.4.1/lib/libxcb-icccm.so.4 (0x00007f16a9dd3000)
	libxcb-ewmh.so.2 => /nix/store/ysj4pshwqiairh83hrzzhl0bjpsqwbbn-xcb-util-wm-0.4.1/lib/libxcb-ewmh.so.2 (0x00007f16a9dc3000)
	libxcb-image.so.0 => /nix/store/9z420ar1r47y0bpwi86d8r8h8nachwh2-xcb-util-image-0.4.0/lib/libxcb-image.so.0 (0x00007f16a9dbc000)
	libxcb-keysyms.so.1 => /nix/store/pak2l8pq11wpl6jhpydwalg4rlx92lgc-xcb-util-keysyms-0.4.0/lib/libxcb-keysyms.so.1 (0x00007f16a9db7000)
	libX11-xcb.so.1 => /nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libX11-xcb.so.1 (0x00007f16a9db2000)
	libxcb-render.so.0 => /nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libxcb-render.so.0 (0x00007f16a9da0000)
	libxcb-xkb.so.1 => /nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libxcb-xkb.so.1 (0x00007f16a9d82000)
	libX11.so.6 => /nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libX11.so.6 (0x00007f16a9c3d000)
	libfontconfig.so.1 => /nix/store/wyf7am3d1xpzx6nagqq1j4ha07vlgrw8-fontconfig-2.13.94-lib/lib/libfontconfig.so.1 (0x00007f16a9bf1000)
	libc.so.6 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libc.so.6 (0x00007f16a9a1b000)
	/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f16ad476000)
	libwayland-egl.so.1 => /nix/store/pz2wx67gskw438ysws82nwk84whwd63d-wayland-1.20.0/lib/libwayland-egl.so.1 (0x00007f16a9a14000)
	libwayland-client.so.0 => /nix/store/pz2wx67gskw438ysws82nwk84whwd63d-wayland-1.20.0/lib/libwayland-client.so.0 (0x00007f16a9a01000)
	libgcc_s.so.1 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libgcc_s.so.1 (0x00007f16a99e7000)
	libutil.so.1 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libutil.so.1 (0x00007f16a99e2000)
	librt.so.1 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/librt.so.1 (0x00007f16a99d7000)
	libpthread.so.0 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libpthread.so.0 (0x00007f16a99b7000)
	libm.so.6 => /nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libm.so.6 (0x00007f16a9874000)
	libGLdispatch.so.0 => /nix/store/5lzlfgrc37wqj400b4qgpaa6kc9d2wr1-libglvnd-1.4.0/lib/libGLdispatch.so.0 (0x00007f16a97bb000)
	libXau.so.6 => /nix/store/x14h74lzrxk7j05pgqmba8yicb2bms6f-libXau-1.0.9/lib/libXau.so.6 (0x00007f16a97b6000)
	libXdmcp.so.6 => /nix/store/3ijd7iqmnwqvfyv4k8l5a8qw33agi1br-libXdmcp-1.1.3/lib/libXdmcp.so.6 (0x00007f16a97ae000)
	libxcb-shm.so.0 => /nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libxcb-shm.so.0 (0x00007f16a97a7000)
	libfreetype.so.6 => /nix/store/451fhyz2g9rgk7bd7nxgxjkx015ms0ms-freetype-2.11.1/lib/libfreetype.so.6 (0x00007f16a96e0000)
	libbz2.so.1 => /nix/store/nsgg55q1kh1ala68pas78hzfxsb3bnjk-bzip2-1.0.6.0.2/lib/libbz2.so.1 (0x00007f16a96cd000)
	libpng16.so.16 => /nix/store/vdcdfx068hmwqdd6wvsk5a6djlgrqfw4-libpng-apng-1.6.37/lib/libpng16.so.16 (0x00007f16a9693000)
	libz.so.1 => /nix/store/bqjh8dc6m5plswxrmmn9x4cpxrrw94lv-zlib-1.2.11/lib/libz.so.1 (0x00007f16a9674000)
	libexpat.so.1 => /nix/store/hwzah8ba3p9pwwv9zwdy5ysw8m7sljjw-expat-2.4.4/lib/libexpat.so.1 (0x00007f16a9643000)
	libffi.so.8 => /nix/store/5kmd81rnn4i8a9pd0z6hcv5skyd9hxfd-libffi-3.4.2/lib/libffi.so.8 (0x00007f16a9636000)

@benwbooth
Copy link
Contributor Author

Here's something weird, if I run strace it looks like it's searching for libEGL in a bunch of folders but doesn't realize that the path is already patched into the binary:

openat(AT_FDCWD, "/nix/store/5lzlfgrc37wqj400b4qgpaa6kc9d2wr1-libglvnd-1.4.0/lib/libEGL_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
futex(0x7f8a10e1b240, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
openat(AT_FDCWD, "/nix/store/2aprvflf41z1dfma87mzd3md51xm2g71-openssl-1.1.1m/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/wyf7am3d1xpzx6nagqq1j4ha07vlgrw8-fontconfig-2.13.94-lib/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xk8lbp1dabz3vm49j22jgmlyqf3gcxw3-libxkbcommon-1.3.1/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/pz2wx67gskw438ysws82nwk84whwd63d-wayland-1.20.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/zvh4j1c2w4q8zlc1xrvxpp242pdmkxs4-xcb-util-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/9z420ar1r47y0bpwi86d8r8h8nachwh2-xcb-util-image-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/pak2l8pq11wpl6jhpydwalg4rlx92lgc-xcb-util-keysyms-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ysj4pshwqiairh83hrzzhl0bjpsqwbbn-xcb-util-wm-0.4.1/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
getpid()                                = 13874
openat(AT_FDCWD, "/nix/store/2aprvflf41z1dfma87mzd3md51xm2g71-openssl-1.1.1m/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/wyf7am3d1xpzx6nagqq1j4ha07vlgrw8-fontconfig-2.13.94-lib/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xk8lbp1dabz3vm49j22jgmlyqf3gcxw3-libxkbcommon-1.3.1/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/pz2wx67gskw438ysws82nwk84whwd63d-wayland-1.20.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/n1h6395818hn30bi5dk31smjwvhwawax-libxcb-1.14/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/zvh4j1c2w4q8zlc1xrvxpp242pdmkxs4-xcb-util-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/9z420ar1r47y0bpwi86d8r8h8nachwh2-xcb-util-image-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/pak2l8pq11wpl6jhpydwalg4rlx92lgc-xcb-util-keysyms-0.4.0/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ysj4pshwqiairh83hrzzhl0bjpsqwbbn-xcb-util-wm-0.4.1/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108/lib/libEGL.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(7, "x", 1)                        = 1
read(6, "x", 64)                        = 1
recvmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0\340\0\3\0\340\3{\1\0\0A\25+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
write(2, " 2022-05-13T15:42:39.618Z \33[0m\33["..., 471 2022-05-13T15:42:39.618Z ERROR wezterm_gui::frontend          > Failed to create window: with_egl_lib failed: with_egl_lib(libEGL.so.1) failed: egl GetDisplay: Failed but with error code: SUCCESS, libEGL.so: libEGL.so: cannot open shared object file: No such file or directory, with_egl_lib(libEGL.so.1) failed: egl GetDisplay: Failed but with error code: SUCCESS, libEGL.so: libEGL.so: cannot open shared object file: No such file or directory
) = 471
kill(13877, SIGHUP)                     = 0

@SuperSandro2000
Copy link
Member

That's normal. If you are not on NixOS you need to use https://github.com/guibou/nixGL here.

@asdf8dfafjk
Copy link
Contributor

asdf8dfafjk commented Jun 28, 2022

For those on NixOS, if it happens after an n-r s (nixos-rebuild switch) then perhaps you need to turn your computer off and on once. (although I suspect my problem was an old installation in local env)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants