I’m trying to develop a C++ SFU using libmediasoupclient v3. My development server is a Raspberry Pi 4 (running Ubuntu 20.04), while my production server is running an x86 processor.
So I have tried to install Mediasoup on the RPI using the offical instructions, but failed while trying to build WebRTC. Then I tried cross-compiling WebRTC on another x86 server, but failed again (see error below) and now I have no idea on how to progress further. I also have no idea on whether or how to cross-compile Mediasoup.
[1658/3239] CC obj/third_party/libaom/libaom/variance.o
ninja: build stopped: subcommand failed.
I have no idea how to debug this error or whether there is a log. (Note: The cross-compiling server only has 2GB RAM so that may be the issue)
I understand that this forum is about Mediasoup, but I have thrown in some questions regarding the building of WebRTC as well in case they are trivial to answer.
My questions are:
- Why is there no libmediasoup / WebRTC package (apt, snap, …)?
- Does Mediasoup even support ARM?
- How do I cross-compile WebRTC for libmediasoup (using the right branch) / What did I do wrong?
- How do I (cross-?)compile libmediasoup afterwards?
Here is my current approach using these sources:
# see: https://github.com/mpromonet/webrtc-streamer/wiki/Cross-compile-WebRTC-for-Raspberry-Pi # Setup some stuff sudo su cd /home/myuser/ apt install git mkdir cross-compile/ cd cross-compile/ # Get depot_tools git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools nano /etc/profile.d/depot_tools.sh + export PATH=$PATH:/opt/depot_tools > C + x # see: https://sourceforge.net/projects/raspberry-pi-cross-compilers # Get the cross-compiler # The URL from the blog was outdated, so I just went for the latest version here wget -O- https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%203A%2B%2C%203B%2B%2C%204/cross-gcc-10.2.0-pi_3%2B.tar.gz | sudo tar xz -C /opt nano /etc/profile.d/arm_tools.sh + export PATH=$PATH:/opt/cross-pi-gcc-10.2.0-2/bin > C + x source /etc/profile # Get WebRTC fetch --no-history --nohooks webrtc ./src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm # see: https://mediasoup.org/documentation/v3/libmediasoupclient/installation/ chown -R myuser:myuser /home/myuser/cross-compile/ chown -R myuser:myuser /opt/depot_tools/ # Switch to myuser exit gclient sync cd src/ git checkout -b m84 refs/remotes/branch-heads/4147 gclient sync ./build/install-build-deps.sh --arm # I tried to apply common sense here (merging the args from multiple sources), since I have no idea what these args actually mean / do gn gen out/m84 --args='is_debug=false is_clang=false target_cpu="arm" is_component_build=false rtc_use_h264=true rtc_include_tests=false rtc_build_examples=false use_rtti=true treat_warnings_as_errors=false use_custom_libcxx=false use_ozone=true' ninja -C out/m84 # Theorethically move on to (cross-?)compiling mediasoup # Move .so to target server /lib/ directory?
Any hint or answer on just some question(s) would be much apprichiated!