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

[Build] Missing header (gstgldisplay_egl_device.h) #108

Closed
markusbkk opened this issue Oct 27, 2022 · 8 comments
Closed

[Build] Missing header (gstgldisplay_egl_device.h) #108

markusbkk opened this issue Oct 27, 2022 · 8 comments

Comments

@markusbkk
Copy link

Attempting to build (yarn build:native) the compositor-proxy fails with the following trace:

FAILED: CMakeFiles/proxy-encoding.dir/native/src/gst_encoder.c.o
/usr/bin/cc -Dproxy_encoding_EXPORTS -I../node_modules/westfield-proxy/dist/include -isystem /usr/include/gstreamer-1.0 -isystem /usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -isystem /usr/include/libdrm -isystem /usr/include/orc-0.4 -isystem /usr/include/graphene-1.0 -isystem /usr/lib/x86_64-linux-gnu/graphene-1.0/include -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -O3 -DNDEBUG -fPIC   -mfpmath=sse -msse -msse2 -pthread -std=gnu99 -MD -MT CMakeFiles/proxy-encoding.dir/native/src/gst_encoder.c.o -MF CMakeFiles/proxy-encoding.dir/native/src/gst_encoder.c.o.d -o CMakeFiles/proxy-encoding.dir/native/src/gst_encoder.c.o   -c ../native/src/gst_encoder.c
../native/src/gst_encoder.c:9:10: fatal error: gst/gl/egl/gstgldisplay_egl_device.h: No such file or directory
    9 | #include <gst/gl/egl/gstgldisplay_egl_device.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
error Command failed with exit code 1.

OS: WSL2 (Ubuntu 20.04.5 LTS)

I hooked into vcpkg and it didn't find any missing packages, so this must be some sort of version mismatch?

@Zubnix
Copy link
Collaborator

Zubnix commented Oct 27, 2022

Yes indeed, ubuntu 20.04 uses gstreamer 1.16 while the required header is in gstreamer 1.18. I'll see if I can make the version requirement more strict.

@markusbkk
Copy link
Author

Yes indeed, ubuntu 20.04 uses gstreamer 1.16 while the required header is in gstreamer 1.18. I'll see if I can make the version requirement more strict.

Thanks! That helped.

For anybody else running into this issue, they can update GStreamer through a PPA.

sudo add-apt-repository ppa:miurahr/gst
sudo apt update
sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav

Still running into issues launching the proxy and module at the same time (somehow, one of the two will connect to the wrong port), but that's probably just my own device being wonky RN. Nothing a reboot can't resolve.

PS: The documentation says to copy app-endpoint-encoding.node. Shouldn't it be proxy-encoding-addon.node?

@Zubnix
Copy link
Collaborator

Zubnix commented Oct 27, 2022

PS: The documentation says to copy app-endpoint-encoding.node. Shouldn't it be proxy-encoding-addon.node?

Good catch. That was renamed not so long ago and the documentation was not updated it seems. I'll fix that.

@Zubnix
Copy link
Collaborator

Zubnix commented Oct 28, 2022

I've written up a short "tl;dr" set of commands starting from a vanilla WSL Ubuntu 22.04 install. This works for me but I've might missed some steps while setting everything up. Let me know if anything is not working for you.

Tested using:
node v18
ubuntu 22.04

Open a new terminal for running the compositor-proxy:

  • sudo apt install \ cmake \ build-essential \ ninja-build \ pkg-config \ libffi-dev \ libudev-dev \ libgbm-dev \ libdrm-dev \ libegl-dev \ libwayland-dev \ libglib2.0-dev \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgraphene-1.0-dev \ gstreamer1.0-plugins-base \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-ugly \ gstreamer1.0-gl \ xwayland
  • yarn install
  • yarn generate
  • yarn build:native
  • cp dist/encoding/proxy-encoding-addon.node src/encoding/proxy-encoding-addon.node
  • export XAUTHORITY=.Xauthority
  • touch "$HOME/$XAUTHORITY"
  • xauth add "${HOST}":1 . "$(xxd -l 16 -p /dev/urandom)"
  • export XDG_RUNTIME_DIR=/tmp/xdg
  • yarn demo

Open a new terminal for running the compositor-module:

  • yarn install
  • sudo apt install openjdk-11-jre-headless
  • yarn generate
  • yarn demo

Open a new terminal for running the program:

  • sudo apt install gtk-4-examples
  • export XDG_RUNTIME_DIR=/tmp/xdg
  • (optional, only required if running X11 program) export DISPLAY=:1
  • gtk4-demo

Open a browser and go to localhost:8080 and click the button below that connects to localhost:8081

@Zubnix Zubnix mentioned this issue Oct 28, 2022
@markusbkk
Copy link
Author

Thanks! Works as advertised now.
Strangely, XWayland allows HandleResize events in situations in which they shouldn't and just fail silently on other X Servers.

screen-capture (2)

@Zubnix
Copy link
Collaborator

Zubnix commented Oct 28, 2022

Yeah the current X Window Manager implemented in Greenfield is not entirely EWMH/ICCCM compliant and is basically a typescript port of Weston's X Window Manager. There are definitely improvements to be made.

@markusbkk
Copy link
Author

Yeah the current X Window Manager implemented in Greenfield is not entirely EWMH/ICCCM compliant and is basically a typescript port of Weston's X Window Manager. There are definitely improvements to be made.

Microsoft's own Weston port exhibits the same behavior so I assumed this would be deeper down the stack.

@Zubnix
Copy link
Collaborator

Zubnix commented Nov 17, 2022

Fixed by PR #110

@Zubnix Zubnix closed this as completed Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants