"Unable to create skia context" - esy run
SamuelTrew opened this issue · 4 comments
-
Operating System: Ubuntu 20.04
-
Revery Version: revery-ui/revery#625794e
-
OCaml version: 4.9.0
-
Native, Bytecode, or JS build: Native
-
Link to github repo: Just revery-quick-start
-
Steps to reproduce: follow their guide and run install, build and run
-
Actual Result: black window appears
-
Expected Result: should display a small program
-
Additional Information: I installed the dependencies that it mentioned and the install and build steps run fine.
I saw issue #807 but the linked oni issue seems to say it fixed it but that doesn't seem to have been brought over -
Search terms used: unable to create skia context, unable to create native interface, skia, canvas context
I get the exact same error with revery-quick-start on Ubuntu 20.04.
Usually, this is due to not having the X11 headers / libraries installed prior to building esy-sdl2 - the CheckX11 check in the ./configure script fails: https://github.com/revery-ui/esy-sdl2/blob/1cd3d4ffd9220b02fe6c27a08c8e4e2283dfee20/configure.ac#L1602 - and so there is no video device baked into the build of SDL.
You can fix it by the following:
- Ensure you've installed the
xorg-devpackage to get all the X11 libraries / development headers - Clear the esy cache -
rm -rf ~/.esy - Run a
git clean -dxfin the project directory, ie:~/revery-quick-start,~/oni2, etc. (WARNING: this will remove any unsaved changes) - Run
esy install&esy build
Unfortunately most of the dependencies will have to rebuild, because this necessitates rebuilding SDL2 to get the proper headers / enable X11 video, which is a pretty core dependency.
Installing xorg-dev, clearing the esy cache and rebuilding the project worked for me!
That worked perfectly, thank you!