Building obs from source on arm64 Ubuntu 21.04 problem

TheRedM

New Member
I followed the official guide to build obs with browser source form source
But after running
Code:
cmake -DUNIX_STRUCTURE=1 -ENABLE_PIPEWIRE=OFF -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" ..
I got this error
Code:
PipeWire library not found! Please install PipeWire or set
    ENABLE_PIPEWIRE=OFF
I installed PipeWire but still same error i also tried to install the development library of PipeWire (libpipewire-0.3-dev) but i couldn't it seems unavailable for arm64 i guess! But i already have older version of it (libpipewire-0.2-dev), i know that libpipewire-0.3-dev is necessary but i already set ENABLE_PIPEWIRE=OFF i don't know what i'm messing
 

Tuna

Member
Probably delete your CMakeCache.txt and run CMake again.

Also it is -DENABLE_PIPEWIRE=OFF.
 

TheRedM

New Member
Probably delete your CMakeCache.txt and run CMake again.

Also it is -DENABLE_PIPEWIRE=OFF.
But the guide says -ENABLE_PIPEWIRE=OFF for Ubuntu 20.04 (btw i wrote the wrong version in the thread title) i already tried -DENABLE_PIPEWIRE=OFF before, the build finishes, but when it comes to the make step it doesn't complete it gives me this error
Code:
itoring/pulse/pulseaudio-wrapper.c.o[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-mon
itoring/pulse/pulseaudio-enum-devices.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-mon
itoring/pulse/pulseaudio-monitoring-available.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-mon
itoring/pulse/pulseaudio-output.c.o
[ 22%] Linking C shared library libobs.so
[ 22%] Built target libobs
make: *** [Makefile:152: all] Error 2
 

Tuna

Member
The guide correctly lists -D for that option for the CMake command.

The latest paste did not actually list the error. It aborts due to an error, but it must have been occurring earlier.
 

TheRedM

New Member
The guide correctly lists -D for that option for the CMake command.



The latest paste did not actually list the error. It aborts due to an error, but it must have been occurring earlier.
Thank you for the speedy replies.

The guide literally says:

# Note Ubuntu 20.04/Debian 10 must set ENABLE_PIPEWIRE=OFF and do not support wayland capture.

It's probably a typo but it's kinda misleading for newbies like me, please correct it.

About the error, the cmake stage went well, only 2 errors complaining about messing libraries to build plugins but they seems unrelated to what's causing the error in the make stage, this is a copy of the full make process
Code:
Scanning dependencies of target glad
Scanning dependencies of target obspython_swig_compilation
Scanning dependencies of target caption
Scanning dependencies of target media-playback
[  0%] Building C object deps/glad/CMakeFiles/glad.dir/src/glad.c.o
[  0%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/utf8.c.o
[  0%] Swig compile obspython.i for python
[  0%] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o
/home/mido/obs-studio/deps/libcaption/src/utf8.c: In function ‘utf8_char_whitespace’:
/home/mido/obs-studio/deps/libcaption/src/utf8.c:54:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
   54 |     if (!c || (c[0] >= 0 && c[0] <= ' ') || c[0] == 0x7F) {
      |                     ^~
[  1%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/srt.c.o
[  1%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/scc.c.o
[  1%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/mpeg.c.o
[  1%] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/media.c.o
[  1%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/cea708.c.o
[  1%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/xds.c.o
[  2%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/caption.c.o
[  2%] Linking C static library libmedia-playback.a
[  2%] Built target media-playback
Scanning dependencies of target obslua_swig_compilation
[  2%] Swig compile obslua.i for lua
[  2%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/eia608_charmap.c.o
[  2%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/eia608_from_utf8.c.o
[  2%] Building C object deps/libcaption/CMakeFiles/caption.dir/src/eia608.c.o
[  2%] Linking C static library libcaption.a
[  2%] Built target caption
Scanning dependencies of target obs-browser-page_autogen
[  2%] Automatic MOC for target obs-browser-page
AutoMoc: /home/mido/obs-studio/plugins/obs-browser/browser-app.hpp:0: Note: No relevant classes found. No output generated.
[  2%] Built target obs-browser-page_autogen
Scanning dependencies of target libobs
[  2%] Building C object libobs/CMakeFiles/libobs.dir/callback/calldata.c.o
[  2%] Building C object libobs/CMakeFiles/libobs.dir/callback/decl.c.o
[  2%] Building C object libobs/CMakeFiles/libobs.dir/callback/signal.c.o
[  2%] Built target obslua_swig_compilation
Scanning dependencies of target obs-browser-page
[  3%] Building CXX object plugins/obs-browser/CMakeFiles/obs-browser-page.dir/obs-browser-page_autogen/mocs_compilation.cpp.o
[  3%] Building CXX object plugins/obs-browser/CMakeFiles/obs-browser-page.dir/obs-browser-page/obs-browser-page-main.cpp.o
[  3%] Building C object libobs/CMakeFiles/libobs.dir/callback/proc.c.o
[  4%] Building C object libobs/CMakeFiles/libobs.dir/graphics/graphics-ffmpeg.c.o
[  4%] Building C object deps/glad/CMakeFiles/glad.dir/src/glad_egl.c.o
[  4%] Building C object deps/glad/CMakeFiles/glad.dir/src/glad_glx.c.o
[  4%] Building C object libobs/CMakeFiles/libobs.dir/graphics/quat.c.o
[  5%] Linking C shared library libobsglad.so
[  5%] Building C object libobs/CMakeFiles/libobs.dir/graphics/effect-parser.c.o
[  5%] Building CXX object plugins/obs-browser/CMakeFiles/obs-browser-page.dir/browser-app.cpp.o
[  5%] Built target glad
[  5%] Building CXX object plugins/obs-browser/CMakeFiles/obs-browser-page.dir/deps/json11/json11.cpp.o
[  5%] Built target obspython_swig_compilation
[  5%] Building C object libobs/CMakeFiles/libobs.dir/graphics/axisang.c.o
[  5%] Building C object libobs/CMakeFiles/libobs.dir/graphics/vec4.c.o
[  6%] Building C object libobs/CMakeFiles/libobs.dir/graphics/vec2.c.o
[  6%] Building C object libobs/CMakeFiles/libobs.dir/graphics/libnsgif/libnsgif.c.o
[  6%] Building C object libobs/CMakeFiles/libobs.dir/graphics/texture-render.c.o
[  6%] Building C object libobs/CMakeFiles/libobs.dir/graphics/image-file.c.o
[  7%] Building C object libobs/CMakeFiles/libobs.dir/graphics/bounds.c.o
[  7%] Building C object libobs/CMakeFiles/libobs.dir/graphics/matrix3.c.o
[  7%] Building C object libobs/CMakeFiles/libobs.dir/graphics/matrix4.c.o
[  7%] Building C object libobs/CMakeFiles/libobs.dir/graphics/vec3.c.o
[  7%] Building C object libobs/CMakeFiles/libobs.dir/graphics/graphics.c.o
[  8%] Building C object libobs/CMakeFiles/libobs.dir/graphics/shader-parser.c.o
[  8%] Building C object libobs/CMakeFiles/libobs.dir/graphics/plane.c.o
[  8%] Building C object libobs/CMakeFiles/libobs.dir/graphics/effect.c.o
[  8%] Building C object libobs/CMakeFiles/libobs.dir/graphics/math-extra.c.o
[  9%] Linking CXX executable obs-browser-page
/usr/bin/ld: /home/mido/cef_binary_4280_linux64/Release/libcef.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/obs-browser/CMakeFiles/obs-browser-page.dir/build.make:131: plugins/obs-browser/obs-browser-page] Error 1
make[1]: *** [CMakeFiles/Makefile2:1521: plugins/obs-browser/CMakeFiles/obs-browser-page.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  9%] Building C object libobs/CMakeFiles/libobs.dir/graphics/graphics-imports.c.o
[ 10%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-io.c.o
[ 10%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-fourcc.c.o
[ 10%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-matrices.c.o
[ 10%] Building C object libobs/CMakeFiles/libobs.dir/media-io/audio-io.c.o
[ 11%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-frame.c.o
[ 11%] Building C object libobs/CMakeFiles/libobs.dir/media-io/format-conversion.c.o
[ 11%] Building C object libobs/CMakeFiles/libobs.dir/media-io/audio-resampler-ffmpeg.c.o
[ 11%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-scaler-ffmpeg.c.o
[ 11%] Building C object libobs/CMakeFiles/libobs.dir/media-io/media-remux.c.o
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/array-serializer.c.o
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/file-serializer.c.o
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/base.c.o
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/platform.c.o
/home/mido/obs-studio/libobs/util/base.c: In function ‘bcrash’:
/home/mido/obs-studio/libobs/util/base.c:114:1: warning: ‘noreturn’ function does return
  114 | }
      | ^
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/cf-lexer.c.o
[ 13%] Building C object libobs/CMakeFiles/libobs.dir/util/bmem.c.o
[ 13%] Building C object libobs/CMakeFiles/libobs.dir/util/config-file.c.o
[ 13%] Building C object libobs/CMakeFiles/libobs.dir/util/lexer.c.o
[ 13%] Building C object libobs/CMakeFiles/libobs.dir/util/task.c.o
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/util/dstr.c.o
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/util/utf8.c.o
/home/mido/obs-studio/libobs/util/utf8.c: In function ‘wchar_to_utf8’:
/home/mido/obs-studio/libobs/util/utf8.c:292:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  292 |   if (*w < 0) {
      |          ^
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/util/crc32.c.o
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/util/text-lookup.c.o
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/util/cf-parser.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/util/profiler.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/util/bitstream.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/obs-nix.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/obs-nix-platform.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/obs-nix-x11.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/util/threading-posix.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/util/pipe-posix.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/util/platform-nix.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/obs-nix-wayland.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/platform-nix-dbus.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/platform-nix-portal.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/obs-audio-controls.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/obs-avc.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/obs-encoder.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/obs-service.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/obs-source.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/obs-source-deinterlace.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/obs-source-transition.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/obs-output.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs-output-delay.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs-properties.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs-data.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs-missing-files.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/obs-hotkey.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/obs-hotkey-name-map.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/obs-module.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/obs-display.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-view.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-scene.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-audio.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-video-gpu-encode.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-video.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-wrapper.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-enum-devices.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-monitoring-available.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/pulse/pulseaudio-output.c.o
[ 22%] Linking C shared library libobs.so
[ 22%] Built target libobs
make: *** [Makefile:152: all] Error 2
 

Tuna

Member
# Note Ubuntu 20.04/Debian 10 must set ENABLE_PIPEWIRE=OFF and do not support wayland capture.

It's probably a typo but it's kinda misleading for newbies like me, please correct it.

[..]

/usr/bin/ld: /home/mido/cef_binary_4280_linux64/Release/libcef.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/obs-browser/CMakeFiles/obs-browser-page.dir/build.make:131: plugins/obs-browser/obs-browser-page] Error 1
make[1]: *** [CMakeFiles/Makefile2:1521: plugins/obs-browser/CMakeFiles/obs-browser-page.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[/CODE]

It is not a typo. The option is called "ENABLE_PIPEWIRE". If you use a CMake GUI that is also its name it can be found under.

On the command line you tell it to set this option. That is done via the -D switch. Treat this as "-D ENABLE_PIPEWIRE=FALSE", the space is just often left out.


The other error complains about your CEF binary. Looks like you try to link the x86_64 CEF version to your aarch64 build. That is not going to work. You will need an aarch64 build of CEF.
 

TheRedM

New Member
It is not a typo. The option is called "ENABLE_PIPEWIRE". If you use a CMake GUI that is also its name it can be found under.

On the command line you tell it to set this option. That is done via the -D switch. Treat this as "-D ENABLE_PIPEWIRE=FALSE", the space is just often left out.


The other error complains about your CEF binary. Looks like you try to link the x86_64 CEF version to your aarch64 build. That is not going to work. You will need an aarch64 build of CEF.
Thank you for the explanation, now i get it, if you can provide me with links where i can start from that would be very helpful
 

Tuna

Member
Linux AARCH64 is not an official binary target of the OBS team (afaik). So I don't know if these CEF builds exists somewhere from OBS itself. If not you you will need to look elsewhere for them, or build it yourself. Note though that CEF is a beast and chances are high that you will face several problems, crashes and/or fires while trying to make it work.
 

TheRedM

New Member
Linux AARCH64 is not an official binary target of the OBS team (afaik). So I don't know if these CEF builds exists somewhere from OBS itself. If not you you will need to look elsewhere for them, or build it yourself. Note though that CEF is a beast and chances are high that you will face several problems, crashes and/or fires while trying to make it work.
Ohhh i see, thank you very much for the informations, i'm doing everything on a VPS but that's not something i can deal with at this level, maybe in the upcoming days, only one question, is there a working obs build with browser source enabled for arm64? I looked everywhere i couldn't find it, and the one for Arm64 from the official PPA does it come with browser source? Because i installed it but the browser source was messing, i'm doing all this because i can't get my project going without browser source, thank you again.
 

Tuna

Member
I don't think the PPA offers builds for AARCH64 (see above). So most likely the PPA silently didn't provide anything for you and you installed the Ubuntu package which does not have browser source. People spent a lot of time on x86_64 to make the browser work and probably a lot of work being done can be re-used for AARCH64, it needs to be done, fixed and tested. Currently the OBS community does not spend much time on the Linux AARCH64 target, so unless you contract someone to fix it for you that is something you have to do yourself.
 

TheRedM

New Member
I don't think the PPA offers builds for AARCH64 (see above). So most likely the PPA silently didn't provide anything for you and you installed the Ubuntu package which does not have browser source. People spent a lot of time on x86_64 to make the browser work and probably a lot of work being done can be re-used for AARCH64, it needs to be done, fixed and tested. Currently the OBS community does not spend much time on the Linux AARCH64 target, so unless you contract someone to fix it for you that is something you have to do yourself.
I actually made it work 2 days ago using this https://github.com/bazukas/obs-qtwebkit it's not for recent obs version but somehow worked! I will just go back to it until obs arm64 version gets it officially, i hope it's stable enough for long hours of streaming, thanks.
 

jpegstripes

New Member
Hi, I just made an account to ask about this - I was able to install OBS on a Raspberry Pi 5 (Ubuntu 23.10 arm64) but it didn't come with a Browser Source option, which I would really like to have.

@TheRedM did you end up learning how to create a Browser Source window?

@Tuna do you happen to know if there's been any progress made on making this more available? I'm not sure how I'd go about building it.
 
Top