revery-ui / revery-quick-start

Quick Start / Sample Revery Application

Home Page:https://www.outrunlabs.com/revery/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing libraries when building reason-sdl2 on Ubuntu WSL

625dennis opened this issue · comments

When I run esy build on Ubuntu WSL, it gives me this error

info building reason-sdl2@2.10.3020@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: reason-sdl2@2.10.3020
    # esy-build-package: pwd: /home/dennis/.esy/source/i/reason_sdl2__2.10.3020__15f56050
    # esy-build-package: running: 'dune' 'build' '-p' 'sdl2'
        ocamlopt src/sdl2.cmxs (exit 2)
    (cd /home/dennis/.esy/3/b/reason_sdl2-2.10.3020-9ffa16f0/default && /home/dennis/.esy/3___________________________________________________________________/i/ocaml-4.8.1000-e74c5c0d/bin/ocamlopt.opt -w -40 -g -shared -linkall -I src -o src/sdl2.cmxs src/sdl2.cmxa)
    /usr/bin/ld: cannot find -lGL
    /usr/bin/ld: cannot find -lGLU
    /usr/bin/ld: cannot find -lXxf86vm
    /usr/bin/ld: cannot find -lXrandr
    /usr/bin/ld: cannot find -lXinerama
    /usr/bin/ld: cannot find -lXcursor
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
    error: command failed: 'dune' 'build' '-p' 'sdl2' (exited with 1)
    esy-build-package: exiting with errors above...

  building reason-sdl2@2.10.3020
esy: exiting due to errors above

I have tried building the reason-sdl2 example and I get the same error.

Here is the solution. Run sudo apt-get install libsdl2-dev

I am also getting cannot find -lbz2 for reason-skia. Not sure which library to download for this.

Lots of missing stuff. Run sudo apt-get install libbz2-dev. Other downloads include libgtk-3-dev, clang, nasm.

Looks like I'm almost done.

info building revery@github:revery-ui/revery#3c23304@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: revery@github:revery-ui/revery#3c23304
    # esy-build-package: pwd: /home/dennis/.esy/source/i/revery__51903893
    # esy-build-package: running: 'dune' 'build' '-p' 'Revery' '-j4'
        ocamlopt examples/Examples.exe (exit 2)
...
//usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_from_script'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_get_unicode_funcs'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_to_script'
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
    error: command failed: 'dune' 'build' '-p' 'Revery' '-j4' (exited with 1)
    esy-build-package: exiting with errors above...

  building revery@github:revery-ui/revery#3c23304
esy: exiting due to errors above

I'm getting this message repeated a lot when running esy x App.

[DEBUG]    +0ms Revery.CanvasContext : Unable to create native interface. Falling back to SDL2...                       [INFO]     +0ms Revery.CanvasContext : Creating Skia context...                                                         [ERROR]    +0ms Revery.CanvasContext : Unable to create skia context  

Is there a way to run revery on wsl?

I installed xming. This is what I get now

[DEBUG]   +89ms Revery.Core.Window : Starting window creation...
[INFO]     +0ms Revery.Core.Window : Creating window Welcome to Revery! width: 800 height: 600
[INFO]    +60ms Revery.Core.Window : Window created successfully.
[DEBUG]    +0ms Revery.Core.Window : Window id: 2
[DEBUG]    +0ms Revery.Core.Window : Setting window context
[ERROR]   +13ms Revery.SDL2 : SDL_GL_Setup failed: Could not create GL context
[DEBUG]    +2ms Revery.Core.Window : GL setup. Checking GL version...