# mediasoup build fails

**URL:** <https://mediasoup.discourse.group/t/mediasoup-build-fails/4345>\
**Category:** mediasoup libraries\
**Created:** [July 4, 2022, 3:50pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345 "2022-07-04T15:50:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [July 4, 2022, 3:50pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/1 "2022-07-04T15:50:13Z")

</div>

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

```auto
      #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:

```

---

<div class="post-metadata">

**Author:** ![hanzlamateen](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/hanzlamateen/32/1646_2.png) [@hanzlamateen](https://mediasoup.discourse.group/u/hanzlamateen)\
**Post date:** [July 4, 2022, 4:26pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/2 "2022-07-04T16:26:11Z")

</div>

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](https://github.com/XRFoundation/XREngine/runs/7173489800?check_suite_focus=true)

---

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [July 4, 2022, 4:29pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/3 "2022-07-04T16:29:30Z")

</div>

i guess it’s this problem [Fix libuv build by vpalmisano · Pull Request #857 · versatica/mediasoup · GitHub](https://github.com/versatica/mediasoup/pull/857)

---

<div class="post-metadata">

**Author:** ![kbaran](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kbaran/32/1430_2.png) [@kbaran](https://mediasoup.discourse.group/u/kbaran)\
**Post date:** [July 4, 2022, 6:56pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/4 "2022-07-04T18:56:30Z")

</div>

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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![miguelrcDEV](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/miguelrcdev/32/1319_2.png) [@miguelrcDEV](https://mediasoup.discourse.group/u/miguelrcDEV)\
**Post date:** [July 5, 2022, 6:19am UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/5 "2022-07-05T06:19:36Z")

</div>

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'.`

---

<div class="post-metadata">

**Author:** ![panov-va](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/panov-va/32/1649_2.png) [@panov-va](https://mediasoup.discourse.group/u/panov-va)\
**Post date:** [July 5, 2022, 7:27am UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/6 "2022-07-05T07:27:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![panov-va](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/panov-va/32/1649_2.png) [@panov-va](https://mediasoup.discourse.group/u/panov-va)\
**Post date:** [July 5, 2022, 9:01am UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/8 "2022-07-05T09:01:20Z")

</div>

Fixed in mediasoup v3.10.2.

---

<div class="post-metadata">

**Author:** ![skavish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/skavish/32/1018_2.png) [@skavish](https://mediasoup.discourse.group/u/skavish)\
**Post date:** [July 5, 2022, 2:35pm UTC](https://mediasoup.discourse.group/t/mediasoup-build-fails/4345/9 "2022-07-05T14:35:53Z")

</div>

3.10.3 is even better
