gmbeard / shadow-cast

GPU accelerated screen and audio recording for Linux
GNU General Public License v2.0
39 stars 0 forks source link

Build failed: fatal error: EGL/egl.h: No such file or directory #32

Closed artik closed 7 months ago

artik commented 7 months ago

Hi @gmbeard, now that all dependencies are correct (Writing a tutorial to help Ubuntu/Mint community), I'm facing a build error.

Here is the output of my working sudo cmake ..:

-- Defaulting CMAKE_BUILD_TYPE to Release
-- IPO supported. Enabling
-- Pipewire_INCLUDE_DIR: /usr/include/pipewire-0.3
-- Pipewire_LIBRARY: /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so
-- SPA_INCLUDE_DIR: /usr/include/spa-0.2
-- Components: avcodec;avdevice;avfilter;avformat;avutil;swresample;swscale
-- FFMpeg_avcodec: FOUND
-- FFMpeg_avdevice: FOUND
-- FFMpeg_avfilter: FOUND
-- FFMpeg_avformat: FOUND
-- FFMpeg_avutil: FOUND
-- FFMpeg_swresample: FOUND
-- FFMpeg_swscale: FOUND
-- DRM_INCLUDE_DIRS: /usr/include/libdrm;/usr/include
-- DRM_LIBRARY: /usr/include
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/artik/shadow-cast/build

But when I'm trying to build:

[  2%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/buffer.cpp.o
[  4%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/buffer_pool.cpp.o
[  6%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/codec.cpp.o
[  8%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/format.cpp.o
[ 10%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/frame.cpp.o
[ 12%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/media_chunk.cpp.o
[ 14%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/packet.cpp.o
[ 17%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/av/sample_format.cpp.o
[ 19%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/display/display.cpp.o
[ 21%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/drm/messaging.cpp.o
[ 23%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/drm/planes.cpp.o
[ 25%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/handlers/audio_chunk_writer.cpp.o
[ 27%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/handlers/drm_video_frame_writer.cpp.o
[ 29%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/handlers/stream_finalizer.cpp.o
[ 31%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/handlers/video_frame_writer.cpp.o
[ 34%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/io/accept_handler.cpp.o
[ 36%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/io/process.cpp.o
[ 38%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/io/signals.cpp.o
[ 40%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/io/unix_socket.cpp.o
[ 42%] Building CXX object src/CMakeFiles/shadow-cast-obj.dir/platform/egl.cpp.o
In file included from /home/artik/shadow-cast/src/platform/egl.cpp:1:
/home/artik/shadow-cast/src/platform/egl.hpp:4:10: fatal error: EGL/egl.h: No such file or directory
    4 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
gmake[2]: *** [src/CMakeFiles/shadow-cast-obj.dir/build.make:342: src/CMakeFiles/shadow-cast-obj.dir/platform/egl.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:103: src/CMakeFiles/shadow-cast-obj.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Do you know what could be this error?

gmbeard commented 7 months ago

@artik This suggests you're missing at least some of the Wayland dependencies. Shadow Cast requires both X11 and Wayland headers/libs when building, even if you only use it in one of those environments.

You must ensure you have all the dependencies listed in the "building from source" section of the README.

artik commented 7 months ago

Quite weird, I don't know wich ones i'm missing:

apt list --installed | grep wayland

Gives me:

libva-wayland2/jammy,now 2.14.0-1 amd64 [installed]
libwayland-bin/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-client++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-client-extra++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-client0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-client0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-cursor++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-cursor0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-cursor0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-dev/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-doc/jammy-updates,jammy-updates,jammy-security,jammy-security,now 1.20.0-1ubuntu0.1 all [installed]
libwayland-egl++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-egl-backend-dev/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-egl1-mesa/jammy-updates,now 23.0.4-0ubuntu1~22.04.1 amd64 [installed]
libwayland-egl1/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-egl1/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-server0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-server0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
xwayland/jammy-updates,jammy-security,now 2:22.1.1-1ubuntu0.13 amd64 [installed]
artik commented 7 months ago

libkf5wayland-dev was missing :)

apt list --installed | grep wayland now returns:

kwayland-data/jammy,jammy,now 4:5.92.0-0ubuntu1 all [installed]
kwayland-integration/jammy,now 4:5.24.4-0ubuntu1 amd64 [installed]
libkf5wayland-dev/jammy,now 4:5.92.0-0ubuntu1 amd64 [installed]
libkf5wayland-doc/jammy,jammy,now 4:5.92.0-0ubuntu1 all [installed,automatic]
libkf5waylandclient5/jammy,now 4:5.92.0-0ubuntu1 amd64 [installed]
libkf5waylandserver5/jammy,now 4:5.92.0-0ubuntu1 amd64 [installed,automatic]
libnvidia-egl-wayland-dev/jammy,now 1:1.1.9-1.1 amd64 [installed]
libnvidia-egl-wayland1/jammy,now 1:1.1.9-1.1 amd64 [installed,automatic]
libqt5waylandclient5-dev/jammy,now 5.15.3-1 amd64 [installed]
libqt5waylandclient5/jammy,now 5.15.3-1 amd64 [installed]
libqt5waylandcompositor5-dev/jammy,now 5.15.3-1 amd64 [installed]
libqt5waylandcompositor5/jammy,now 5.15.3-1 amd64 [installed]
libva-wayland2/jammy,now 2.14.0-1 amd64 [installed]
libwayland-bin/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-client++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-client-extra++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-client0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-client0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-cursor++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-cursor0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-cursor0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-dev/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-doc/jammy-updates,jammy-updates,jammy-security,jammy-security,now 1.20.0-1ubuntu0.1 all [installed]
libwayland-egl++0/jammy,now 0.2.8-2 amd64 [installed]
libwayland-egl-backend-dev/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-egl1-mesa/jammy-updates,now 23.0.4-0ubuntu1~22.04.1 amd64 [installed]
libwayland-egl1/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-egl1/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
libwayland-server0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 amd64 [installed]
libwayland-server0/jammy-updates,jammy-security,now 1.20.0-1ubuntu0.1 i386 [installed,automatic]
qtwayland5-dev-tools/jammy,now 5.15.3-1 amd64 [installed]
qtwayland5-doc/jammy,jammy,now 5.15.3-1 all [installed]
qtwayland5/jammy,now 5.15.3-1 amd64 [installed]
wayland-protocols/jammy,jammy,now 1.25-1 all [installed]
xwayland/jammy-updates,jammy-security,now 2:22.1.1-1ubuntu0.13 amd64 [installed]

Compilation done !