Error building mediasoup-broadcaster-demo [solved]

I’m, I’m trying to build mediasoup-broadcaster-demo,
I launched the following command:
cmake . -Bbuild -DLIBWEBRTC_INCLUDE_PATH:PATH=/home/foo/src/webrtc-checkout/src -DLIBWEBRTC_BINARY_PATH:PATH=/home/foo/src/webrtc-checkout/src/out/m84/obj -DCMAKE_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR:PATH=/usr/include/

and
make -C build

but after 1 second I obtain

make: Entering directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[1]: Entering directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[2]: Entering directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[2]: Entering directory '/home/manangel/mediasoup-broadcaster-demo/build'
[  0%] Building CXX object libwebrtc/CMakeFiles/webrtc_broadcaster.dir/api/test/create_frame_generator.cc.o
In file included from /home/manangel/mediasoup-broadcaster-demo/deps/libwebrtc/api/test/create_frame_generator.cc:11:
/home/manangel/mediasoup-broadcaster-demo/deps/libwebrtc/api/test/create_frame_generator.h:18:10: fatal error: absl/types/optional.h: No such file or directory
   18 | #include "absl/types/optional.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [libwebrtc/CMakeFiles/webrtc_broadcaster.dir/build.make:63: libwebrtc/CMakeFiles/webrtc_broadcaster.dir/api/test/create_frame_generator.cc.o] Error 1
make[2]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[1]: *** [CMakeFiles/Makefile2:1379: libwebrtc/CMakeFiles/webrtc_broadcaster.dir/all] Error 2
make[1]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
make: *** [Makefile:130: all] Error 2
make: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
manangel@chromium:~/mediasoup-broadcaster-demo$

what am I doing wrong?
Thanks

Angelo

Make sure you’re using the correct libwebrtc version.

I’m following this guide about libwebrtc


is it correct?

That’s the installation guide. You need to use branch-heads/4147

I’ve used branch-heads/4147
I copied the installation of libwebrtc to be sure that I’m using the right version.

Other ideas?

thanks

I found the error, I linked the wrong webrtc folder.
Angelo

I have, now this error:

[ 81%] Building CXX object libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Logger.cpp.o
In file included from /home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:3:
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:55:8: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
   55 |   enum class LogLevel : uint8_t
      |   ~~~~ ^~~~~
      |        -----
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:55:14: error: use of enum ‘LogLevel’ without previous declaration
   55 |   enum class LogLevel : uint8_t
      |              ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:55:25: error: ‘uint8_t’ was not declared in this scope; did you mean ‘u_int8_t’?
   55 |   enum class LogLevel : uint8_t
      |                         ^~~~~~~
      |                         u_int8_t
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:56:3: error: default member initializer for unnamed bit-field
   56 |   {
      |   ^
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:67:23: error: ‘LogLevel’ has not been declared
   67 |    virtual void OnLog(LogLevel level, char* payload, size_t len) = 0;
      |                       ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:72:15: error: ‘LogLevel’ has not been declared
   72 |    void OnLog(LogLevel level, char* payload, size_t len) override;
      |               ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:75:27: error: ‘LogLevel’ has not been declared
   75 |   static void SetLogLevel(LogLevel level);
      |                           ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/include/Logger.hpp:80:10: error: ‘LogLevel’ does not name a type
   80 |   static LogLevel logLevel;
      |          ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:12:10: error: ‘LogLevel’ in ‘class mediasoupclient::Logger’ does not name a type
   12 |  Logger::LogLevel Logger::logLevel = Logger::LogLevel::LOG_NONE;
      |          ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:16:35: error: variable or field ‘SetLogLevel’ declared void
   16 |  void Logger::SetLogLevel(Logger::LogLevel level)
      |                                   ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:16:35: error: ‘LogLevel’ is not a member of ‘mediasoupclient::Logger’
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:33:40: error: variable or field ‘OnLog’ declared void
   33 |  void Logger::DefaultLogHandler::OnLog(LogLevel /*level*/, char* payload, size_t /*len*/)
      |                                        ^~~~~~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:33:40: error: ‘LogLevel’ was not declared in this scope
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:33:60: error: expected primary-expression before ‘char’
   33 |  void Logger::DefaultLogHandler::OnLog(LogLevel /*level*/, char* payload, size_t /*len*/)
      |                                                            ^~~~
/home/manangel/mediasoup-broadcaster-demo/deps/libmediasoupclient/src/Logger.cpp:33:89: error: expected primary-expression before ‘)’ token
   33 | dler::OnLog(LogLevel /*level*/, char* payload, size_t /*len*/)
      |                                                              ^

make[2]: *** [libmediasoupclient/CMakeFiles/mediasoupclient.dir/build.make:128: libmediasoupclient/CMakeFiles/mediasoupclient.dir/src/Logger.cpp.o] Error 1
make[2]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
make[1]: *** [CMakeFiles/Makefile2:1271: libmediasoupclient/CMakeFiles/mediasoupclient.dir/all] Error 2
make[1]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'
make: *** [Makefile:130: all] Error 2
make: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build'

do you know why?
Thanks

Are you using the last mediasoup-broadcaster-demo version?

That problem was fixed some time ago.

the V3 branch,
is it ok?

This exact commit fixes that issue: https://github.com/versatica/mediasoup-broadcaster-demo/commit/17e026e11defbc8db3c901c85ef0457fe3ad2863

I can’t say why it may be failing four you.

with this commit i have this error:

[ 81%] Linking CXX executable broadcaster
/usr/bin/ld: /home/manangel/webrtc-checkout/src/out/m84/obj/libwebrtc.a(latebindingsymboltable_linux.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/broadcaster.dir/build.make:123: broadcaster] Error 1
make[2]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build/build'
make[1]: *** [CMakeFiles/Makefile2:455: CMakeFiles/broadcaster.dir/all] Error 2
make[1]: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build/build'
make: *** [Makefile:130: all] Error 2
make: Leaving directory '/home/manangel/mediasoup-broadcaster-demo/build/build'

thanks for your help!

Changing uint8_t to u_int8_t I obtain the error about

undefined reference to symbol 'dlclose@@GLIBC_2.2.5'

Do I need to use a cmake flag?
Thanks

Please look at the forum for that very exact error

I compiled the demo,
Now I’m trying to execute it:

SERVER_URL=https://localhost:3000 ROOM_ID=broadcaster VERIFY_SSL=false build/broadcaster
[DEBUG] mediasoupclient::Initialize() | mediasoupclient v3.0.8
[INFO] welcome to mediasoup broadcaster app!

[INFO] verifying that room ‘broadcaster’ exists…
[ERROR] unable to retrieve room info [status code:404, body:"

Error
Cannot GET /rooms/broadcaster
"]

Where do I commit the error?
thanks

At some time you should start reading the code of the demo server to understand how it works instead of asking immediately.

ok, i found the error, that is the port.
Thank you for your help

Angelo