~eliasnaur/gio#35:
[nixos] newContext: eglCreateWindowSurface failed 0x3009

sorry if this is a bit arcane but I'm already using sway and other wayland apps through the nixpkgs-wayland overlay. I'm also capable of building and running other immediate mode UIs like fyne or duit but I'm having trouble correctly building/running gophers and the hello world example for gioui.

If I don't add xorg libX11 to the dependencnies I get this error:

# gioui.org/ui/app
In file included from /nix/store/85mw8g12qysnhiyw49vjp426jp210cdn-mesa-19.1.3-dev/include/EGL/egl.h:39:0,
                 from ../go/pkg/mod/gioui.org/ui@v0.0.0-20190830130017-12089ea62a84/app/egl_linux.go:8:
/nix/store/85mw8g12qysnhiyw49vjp426jp210cdn-mesa-19.1.3-dev/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
 #include <X11/Xlib.h>
          ^~~~~~~~~~~~

If I do, I get the error in the title. From some searching I found that code is defined as EGL_BAD_MATCH but I'm not sure what that should tell me. I assume I somehow mixed incompatible library inputs but I'm not sure how to proceed. Maybe it's related to #8 ? I tried mesa and libglvnd to supply GLESv2 but since mesa pulls in the Xlib dependency I guess that might be the red herring I shouldn't have picked?

Any pointers appreciated

Status
REPORTED
Submitter
~cryptix
Assigned to
No-one
Submitted
17 days ago
Updated
a day ago
Labels
No labels applied.

~eliasnaur 17 days ago

On Mon Sep 2, 2019 at 10:50 AM ~cryptix wrote:

sorry if this is a bit arcane but I'm already using sway and other wayland apps through the nixpkgs-wayland overlay. I'm also capable of building and running other immediate mode UIs like fyne or duit but I'm having trouble correctly building/running gophers and the hello world example for gioui.

If I don't add xorg libX11 to the dependencnies I get this error:

gioui.org/ui/app

In file included from /nix/store/85mw8g12qysnhiyw49vjp426jp210cdn-mesa-19.1.3-dev/include/EGL/egl.h:39:0, from ../go/pkg/mod/gioui.org/ui@v0.0.0-20190830130017-12089ea62a84/app/egl_linux.go:8: /nix/store/85mw8g12qysnhiyw49vjp426jp210cdn-mesa-19.1.3-dev/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory #include ^~~~~~~~~~~~

If I do, I get the error in the title. From some searching I found that code is defined as EGLBADMATCH but I'm not sure what that should tell me. I assume I somehow mixed incompatible library imputs but I'm not sure how to proceed. Maybe it's related to #8 ? I tried mesa and libglvnd to supply GLESv2 but since mesa pulls in the Xlib dependency I guess that might be the red herring I shouldn't have picked?

I pushed gioui.org/commit/52dd762 which should remove the spurious dependency on X11 headers. Please try again, perhaps after removing your X11 dependencies.

If the example still doesn't work, please try the debug-35 branch:

$ cd $(mktemp -d)
$ git clone --branch debug-35 --single-branch https://git.sr.ht/~eliasnaur/gio
$ cd gio/apps
$ LIBGL_DEBUG=verbose go run ./hello

and let me know what that outputs.

~cryptix 17 days ago

Thanks for the quick reply!

The updated master helped with compiling it without depending on X11 but the error is (neary) the same:

2019/09/02 20:03:27 newContext: eglCreateWindowSurface failed 0x3009 (sRGB=true)

I will try your branch but I need to overcome a problem in the way nix re-packages the go modules since there is a bug when using the replace directive.. sigh.

in the meantime I got it working on macOS as well and bypassed this issue by using waypipe form my nixos desktop into a archlinux VM so I'm able to start using gioui to ports small experiemnts and figure this native building and running locally out later.

~eliasnaur referenced this from #36 5 days ago

~eliasnaur a day ago

https://git.sr.ht/~eliasnaur/gio/commit/c5a6ca2aba7615e0d80e3027d142e6e9686f48d8 might improve your situation as well. If you get the chance, please try out HEAD again.

Register here or Log in to comment, or comment via email.