Teach me how to build and install a package from github

I’m trying to get obs-studio and virtual webcam to work on my manjaro. I use a DBpower action camera as a webcam. OBS does not see it.

I found out that I need to install:

obs-v4l2sink ( GitHub - CatxFish/obs-v4l2sink: obs studio output plugin for Video4Linux2 device )


v4l2loopback ( GitHub - umlaeute/v4l2loopback: v4l2-loopback device )

every single tutorial I have found online does not work on manjaro at least not for me.
on the github page of obs-v4l2sink the instructions are:

git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install

When I try this,
it tells me when i get to the
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..

part it gives me this error message:

-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.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
-- Found Libobs: /usr/bin/../lib64/libobs.so  
CMake Error at external/FindLibObs.cmake:98 (include):
  include could not find load file:

Call Stack (most recent call first):
  CMakeLists.txt:6 (include)

-- Configuring incomplete, errors occurred!
See also "/home/kds/slett/obs-v4l2sink/build/CMakeFiles/CMakeOutput.log".

I have not tried to compile and install the v4l2Loopback since I have not been able to make the v4l2sink.

can anyone teach me how to do this right from the getgo and if I run into a similar situation further-on in my arch/Manjaro career I don’t need help to resolve it?

All you need is obs-v4l2sink in the AUR (Arch User Repository). It depends on v4l2loopback-dkms which is in the community repo.


@ Yochanan thank you for your input.

I tried installing it from pacman gui. but when It tries to build it it gives me this error:

    obs-studio-26.1.2.tar.gz ... Passed
    v4l2device_close.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting obs-v4l2sink-0.1.0.tar.gz with bsdtar
  -> Extracting obs-studio-26.1.2.tar.gz with bsdtar
==> Starting prepare()...
/usr/bin/patch: **** Can't open patch file /var/tmp/pamac-build-kds/obs-v4l2sink/src/v4l2device_close.patch : No such file or directory
==> ERROR: A failure occurred in prepare().

that’s why I would like to learn how to do it manually in case I run into these problems again.

You need to installed the base-devel group before dealing with AUR packages

sudo pacman -S --needed base-devel

sidenote, your desktop enviroment is not relevant to AUR issues.

Why a lot of people here ad their DE tag in the AUR section?

1 Like

So what you are saying I need to install the base-devel package first, and then the pacman gui will be able to build it?
If I install the base-devel package the steps on the Github page will work?

I’ve been trying to find a tutorial on how to do it myself manually but I have had no luck. do you know of a good tutorial on it and could point me in the right direction? I’ve been searching on archwiki but I can’t seem to find what I’m looking for.

the book Linux for dummies did not help on the matter either.

I did not know that DE did not matter, but no I know. so I will not put that tag in any other posts. thank you.

You mean Pamac. Pacman doesn’t have a GUI. :wink:

That’s what the wiki article I linked says, right? :wink:

Not related. If you install things manually like that, eventually you’ll have conflicting files that Pacman doesn’t know about.

1 Like

I’m sorry, I did not realize that the AUR was a link to this question.!

I will go and read it now :slight_smile:

Did you solve it?

I tried it myself:

pamac build v4l2loopback-dkms-git
pamac build obs-v4l2sink-git

and of course for the dkms you will need the headers of the kernel, for example:

pamac install linux54-headers

Here are the build instructions:


@megavolt thank you for your answer. I’m going to look further in to it.

but after installing pacman -S base-devel I could build it with the add and remove gui. I’m going to read your links and try to build it myself too.

if you had to describe what a linux-headers is, really simplified to a newbie, I would much appreciate it. as some descriptions get way over my head. lol

Ok really easy:

If you compile code, does mean: translate a programming language into machine code, then there are code libraries which are shared with other code, so that it can be reused. This code are so called header-files, which can be included with a simple line in any code to ensure all code parts use the same bases and work with each other.

If you use DKMS (Dynamic Kernel Module Support), then the module (driver) gets compiled against the current kernel and therefore it includes the header files of the current kernel. Without the header files it can not be compiled, since code is missing. On every new kernel version it must be re-compiled.


1 Like

@megavolt Thank you so very much for taking the time to teach a newbie , that makes all the other stuff I’ve red make sense. again thank you!

1 Like