Cannot build rust mediasoup

While trying to build a project using rust mediasoup, I get:

ERROR: Subproject exists but has no meson.build file

I cannot seem to get the cargo build command to run. I’ve tried deleting the entire target folder and retrying, but it fails 100% of the time.

Here is my meson-log.txt file:

Build started at 2021-12-05T15:02:54.205044
Main binary: /usr/bin/python3
Build Options: -Db_pie=true -Db_staticpic=true -Dbuildtype=debug
Python system: Linux
The Meson build system
Version: 0.60.2
Source dir: /home/chosunone/.cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.0
Build dir: /home/chosunone/source/sfu-rust/target/debug/build/mediasoup-sys-62bad9506a995114/out/Debug
Build type: native build
Project name: mediasoup-worker
Project version: undefined
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/chosunone/source/sfu-rust/target/debug/build/mediasoup-sys-62bad9506a995114/out/Debug/meson-private/sanitycheckc.exe
C compiler for the host machine: cc (gcc 8.4.0 "cc (Ubuntu 8.4.0-3ubuntu2) 8.4.0")
C linker for the host machine: cc ld.bfd 2.34
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/chosunone/source/sfu-rust/target/debug/build/mediasoup-sys-62bad9506a995114/out/Debug/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: c++ (gcc 8.4.0 "c++ (Ubuntu 8.4.0-3ubuntu2) 8.4.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/chosunone/source/sfu-rust/target/debug/build/mediasoup-sys-62bad9506a995114/out/Debug/meson-private/sanitycheckc.exe
C compiler for the build machine: cc (gcc 8.4.0 "cc (Ubuntu 8.4.0-3ubuntu2) 8.4.0")
C linker for the build machine: cc ld.bfd 2.34
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/chosunone/source/sfu-rust/target/debug/build/mediasoup-sys-62bad9506a995114/out/Debug/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: c++ (gcc 8.4.0 "c++ (Ubuntu 8.4.0-3ubuntu2) 8.4.0")
C++ linker for the build machine: c++ ld.bfd 2.34
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64

meson.build:147:0: ERROR: Subproject exists but has no meson.build file

Please advise

Please use search on the forum next time.

I don’t know where to find those directories

I just created a fresh project, added mediasoup = "0.9.0" as dependency and it worked fine on Ubuntu 21.04.
Deleting target directory would have helped for sure.

What OS are you on? Also make sure network doesn’t block access to downloading some of the dependencies (like from GitHub).

I’m on Ubuntu 20.04. It seems that the directories that were causing problems were in my local ~/.cargo cache of mediasoup, not in the target directory of the project itself. I resolved it by deleting mediasoup from the cargo cache.

Interesting and weird. Either way, the other topic linked is still relevant and this issue should generally go away once fixed upstream.

1 Like