Cannot build libwebrtc for libmediasoupclient

I’ve followed the installation instructions for libmediasoupclient on my Mac but I am getting the following error after executing “ninja -C out/m84” to build libwebrtc:

./../test/testsupport/ error: non-void function does not return a value [-Werror,-Wreturn-type]

I’ve checked the file and there is indeed no return value:

PerfTestResultWriter* CreateHistogramWriter() {
  RTC_NOTREACHED() << "Cannot run perf tests with rtc_enable_protobuf = false. "
                      "Perf write results as protobufs.";

However, I didn’t experience this issue 3 weeks ago. Did something change? Has anyone else encountered this issue and solved it?

I’ve just checked out to branch 4044 (m83) and tried building libwebrtc again and I am no longer getting this issue.

whoops 4044 is m81, I am going to try 4103 (m83)

Ok I am getting the same error for m83

Hmm… I’ve edited the cc file by returning a nullptr and I was able to build libwebrtc but this doesn’t seem to be ideal?

Documentation says which exact libwebrtc version you are supposed to link

Yes I was using m84 as per the documentation. Just that I got the error when building it using ninja. I am still getting the error unless I add a line to the file to return a nullptr.

But this involves editing a source file of libwebrtc which I don’t know whether is ideal in the long run.

Looks like you are compiling the tests, why? Which options are you providing to gn gen?

Try not compiling the tests which are not needed for libmediasoupclient. See gn gen examples here

I was using the same options in the documentation.

gn gen out/m84 --args='is_debug=false is_component_build=false is_clang=true rtc_include_tests=false rtc_use_h264=true rtc_enable_protobuf=false use_rtti=true mac_deployment_target="10.11" use_custom_libcxx=false'

I’m getting the same error while trying to compile on aws ec2.
adding return nullptr; as suggested, solves the problem.
I’m too using ‘rtc_include_tests=false’ in gn gen

libmediasoupclient installation docs have been updated not to use rtc_enable_protobuf=false gn gen argument, which was causing the problem.

1 Like