w23 / obs-studio

OBS - Free and open source software for live streaming and screen recording

Home Page:https://obsproject.com/mantis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linux-dmabuf/dmabuf.c does not compile

chinese-soup opened this issue · comments

commented

Hello, thanks for this fork, it worked for me flawlessly up until recently (2-3 weeks ago?) it stopped working so that I could only "Start recording", but not "Start streaming" (didn't even matter if I had the DMABUF in a scene or not - and the DMABUF still worked in the preview & recording), last line in log was:
warning: Output 'simple_stream': Tried to set a delay value on a non-encoded output (no delay was set ofc)

But anyway, I don't unfortunately have any previous lines, as I've then deleted the whole build directory, since I've decided to try rebuilding this OBS fork again from scratch and see if that works, but I unfortunately am not able to compile it anymore due to an error, even though it worked flawlessly couple of months ago (I am suspecting some library update in my system):

-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OBS_VERSION: 17.0.0-4983-g268840788
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'egl'
--   Found egl, version 1.5
-- Found EGL: /usr/include  
-- Found FFmpeg: /usr/bin/../lib64/libavcodec.so (found version "58.134.100") found components: avcodec avdevice avutil avformat 
-- Found Libcurl: /usr/bin/../lib64/libcurl.so  
-- Scripting: Luajit supported
-- Scripting: Python 3 supported
-- Scripting: SWIG not found; scripting disabled
-- Using system Jansson library
-- XCB[XCB]: Found component XCB
-- Found XCB: /usr/lib/libxcb.so  found components: XCB 
-- Found X11_XCB: /usr/lib/libX11-xcb.so  
-- Found Wayland: /usr/lib/libwayland-client.so;/usr/lib/libwayland-server.so;/usr/lib/libwayland-egl.so;/usr/lib/libwayland-cursor.so   
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found FFmpeg: /usr/bin/../lib64/libavformat.so (found version "58.76.100") found components: avformat avutil swscale swresample avcodec 
-- XCB[XINPUT]: Found component XINPUT
-- Found XCB: /usr/lib/libxcb-xinput.so  found components: XINPUT 
-- XCB[XCB]: Found component XCB
-- XCB[COMPOSITE]: Found component COMPOSITE
-- XCB[DAMAGE]: Found component DAMAGE
-- XCB[DRI2]: Found component DRI2
-- XCB[EWMH]: Found component EWMH
-- XCB[GLX]: Found component GLX
-- XCB[ICCCM]: Found component ICCCM
-- XCB[IMAGE]: Found component IMAGE
-- XCB[KEYSYMS]: Found component KEYSYMS
-- XCB[RANDR]: Found component RANDR
-- XCB[RENDER]: Found component RENDER
-- XCB[RENDERUTIL]: Found component RENDERUTIL
-- XCB[SHAPE]: Found component SHAPE
-- XCB[SHM]: Found component SHM
-- XCB[SYNC]: Found component SYNC
-- XCB[UTIL]: Found component UTIL
-- XCB[XFIXES]: Found component XFIXES
-- XCB[XTEST]: Found component XTEST
-- XCB[XV]: Found component XV
-- XCB[XINPUT]: Found component XINPUT
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB: /usr/lib/libxcb-xinput.so;/usr/lib/libxcb.so;/usr/lib/libxcb-composite.so;/usr/lib/libxcb-damage.so;/usr/lib/libxcb-dri2.so;/usr/lib/libxcb-ewmh.so;/usr/lib/libxcb-glx.so;/usr/lib/libxcb-icccm.so;/usr/lib/libxcb-image.so;/usr/lib/libxcb-keysyms.so;/usr/lib/libxcb-randr.so;/usr/lib/libxcb-render.so;/usr/lib/libxcb-render-util.so;/usr/lib/libxcb-shape.so;/usr/lib/libxcb-shm.so;/usr/lib/libxcb-sync.so;/usr/lib/libxcb-util.so;/usr/lib/libxcb-xfixes.so;/usr/lib/libxcb-xtest.so;/usr/lib/libxcb-xv.so;/usr/lib/libxcb-xinput.so;/usr/lib/libxcb-xinerama.so   
-- Found PulseAudio - Audio Monitor enabled
-- Using libavcodec for image loading in libobs
-- Found ZLIB: /usr/bin/../lib64/libz.so  
-- Found Wayland: /usr/lib/libwayland-client.so;/usr/lib/libwayland-server.so;/usr/lib/libwayland-egl.so;/usr/lib/libwayland-cursor.so  found components: Client 
-- XCB[XCB]: Found component XCB
-- XCB[RANDR]: Found component RANDR
-- XCB[SHM]: Found component SHM
-- XCB[XFIXES]: Found component XFIXES
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB: /usr/lib/libxcb.so;/usr/lib/libxcb-randr.so;/usr/lib/libxcb-shm.so;/usr/lib/libxcb-xfixes.so;/usr/lib/libxcb-xinerama.so  found components: XCB RANDR SHM XFIXES XINERAMA 
-- Checking for module 'libdrm'
--   Found libdrm, version 2.4.107
-- Found Libv4l2: /usr/lib/libv4l2.so  
-- Found UDev: /usr/lib/libudev.so  
-- Checking for module 'jack'
--   Found jack, version 1.9.19
-- Found jack: /usr/lib/libjack.so
-- Found ALSA: /usr/lib/libasound.so (found version "1.2.5.1") 
-- Found LibVLC: /usr/include/vlc  
-- Could NOT find Sndio (missing: Sndio_LIBRARY Sndio_INCLUDE_DIR) 
-- Sndio not found, disabling Sndio plugin
-- obs-vst submodule not found!  Please fetch/update submodules.  obs-vst plugin disabled.
-- Found Libx264: /usr/bin/../lib64/libx264.so  
-- Found FFmpeg: /usr/bin/../lib64/libavcodec.so (found version "58.134.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample 
-- Found FFmpeg: /usr/bin/../lib64/libavcodec.so (found version "58.134.100") found components: avcodec avutil avformat 
-- Found MbedTLS: /usr/bin/../lib64/libmbedtls.so;/usr/bin/../lib64/libmbedcrypto.so;/usr/bin/../lib64/libmbedx509.so  
-- Checking for module 'libftl'
--   Package 'libftl', required by 'virtual:world', not found
-- Found Libspeexdsp: /usr/bin/../lib64/libspeexdsp.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/unko/repos/obs_drm2/obs-studio/build
[15/404] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c: In function ‘mp_decode_next’:
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:372:33: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  372 |                                 av_init_packet(&d->orig_pkt);
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /usr/include/libavformat/avformat.h:312,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.h:31,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:17:
/usr/include/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:373:33: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  373 |                                 av_init_packet(&d->pkt);
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /usr/include/libavformat/avformat.h:312,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.h:31,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:17:
/usr/include/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:389:33: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  389 |                                 av_init_packet(&d->orig_pkt);
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /usr/include/libavformat/avformat.h:312,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.h:31,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:17:
/usr/include/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:390:33: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  390 |                                 av_init_packet(&d->pkt);
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /usr/include/libavformat/avformat.h:312,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.h:31,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.c:17:
/usr/include/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
[22/404] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/media.c.o
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/media.c: In function ‘mp_media_next_packet’:
/home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/media.c:149:9: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
  149 |         av_init_packet(&pkt);
      |         ^~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/bsf.h:30,
                 from /usr/include/libavcodec/avcodec.h:44,
                 from /usr/include/libavformat/avformat.h:312,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/decode.h:31,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/media.h:20,
                 from /home/unko/repos/obs_drm2/obs-studio/deps/media-playback/media-playback/media.c:22:
/usr/include/libavcodec/packet.h:488:6: note: declared here
  488 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
[121/404] Building C object plugins/linux-dmabuf/CMakeFiles/linux-dmabuf.dir/dmabuf.c.o
FAILED: plugins/linux-dmabuf/CMakeFiles/linux-dmabuf.dir/dmabuf.c.o 
/usr/bin/cc -DHAVE_OBSCONFIG_H -DUSE_XDG -Dlinux_dmabuf_EXPORTS -I/home/unko/repos/obs_drm2/obs-studio/libobs -I/home/unko/repos/obs_drm2/obs-studio/build/config -I/home/unko/repos/obs_drm2/obs-studio/deps/glad/include -Wall -Wextra -Wvla -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers  -std=gnu99 -fno-strict-aliasing -O2 -g -DNDEBUG -fPIC -mmmx -msse -msse2 -pthread -MD -MT plugins/linux-dmabuf/CMakeFiles/linux-dmabuf.dir/dmabuf.c.o -MF plugins/linux-dmabuf/CMakeFiles/linux-dmabuf.dir/dmabuf.c.o.d -o plugins/linux-dmabuf/CMakeFiles/linux-dmabuf.dir/dmabuf.c.o -c /home/unko/repos/obs_drm2/obs-studio/plugins/linux-dmabuf/dmabuf.c
/home/unko/repos/obs_drm2/obs-studio/plugins/linux-dmabuf/dmabuf.c:40:9: error: unknown type name ‘Display’
   40 |         Display *xdisplay;
      |         ^~~~~~~
[134/404] Building CXX object plugins/linux-capture/CMakeFiles/linux-capture.dir/xcompcap-helper.cpp.o
ninja: build stopped: subcommand failed.

Any help would be appreciated, but I do understand this repo is not your priority at all.

Thanks!

commented

Never mind! A simple
#include <X11/Xlib.h> to dmabuf.c did the trick, sorry for wasting your time, lol.

commented

#include <X11/Xlib.h> to dmabuf.c did the trick, sorry for wasting your time, lol.

Why is this still not in the repo?