Error with doc

the newest mediasoup-broadcaster-demo need webrtc m94. So I follow mediasoup :: Installation。I got some error。

make: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[1]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[  9%] Built target webrtc_broadcaster
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[  9%] Built target sdptransform
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[ 19%] Built target mediasoupclient
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[ 76%] Built target libcurl
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[ 80%] Built target cpr
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[2]: Entering directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
[ 80%] Linking CXX executable broadcaster
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_alsa_linux.o): in function `webrtc::AudioDeviceLinuxALSA::Terminate() [clone .part.0]':
audio_device_alsa_linux.cc:(.text._ZN6webrtc20AudioDeviceLinuxALSA9TerminateEv.part.0+0x51): undefined reference to `XCloseDisplay'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_alsa_linux.o): in function `webrtc::AudioDeviceLinuxALSA::KeyPressed() const':
audio_device_alsa_linux.cc:(.text._ZNK6webrtc20AudioDeviceLinuxALSA10KeyPressedEv+0x35): undefined reference to `XQueryKeymap'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_alsa_linux.o): in function `webrtc::AudioDeviceLinuxALSA::Init()':
audio_device_alsa_linux.cc:(.text._ZN6webrtc20AudioDeviceLinuxALSA4InitEv+0x53): undefined reference to `XOpenDisplay'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_pulse_linux.o): in function `webrtc::AudioDeviceLinuxPulse::KeyPressed() const':
audio_device_pulse_linux.cc:(.text._ZNK6webrtc21AudioDeviceLinuxPulse10KeyPressedEv+0x35): undefined reference to `XQueryKeymap'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_pulse_linux.o): in function `webrtc::AudioDeviceLinuxPulse::Terminate() [clone .part.0]':
audio_device_pulse_linux.cc:(.text._ZN6webrtc21AudioDeviceLinuxPulse9TerminateEv.part.0+0x7d): undefined reference to `XCloseDisplay'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(audio_device_pulse_linux.o): in function `webrtc::AudioDeviceLinuxPulse::Init()':
audio_device_pulse_linux.cc:(.text._ZN6webrtc21AudioDeviceLinuxPulse4InitEv+0x63): undefined reference to `XOpenDisplay'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::FdWatchController::StopWatchingFileDescriptor()':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController26StopWatchingFileDescriptorEv+0x1c): undefined reference to `g_source_destroy'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController26StopWatchingFileDescriptorEv+0x25): undefined reference to `g_source_unref'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::~MessagePumpGlib()':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibD2Ev+0x20): undefined reference to `g_source_destroy'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibD2Ev+0x2a): undefined reference to `g_source_unref'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibD2Ev+0x76): undefined reference to `g_main_context_pop_thread_default'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibD2Ev+0x80): undefined reference to `g_main_context_unref'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::Run(base::MessagePump::Delegate*)':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib3RunEPNS_11MessagePump8DelegateE+0x6b): undefined reference to `g_main_context_iteration'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::MessagePumpGlib()':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0x70): undefined reference to `g_main_context_new'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0x7c): undefined reference to `g_main_context_push_thread_default'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0xb8): undefined reference to `g_source_new'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0xcd): undefined reference to `g_source_add_poll'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0xdb): undefined reference to `g_source_set_priority'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0xe9): undefined reference to `g_source_set_can_recurse'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0xf6): undefined reference to `g_source_attach'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlibC2Ev+0x109): undefined reference to `g_main_context_default'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::FdWatchController::InitOrUpdate(int, int, base::WatchableIOMessagePumpPosix::FdWatcher*)':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController12InitOrUpdateEiiPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0x6b): undefined reference to `g_source_new'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController12InitOrUpdateEiiPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0x7b): undefined reference to `g_source_add_poll'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController12InitOrUpdateEiiPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0x89): undefined reference to `g_source_set_can_recurse'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController12InitOrUpdateEiiPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0x98): undefined reference to `g_source_set_callback'
/usr/bin/ld: message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController12InitOrUpdateEiiPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0xa6): undefined reference to `g_source_set_priority'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::FdWatchController::Attach(base::MessagePumpGlib*)':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib17FdWatchController6AttachEPS0_+0x22): undefined reference to `g_source_attach'
/usr/bin/ld: /home/bizconf/develop/webrtc/webrtc-checkout/src/out/m94/obj/libwebrtc.a(message_pump_glib.o): in function `base::MessagePumpGlib::WatchFileDescriptor(int, bool, int, base::MessagePumpGlib::FdWatchController*, base::WatchableIOMessagePumpPosix::FdWatcher*)':
message_pump_glib.cc:(.text._ZN4base15MessagePumpGlib19WatchFileDescriptorEibiPNS0_17FdWatchControllerEPNS_27WatchableIOMessagePumpPosix9FdWatcherE+0x45): undefined reference to `g_source_attach'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/broadcaster.dir/build.make:154: broadcaster] Error 1
make[2]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make[1]: *** [CMakeFiles/Makefile2:453: CMakeFiles/broadcaster.dir/all] Error 2
make[1]: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'
make: *** [Makefile:130: all] Error 2
make: Leaving directory '/home/bizconf/develop/mediasoup-broadcaster-demo/build'

I found there should some thing to be update.

  • git checkout -b m94 refs/remotes/branch-heads/4147 is wrong。The branch-heads of m94 is 4606。
  • some gen args have changed in m94。Change use_ozone=true to use_x11=false use_glib=false
gn gen out/m94 --args='is_debug=false is_component_build=false is_clang=false rtc_include_tests=false rtc_use_h264=true use_rtti=true use_custom_libcxx=false treat_warnings_as_errors=false use_x11=false use_glib=false'
2 Likes

It really helped!
Thank you.