Having problems compiling both mediasoup-broadcaster-demo and libmediasoupclient on my Linux box:
Ubuntu 18.04
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
cmake version 3.14.4
I have installed webrtc at m84 as per the instructions here: https://mediasoup.org/documentation/v3/libmediasoupclient/installation.
Here the build errors for libmediasoupclient:
…
/usr/include/c++/7/bits/basic_string.h:6507:3: note: ‘std::__cxx11::stod’
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp: At global scope:
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:18:14: error: ‘string’ in namespace ‘webrtc::webrtc::std’ does not name a type
const std::string& id,
^~~~~~
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:19:14: error: ‘string’ in namespace ‘webrtc::webrtc::std’ does not name a type
const std::string& localId,
^~~~~~
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:20:14: error: ‘string’ in namespace ‘webrtc::webrtc::std’ does not name a type
const std::string& producerId,
^~~~~~
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp: In constructor ‘webrtc::webrtc::mediasoupclient::Consumer::Consumer(webrtc::webrtc::mediasoupclient::Consumer::PrivateListener*, webrtc::webrtc::mediasoupclient::Consumer::Listener*, const int&, const int&, const int&, webrtc::webrtc::webrtc::MediaStreamTrackInterface*, const json&, const json&)’:
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:24:59: error: class ‘webrtc::webrtc::mediasoupclient::Consumer’ does not have any field named ‘id’
: privateListener(privateListener), listener(listener), id(id), localId(localId),
^~
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:24:67: error: class ‘webrtc::webrtc::mediasoupclient::Consumer’ does not have any field named ‘localId’
: privateListener(privateListener), listener(listener), id(id), localId(localId),
^~~~~~~
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:25:5: error: class ‘webrtc::webrtc::mediasoupclient::Consumer’ does not have any field named ‘producerId’
producerId(producerId), track(track), rtpParameters(rtpParameters), appData(appData)
^~~~~~~~~~
In file included from /home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:7:0:
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp: In member function ‘void webrtc::webrtc::mediasoupclient::Consumer::Resume()’:
/home/sumitj/bodyline/third_party/libmediasoupclient/include/Logger.hpp:164:29: error: ‘snprintf’ is not a member of ‘webrtc::webrtc::std’
int loggerWritten = std::snprintf(Logger::buffer, Logger::bufferSize, “[ERROR]” _MSC_LOG_STR_DESC desc, _MSC_LOG_ARG, ## VA_ARGS );
^
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:82:3: note: in expansion of macro ‘MSC_ERROR’
MSC_ERROR(“consumer closed”);
^~~~~~~~~
/home/sumitj/bodyline/third_party/libmediasoupclient/include/Logger.hpp:164:29: note: suggested alternatives:
int loggerWritten = std::snprintf(Logger::buffer, Logger::bufferSize, “[ERROR]” _MSC_LOG_STR_DESC desc, _MSC_LOG_ARG, ## VA_ARGS );
^
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:82:3: note: in expansion of macro ‘MSC_ERROR’
MSC_ERROR(“consumer closed”);
^~~~~~~~~
In file included from /usr/include/c++/7/cstdio:42:0,
from /usr/include/c++/7/ext/string_conversions.h:43,
from /usr/include/c++/7/bits/basic_string.h:6361,
from /usr/include/c++/7/string:52,
from /home/sumitj/bodyline/third_party/libmediasoupclient/include/Exception.hpp:5,
from /home/sumitj/bodyline/third_party/libmediasoupclient/include/Consumer.hpp:4,
from /home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:4:
/usr/include/stdio.h:340:12: note: ‘snprintf’
extern int snprintf (char *__restrict __s, size_t __maxlen,
^~~~~~~~
/usr/include/stdio.h:340:12: note: ‘snprintf’
/usr/include/stdio.h:340:12: note: ‘snprintf’
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp: At global scope:
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:89:1: error: expected ‘}’ at end of input
} // namespace mediasoupclient
^
/home/sumitj/bodyline/third_party/libmediasoupclient/src/Consumer.cpp:89:1: error: expected ‘}’ at end of input
CMakeFiles/mediasoupclient.dir/build.make:62: recipe for target ‘CMakeFiles/mediasoupclient.dir/src/Consumer.cpp.o’ failed
make[2]: *** [CMakeFiles/mediasoupclient.dir/src/Consumer.cpp.o] Error 1
make[2]: Leaving directory ‘/home/sumitj/bodyline/third_party/libmediasoupclient/build’
CMakeFiles/Makefile2:72: recipe for target ‘CMakeFiles/mediasoupclient.dir/all’ failed
make[1]: *** [CMakeFiles/mediasoupclient.dir/all] Error 2
make[1]: Leaving directory ‘/home/sumitj/bodyline/third_party/libmediasoupclient/build’
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
make: Leaving directory ‘/home/sumitj/bodyline/third_party/libmediasoupclient/build’
…
=========== libmediasoupclient Build Configuration =============
– MEDIASOUPCLIENT_BUILD_TESTS = OFF
– MEDIASOUPCLIENT_LOG_TRACE = OFF
– MEDIASOUPCLIENT_LOG_DEV = OFF
– LIBWEBRTC_INCLUDE_PATH = /home/sumitj/webrtc-checkout-m84/src
– LIBWEBRTC_BINARY_PATH = /home/sumitj/webrtc-checkout-m84/src/out/m84/obj
Build errors for mediasoup-broadcaster-demo:
make: Entering directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
make[1]: Entering directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
make[2]: Entering directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
make[2]: Leaving directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
make[2]: Entering directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
[ 0%] Building CXX object libwebrtc/CMakeFiles/webrtc_broadcaster.dir/test/testsupport/ios_file_utils.mm.o
c++: error trying to exec ‘cc1objplus’: execvp: No such file or directory
libwebrtc/CMakeFiles/webrtc_broadcaster.dir/build.make:205: recipe for target ‘libwebrtc/CMakeFiles/webrtc_broadcaster.dir/test/testsupport/ios_file_utils.mm.o’ failed
make[2]: *** [libwebrtc/CMakeFiles/webrtc_broadcaster.dir/test/testsupport/ios_file_utils.mm.o] Error 1
make[2]: Leaving directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
CMakeFiles/Makefile2:1657: recipe for target ‘libwebrtc/CMakeFiles/webrtc_broadcaster.dir/all’ failed
make[1]: *** [libwebrtc/CMakeFiles/webrtc_broadcaster.dir/all] Error 2
make[1]: Leaving directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
make: Leaving directory ‘/home/sumitj/bodyline/third_party/mediasoup-broadcaster-demo/build’
I filed bugs (libmediasoupclient/issues/89 and mediasoup-broadcaster-demo/issues/11) but they were closed off saying that I should try to use cmake 14.4 which I was already using. There was also a suggestion of trying with “use_custom_libcxx=false” which I was already doing as per the documentation.
Any ideas on what am I missing here?