Repository: ghostty-org/ghostty

Issue #175: upgraded to nixos 23.05 and now the app crashes on startup
Created: 2023-07-02T21:00:19Z
[nix-shell:~/src/ghostty]$ zig build -Doptimize=Debug -Dapp-runtime=gtk


[nix-shell:~/src/ghostty]$ ./zig-out/bin/ghostty 
info: ghostty version=0.1.0-main+8ca9e14
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=7.2.0
info: dependency fontconfig=21400
info: renderer=renderer.OpenGL
info: libxev backend=main.Backend.io_uring
debug(os): file handle limit raised value=524288
debug(os): setlocale result=en_US.UTF-8
info: homedir config not found, not loading path=/home/meghan/.config/ghostty/config
info(config): default shell source=env value=/nix/store/5d0bgm1j7nwan9z0gkv7lfsm5chz0jwq-bash-interactive-5.2-p15/bin/bash
libEGL warning: MESA-LOADER: failed to open radeonsi: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libEGL warning: MESA-LOADER: failed to open radeonsi: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libEGL warning: MESA-LOADER: failed to open swrast: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libGL error: MESA-LOADER: failed to open radeonsi: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /nix/store/mdck89nsfisflwjv6xv8ydj7dj0sj2pn-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/5zzbdhg945bafahn0x9xwsx8rm1f615d-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
debug(gtk): application activated
Gsk-Message: 13:58:52.920: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context

debug(gtk): gl surface realized
error(gtk): surface failed to realize: Unable to create a GL context
Segmentation fault at address 0x0
/nix/store/kszn57dii9mcqj9ad6r1i18r3y0j5izk-zig-0.11.0-dev.3892+0a6cd257b/lib/std/atomic/Atomic.zig:80:45: 0x12a621a in lock (ghostty)
                else => @atomicLoad(T, &self.value, ordering),
                                            ^
/home/meghan/src/ghostty/src/blocking_queue.zig:104:28: 0x12908ff in push (ghostty)
            self.mutex.lock();
                           ^
/home/meghan/src/ghostty/src/Surface.zig:1245:42: 0x12d4c2d in focusCallback (ghostty)
    _ = self.renderer_thread.mailbox.push(.{
                                         ^
/home/meghan/src/ghostty/src/apprt/gtk.zig:1146:40: 0x128d27e in gtkFocusEnter (ghostty)
        self.core_surface.focusCallback(true) catch |err| {
                                       ^
???:?:?: 0x7f73abfcf7d8 in ??? (???)
Aborted (core dumped)

Duplicate issue #276: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context
Created: 2023-08-13T17:32:39Z
The gtk runtime on my nixos crashes on startup.
josh@nixos:~/dev/ghostty$ nix-run -- zig build -Dapp-runtime=gtk
josh@nixos:~/dev/ghostty$ ./zig-out/bin/ghostty 
warning: This is a debug build. Performance will be very poor.
warning: You should only use a debug build for developing Ghostty.
warning: Otherwise, please rebuild in a release mode.
info: ghostty version=0.1.0-main+bddf24f
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=8.0.0
info: dependency fontconfig=21400
info: renderer=renderer.OpenGL
info: libxev backend=main.Backend.io_uring
debug(os): file handle limit raised value=524288
info(os): LANG is not valid according to libc, will use en_US.UTF-8
debug(os): setlocale result=en_US.UTF-8
info: homedir config not found, not loading path=/home/josh/.config/ghostty/config
info(config): default shell source=env value=/run/current-system/sw/bin/bash
libEGL warning: MESA-LOADER: failed to open iris: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libEGL warning: MESA-LOADER: failed to open iris: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libEGL warning: MESA-LOADER: failed to open swrast: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)

libGL error: MESA-LOADER: failed to open iris: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /nix/store/6plx60y4x4q2lfp6n7190kaihyxr7m1w-gcc-11.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/avl37x32aq90xy5lq1c1b0nnqj8nc5lp-llvm-15.0.7-lib/lib/libLLVM-15.so) (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
/nix/store/i843kfqdjbmn7wlxbk4m6p079710plic-libxfce4util-4.18.1/lib/libxfce4util.so.7: undefined symbol: g_string_free_and_steal
Failed to load module: /nix/store/vdd8jmymf50rd4gwpxzhz0f9wwhpyy0n-xfconf-4.18.1/lib/gio/modules/libxfconfgsettingsbackend.so
/nix/store/ra0vf89djrw5xvw6jq2cldh7kqmqwy7k-gvfs-1.50.4/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_static_name
Failed to load module: /nix/store/ra0vf89djrw5xvw6jq2cldh7kqmqwy7k-gvfs-1.50.4/lib/gio/modules/libgvfsdbus.so
debug(app): mailbox message=new_window
Gsk-Message: 13:30:47.253: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context

debug(gtk): gl surface realized
error(gtk): surface failed to realize: Unable to create a GL context
Segmentation fault at address 0x0
/nix/store/bm5afq7s1p1sljab0sm0imwndky358m5-zig-0.12.0-dev.17+49244dc0c/lib/std/atomic/Atomic.zig:80:45: 0x12d6a4a in lock (ghostty)
                else => @atomicLoad(T, &self.value, ordering),
                                            ^
/home/josh/dev/ghostty/src/blocking_queue.zig:104:28: 0x12b0adf in push (ghostty)
            self.mutex.lock();
                           ^
/home/josh/dev/ghostty/src/Surface.zig:1175:42: 0x130df5d in focusCallback (ghostty)
    _ = self.renderer_thread.mailbox.push(.{
                                         ^
/home/josh/dev/ghostty/src/apprt/gtk.zig:1380:40: 0x12b773c in gtkFocusEnter (ghostty)
        self.core_surface.focusCallback(true) catch |err| {
                                       ^
???:?:?: 0x7f9c089cf7d8 in ??? (libgobject-2.0.so.0)
Unwind information for `libgobject-2.0.so.0:0x7f9c089cf7d8` was not available, trace may be incomplete

Aborted (core dumped)

Closing comment (2023-08-13T17:42:58Z): I think this is a dupe of #175. Please correct me if I’m wrong…