obs-v4l2sink icon indicating copy to clipboard operation
obs-v4l2sink copied to clipboard

cant build on fedora 32

Open theScrabi opened this issue 4 years ago • 11 comments

I'm getting this issue, however I don't know which package would satisfy this xcb-config.cmake:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at linux-capture/CMakeLists.txt:9 (find_package):
  By not providing "FindXCB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "XCB", but
  CMake did not find one.

  Could not find a package configuration file provided by "XCB" with any of
  the following names:

    XCBConfig.cmake
    xcb-config.cmake

  Add the installation prefix of "XCB" to CMAKE_PREFIX_PATH or set "XCB_DIR"
  to a directory containing one of the above files.  If "XCB" provides a
  separate development package or SDK, be sure it has been installed.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.17)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

theScrabi avatar Apr 30 '20 21:04 theScrabi

I am able to build on Fedora 32 using this pending PR:

https://github.com/CatxFish/obs-v4l2sink/pull/43

scottlinux avatar May 05 '20 13:05 scottlinux

I am able to build on Fedora 32 using this pending PR:

#43

Trying to build it with Fedora 32 as well. That PR doesn't work for me. I still get these errors:

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

CMake Error at external/FindLibObs.cmake:94 (message):
  Could not find the libobs library /LibObsConfig.cmake
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)

confunguido avatar May 15 '20 16:05 confunguido

Can you try these cmake options?

sudo dnf install obs-studio-libs qt5-qtbase-devel

git clone https://github.com/DaveWK/obs-v4l2sink.git

cd obs-v4l2sink
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIBOBS_INCLUDE_DIR="/usr/lib64" -DLibObs_DIR="/usr/lib64/cmake/LibObs" ..
make -j4
sudo make install

cc: @DaveWK

scottlinux avatar May 17 '20 14:05 scottlinux

Thanks for the suggestion. I get the same error.

  Could not find the libobs library
  /usr/lib64/cmake/LibObs/LibObsConfig.cmake
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)```

confunguido avatar May 17 '20 15:05 confunguido

However there is a simple workaround. I got it working by simply copying the files from the .dep to the places the belong to in fedora.

theScrabi avatar May 21 '20 08:05 theScrabi

FWIW here's how I managed to build on Fedora 32 for the rpmfusion obs-studio 25.0.8.

  1. git clone --depth 1 --single-branch -b 25.0.8-patch https://github.com/obsproject/obs-studio.git obs-studio
  2. git clone https://github.com/CatxFish/obs-v4l2sink
  3. cd obs-v4l2sink
  4. sed -i s$/lib/obs-plugins$/lib64/obs-plugins$ CMakeLists.txt
  5. mkdir build
  6. cd build
  7. cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr -DLIBOBS_LIB="/usr/lib64/libobs.so" ..
  8. make
  9. sudo make install

lukester1975 avatar May 22 '20 08:05 lukester1975

2\. git clone https://github.com/CatxFish/obs-v4l2sink

This doesn't work for me. I still get the following error:

Could not find a package configuration file provided by "LibObs" with any
  of the following names:

    LibObsConfig.cmake
    libobs-config.cmake

  Add the installation prefix of "LibObs" to CMAKE_PREFIX_PATH or set
  "LibObs_DIR" to a directory containing one of the above files.  If "LibObs"
  provides a separate development package or SDK, be sure it has been
  installed.

confunguido avatar May 22 '20 17:05 confunguido

@confunguido -- I made some updates to the branch I was working on -- try doing: dnf install -y obs-studio-libs obs-studio-devel qt5-qtbase-devel cmake make automake gcc gcc-c++ --enablerepo=rpmfusion-free-updates (assuming you have rpmfusion-free-updates installed) and it should work

DaveWK avatar May 23 '20 02:05 DaveWK

I think it worked. Thanks @DaveWK!

confunguido avatar May 23 '20 19:05 confunguido

OK, got it working and I'm confirming steps here. I did the following on Fedora 32:

  1. Installed 25.0.8 from RPM Fusion: dnf install -y obs-studio
  2. Master of obsproject/obs-studio.git was on 25.0.8 so I checked that out
  3. dnf install -y obs-studio-libs obs-studio-devel qt5-qtbase-devel cmake make automake gcc gcc-c++
  4. Build sink via normal steps
  5. sudo ln -s /usr/lib/obs-plugins/v4l2sink.so /usr/lib64/obs-plugins/
    • or do sed -i s$/lib/obs-plugins$/lib64/obs-plugins$ CMakeLists.txt before step 4
  6. Load up obs-studio, go to Tools > V4L2 Video Output change device to /dev/video2, click Start
  7. Done

Specs:

           /:-------------:\          OS: Fedora 32 ThirtyTwo
        :-------------------::        Kernel: x86_64 Linux 5.7.14-200.fc32.x86_64
      :-----------/shhOHbmp---:\      Uptime: 18h 40m
    /-----------omMMMNNNMMD  ---:     Packages: 2488
   :-----------sMMMMNMNMP.    ---:    Shell: bash 5.0.17
  :-----------:MMMdP-------    ---\   Resolution: 5760x1080
 ,------------:MMMd--------    ---:   DE: GNOME 3.36.4
 :------------:MMMd-------    .---:   WM: Mutter
 :----    oNMMMMMMMMMNho     .----:   WM Theme: 
 :--     .+shhhMMMmhhy++   .------/   GTK Theme: Adwaita-dark [GTK2/3]
 :-    -------:MMMd--------------:    Icon Theme: Adwaita
 :-   --------/MMMd-------------;     Font: Droid Sans Bold 11
 :-    ------/hMMMy------------:      CPU: AMD Ryzen Threadripper 1920X 12-Core @ 24x 3.5GHz
 :-- :dMNdhhdNMMNo------------;       GPU: GeForce GTX 1060 3GB
 :---:sdNMMMMNds:------------:       
 :------:://:-------------::         
 :---------------------://

ghost avatar Aug 23 '20 00:08 ghost

9\. sudo make install

Thanks man, you have saved my life

jacob-dev37 avatar Sep 19 '20 02:09 jacob-dev37