I am on OSX 10.15. I have successfully built libwebrtc at m84 following the instructions in the docs. And it appears that the broadcaster demo is actually building. However, I am getting some strange warnings I would like to clear up. There are a lot of them but they generally take the form:
ld: warning: direct access in function 'webrtc::VP9EncoderImpl::GetEncoderInfo() const' from file '/Users/alexciarlillo/code/src/googlesource/webrtc-checkout/src/out/m84/obj/libwebrtc.a(vp9_impl.o)' to global weak symbol 'void rtc::webrtc_checks_impl::LogStreamer<>::Call<>(char const*, int, char const*)::t' from file 'CMakeFiles/broadcaster.dir/src/Broadcaster.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
So a quick run down of my steps:
After setting up libwebrtc deps, checking out m84, etc. Build it like:
$ gn gen out/m84 --args='is_debug=false is_component_build=false is_clang=true rtc_include_tests=false rtc_use_h264=true use_rtti=true mac_deployment_target="10.11" use_custom_libcxx=false'
Checkout mediasoup-broadcaster-demo. Made some CMake changes to pull cpr as suggested, e.g.:
include(FetchContent) FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/whoshuu/cpr.git GIT_TAG 4f0a0bac4feabc74dee4ef1f634ff0bf5dc7efcc) # latest master FetchContent_MakeAvailable(cpr)
(this works great btw rather than having cpr directly in the repo as a dep)
cmake . -Bbuild \ ─╯ -DLIBWEBRTC_INCLUDE_PATH:PATH=/Users/alexciarlillo/code/googlesource/webrtc-checkout/src \ -DLIBWEBRTC_BINARY_PATH:PATH=/Users/alexciarlillo/code/googlesource/webrtc-checkout/src/out/m84/obj \ -DCMAKE_USE_OPENSSL=ON \ -DOPENSSL_ROOT_DIR=/usr/local/Cellarfirstname.lastname@example.org/1.1.1h \ -DOPENSSL_CRYPTO_LIBRARY=/usr/local/Cellaremail@example.com/1.1.1h/lib/libcrypto.1.1.dylib
All good there.
make -C build
This is where I get the warnings above. It does build though and I can run it (but it doesn’t quite work):
❯ SERVER_URL=https://v3demo.mediasoup.org ROOM_ID=0prbwkxw build/broadcaster [DEBUG] mediasoupclient::Initialize() | mediasoupclient v3.1.1 [INFO] welcome to mediasoup broadcaster app! [INFO] verifying that room '0prbwkxw' exists... [ERROR] unable to retrieve room info [status code:404, body:"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /rooms/0prbwkxw was not found on this server.</p> </body></html> "]
Any ideas would be appreciated. Thanks