mediasoup build fails

over the weekend our mediasoup build just started to fail out of the blue and without any changes on our side.

any idea what is wrong?

version is 3.9.17

      #10 49.48 [997/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_poll.c.o
15:47:02
      #10 49.48 [998/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_pipe.c.o
15:47:02
      #10 49.48 [999/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_process.c.o
15:47:02
      #10 49.48 [1000/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_random-devurandom.c.o
15:47:02
      #10 49.48 [1001/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o
15:47:02
      #10 49.48 FAILED: subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o 
15:47:02
      #10 49.48 cc -Isubprojects/libuv-v1.43.0/libuv.a.p -Isubprojects/libuv-v1.43.0 -I../../../subprojects/libuv-v1.43.0 -I../../../subprojects/libuv-v1.43.0/include -I../../../subprojects/libuv-v1.43.0/src -fdiagnostics-color=always -DNDEBUG -std=c89 -O3 -fPIC -pthread -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112 -MD -MQ subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -MF subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o.d -o subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -c ../../../subprojects/libuv-v1.43.0/src/unix/stream.c
15:47:02
      #10 49.48 ../../../subprojects/libuv-v1.43.0/src/unix/stream.c: In function ‘uv__write’:
15:47:02
      #10 49.48 ../../../subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: error: C++ style comments are not allowed in ISO C90
15:47:02
      #10 49.48    // XXX(jwn): this must call uv__stream_flush_write_queue(stream, n) here, since we won't generate any more events
15:47:02
      #10 49.48    ^
15:47:02
      #10 49.48 ../../../subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: error: (this will be reported only once per input file)
15:47:02
      #10 49.48 [1002/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_fs.c.o
15:47:02
      #10 49.48 [1003/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_signal.c.o
15:47:02
      #10 49.48 [1004/1321] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_tcp.c.o
15:47:02
      #10 49.48 ninja: build stopped: subcommand failed.
15:47:02
      #10 49.48 make: *** [Makefile:168: mediasoup-worker] Error 1
15:47:02
      #10 49.48 make: Leaving directory '/usr/src/app/server/node_modules/mediasoup/worker'
15:47:
1 Like

Yeah we are facing the same issue when running npm install locally as well as in CI. Here is the link of it failing in our github action link

i guess it’s this problem Fix libuv build by vpalmisano · Pull Request #857 · versatica/mediasoup · GitHub

I thought the Meson rollback in 3.10.1 would solve this for us, but now I’m getting this on both Mint 20.3 and whatever Github Actions runs:

code 1
npm ERR! path /home/kyle/Development/Forks/xrengine/node_modules/mediasoup
npm ERR! command failed
npm ERR! command sh -c node npm-scripts.js postinstall
npm ERR! npm-scripts.js [INFO] running task "postinstall"
npm ERR! npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
npm ERR! npm-scripts.js [INFO] running task "worker:build"
npm ERR! npm-scripts.js [INFO] executing command: make -C worker
npm ERR! make: Entering directory '/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker'
npm ERR! # Updated pip and setuptools are needed for meson
npm ERR! # `--system` is not present everywhere and is only needed as workaround for
npm ERR! # Debian-specific issue (copied from
npm ERR! # https://github.com/gluster/gstatus/pull/33), fallback to command without
npm ERR! # `--system` if the first one fails.
npm ERR! /usr/bin/python3 -m pip install --system --target=/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/pip pip setuptools || \
npm ERR! 	/usr/bin/python3 -m pip install --target=/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/pip pip setuptools || \
npm ERR! 	echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
npm ERR! Collecting pip
npm ERR!   Using cached pip-22.1.2-py3-none-any.whl (2.1 MB)
npm ERR! Collecting setuptools
npm ERR!   Using cached setuptools-63.1.0-py3-none-any.whl (1.2 MB)
npm ERR! Installing collected packages: setuptools, pip
npm ERR! Successfully installed pip-22.1.2 setuptools-63.1.0
npm ERR! # Install `meson` and `ninja` using `pip` into custom location, so we don't
npm ERR! # depend on system-wide installation.
npm ERR! /usr/bin/python3 -m pip install --upgrade --target=/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/pip  meson==0.61.5 ninja
npm ERR! Collecting meson==0.61.5
npm ERR!   Using cached meson-0.61.5-py3-none-any.whl (862 kB)
npm ERR! Collecting ninja
npm ERR!   Using cached ninja-1.10.2.3-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (108 kB)
npm ERR! Installing collected packages: ninja, meson
npm ERR! Successfully installed meson-0.61.5 ninja-1.10.2.3
npm ERR! /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/pip/bin/meson setup \
npm ERR! 	--prefix /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release \
npm ERR! 	--bindir '' \
npm ERR! 	--libdir '' \
npm ERR! 	--buildtype release \
npm ERR! 	-Db_ndebug=true \
npm ERR! 	-Db_pie=true \
npm ERR! 	-Db_staticpic=true \
npm ERR! 	--reconfigure \
npm ERR! 	"" \
npm ERR! 	/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release/build || \
npm ERR! 	/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/pip/bin/meson setup \
npm ERR! 		--prefix /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release \
npm ERR! 		--bindir '' \
npm ERR! 		--libdir '' \
npm ERR! 		--buildtype release \
npm ERR! 		-Db_ndebug=true \
npm ERR! 		-Db_pie=true \
npm ERR! 		-Db_staticpic=true \
npm ERR! 		"" \
npm ERR! 		/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release/build
npm ERR! The Meson build system
npm ERR! Version: 0.61.5
npm ERR! Source dir: /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker
npm ERR! Build dir: /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release/build
npm ERR! Build type: native build
npm ERR! Project name: mediasoup-worker
npm ERR! Project version: undefined
npm ERR! C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
npm ERR! C linker for the host machine: cc ld.bfd 2.34
npm ERR! C++ compiler for the host machine: c++ (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
npm ERR! C++ linker for the host machine: c++ ld.bfd 2.34
npm ERR! Host machine cpu family: x86_64
npm ERR! Host machine cpu: x86_64
npm ERR! 
npm ERR! meson.build:29:3: ERROR: Tried to access unknown option 'ms_log_trace'.
npm ERR! 
npm ERR! A full log can be found at /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release/build/meson-logs/meson-log.txt
npm ERR! make: Leaving directory '/home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker'
npm ERR! Usage:   
npm ERR!   /usr/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
npm ERR!   /usr/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <vcs project url> ...
npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <local project path> ...
npm ERR!   /usr/bin/python3 -m pip install [options] <archive url/path> ...
npm ERR! 
npm ERR! no such option: --system
npm ERR! Directory does not contain a valid build tree:
npm ERR! /home/kyle/Development/Forks/xrengine/node_modules/mediasoup/worker/out/Release/build
npm ERR! make: *** [Makefile:85: setup] Error 1

1 Like

We also try v3.10.1 and get the same error in some Linux distros (debian, ubuntu, mint). The error seems to be: npm ERR! meson.build:29:3: ERROR: Tried to access unknown option 'ms_log_trace'.

We have a similar problem. If disable ms_log_trace, it crashes on ms_log_file_line. Without these options, the worker builds without problems, but it does not work in CI

Fixed in mediasoup v3.10.2.

1 Like

3.10.3 is even better