Do you have C and C++ compilers installed? If not, you’ll have to install gcc/g++ or Clang, so that you have working c++ command. You’ll need C and C++ compilers for a lot of things when working with Rust.
~/vortex# gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is my fault, after reinstalling c++ it doesn’t prompt anymore.But a new problem
error: failed to run custom build command for `mediasoup-sys v0.3.2`
Caused by:
process didn't exit successfully: `/root/vortex/target/release/build/mediasoup-sys-0f402da1f59baa56/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-link-search=native=/usr/lib/gcc/x86_64-linux-gnu/8/
cargo:rustc-link-lib=static=stdc++
# Updated pip and setuptools are needed for meson
# `--system` is not present everywhere and is only needed as workaround for
# Debian-specific issue (copied from
# https://github.com/gluster/gstatus/pull/33), fallback to command without
# `--system` if the first one fails.
/usr/bin/python3 -m pip install --system --target=/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/pip pip setuptools || \
/usr/bin/python3 -m pip install --target=/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/pip pip setuptools || \
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting pip
Downloading http://mirrors.tencentyun.com/pypi/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl (2.1MB)
Collecting setuptools
Downloading http://mirrors.tencentyun.com/pypi/packages/3b/02/8d4d27b1cacaac2d129a27d17a22d92a2a5eedcb7817d4ed8ab0d4daf5c4/setuptools-60.9.3-py3-none-any.whl (1.1MB)
Installing collected packages: pip, setuptools
Successfully installed pip-22.0.4 setuptools-60.9.3
# Install `meson` and `ninja` using `pip` into custom location, so we don't
# depend on system-wide installation.
/usr/bin/python3 -m pip install --upgrade --target=/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/pip meson ninja
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting meson
Downloading http://mirrors.tencentyun.com/pypi/packages/77/04/8de56b69d805406bf8c1d73934938680cec9d417fa39b4a68833729505a5/meson-0.61.2-py3-none-any.whl (850 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 850.3/850.3 KB 8.7 MB/s eta 0:00:00
Collecting ninja
Downloading http://mirrors.tencentyun.com/pypi/packages/52/65/d212822d0f29afecbad20cc3b3f41b8eeb4b47bea728602b8ce0b2d347f5/ninja-1.10.2.3-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (108 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.1/108.1 KB 838.0 kB/s eta 0:00:00
Installing collected packages: ninja, meson
Successfully installed meson-0.61.2 ninja-1.10.2.3
/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/pip/bin/meson setup \
--prefix /root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out \
--bindir '' \
--libdir '' \
--buildtype release \
-Db_ndebug=true \
-Db_pie=true \
-Db_staticpic=true \
--reconfigure \
"" \
/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/Release/build || \
/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/pip/bin/meson setup \
--prefix /root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out \
--bindir '' \
--libdir '' \
--buildtype release \
-Db_ndebug=true \
-Db_pie=true \
-Db_staticpic=true \
"" \
/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/Release/build
The Meson build system
Version: 0.61.2
Source dir: /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/mediasoup-sys-0.3.2
Build dir: /root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/Release/build
Build type: native build
Project name: mediasoup-worker
Project version: undefined
C compiler for the host machine: cc (gcc 8.3.0 "cc (Debian 8.3.0-6) 8.3.0")
C linker for the host machine: cc ld.bfd 2.31.1
C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Debian 8.3.0-6) 8.3.0")
C++ linker for the host machine: c++ ld.bfd 2.31.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
meson.build:147:0: ERROR: Subproject exists but has no meson.build file
A full log can be found at /root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/Release/build/meson-logs/meson-log.txt
--- stderr
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Directory does not contain a valid build tree:
/root/vortex/target/release/build/mediasoup-sys-69dc36c09ac42e71/out/out/Release/build
make: *** [Makefile:74: setup] Error 1
thread 'main' panicked at 'Failed to build libmediasoup-worker', /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/mediasoup-sys-0.3.2/build.rs:96:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to run custom build command for `mediasoup-sys v0.3.1`
Caused by:
process didn't exit successfully: `C:\Users\Tyler\vortex\target\release\build\mediasoup-sys-338daf750252a6a1\build-script-build` (exit code: 101)
--- stdout
# Updated pip and setuptools are needed for meson
# `--system` is not present everywhere and is only needed as workaround for
# Debian-specific issue (copied from
# https://github.com/gluster/gstatus/pull/33), fallback to command without
# `--system` if the first one fails.
/c/Users/Tyler/AppData/Local/Microsoft/WindowsApps/python3 -m pip install --system --target=C:/Users/Tyler/vortex/target/release/build/mediasoup-sys-2ebf88b41e971e7a/out/out/pip pip setuptools || \
/c/Users/Tyler/AppData/Local/Microsoft/WindowsApps/python3 -m pip install --target=C:/Users/Tyler/vortex/target/release/build/mediasoup-sys-2ebf88b41e971e7a/out/out/pip pip setuptools || \
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package
# Install `meson` and `ninja` using `pip` into custom location, so we don't
# depend on system-wide installation.
/c/Users/Tyler/AppData/Local/Microsoft/WindowsApps/python3 -m pip install --upgrade --target=C:/Users/Tyler/vortex/target/release/build/mediasoup-sys-2ebf88b41e971e7a/out/out/pip meson ninja
--- stderr
- Cannot open - Cannot open - Cannot openmake: *** [Makefile:64: meson-ninja] Error 1
thread 'main' panicked at 'Failed to build libmediasoup-worker', C:\Users\Tyler\.cargo\registry\src\github.com-1ecc6299db9ec823\mediasoup-sys-0.3.1\build.rs:94:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
g++ (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I am having the same error… deleting target and retrying did not work. Please advise. (I have Python installed with pip, meson and setuptools.)