versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.27k stars 1.13k forks source link

Failed to run custom build command for `mediasoup-sys v0.9.0` #1413

Closed dhilipsiva closed 4 months ago

dhilipsiva commented 4 months ago

Bug Report

Your environment

Issue description

A Rust project that I am working on requires mediasoup = "0.17.0" crate. It used to compile without any error. AFAIK, I used to Homebrew's rust and when I submitted #1409 , I switched to Rust Toolchain installed using Rustup. I can confirm that building mediasoup repo directly works just fine. But when mediasoup is a dependency, this error occurs. I have attached both stdout error and meson log. Now it is failing on both Rustup's and Hombrew's Rust. Any pointers are greatly appreciated!

stdout.txt meson-log.txt

  The Meson build system
  Version: 1.3.0
  Source dir: /home/dhilipsiva/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mediasoup-sys-0.9.0
  Build dir: /home/dhilipsiva/projects/colligence/narada/target/debug/build/mediasoup-sys-e55433ad344c30f0/out/build
  Build type: native build
  Project name: mediasoup-worker
  Project version: undefined
  C compiler for the host machine: cc (gcc 13.2.0 "cc (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
  C linker for the host machine: cc ld.bfd 2.41
  C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
  C++ linker for the host machine: c++ ld.bfd 2.41
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Checking for function "strtoull_l" : YES

  meson.build:178:15: ERROR: Subproject exists but has no meson.build file.

  A full log can be found at /home/dhilipsiva/projects/colligence/narada/target/debug/build/mediasoup-sys-e55433ad344c30f0/out/build/meson-logs/meson-log.txt

  --- stderr

  [notice] A new release of pip is available: 24.0 -> 24.1
  [notice] To update, run: python3.12 -m pip install --upgrade pip
  thread 'main' panicked at /home/dhilipsiva/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mediasoup-sys-0.9.0/build.rs:155:9:
  Failed to build libmediasoup-worker
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
nazar-pc commented 4 months ago

Try deleting /home/dhilipsiva/projects/colligence/narada/target/debug/build/mediasoup-sys-e55433ad344c30f0 and running again. Maybe it was interrupted somehow and got stuck in this broken state.

dhilipsiva commented 4 months ago

That did not work. This works just fine on my colleague's machines and in the server. I have tried a bunch of different things (re-installing Rust, cargo clean, using a python virtualenv, cloning the project again), but I seem to be clueless on how to fix/debug this :P

nazar-pc commented 4 months ago

I would try to remove /home/dhilipsiva/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mediasoup-sys-0.9.0 then as well and try again. I'm quite certain something somewhere failed prior to this because the logs you provided do not have the answer.

ibc commented 4 months ago

Should we keep this into a GH issue? Looks like there is no real bug here but some other kind of problem.

nazar-pc commented 4 months ago

I'm not sure there is an issue we'll be fixing, though it would be ideal to handle such situations more gracefully

dhilipsiva commented 4 months ago

We can close this Issue. I deleted the ~/.cargo/registry folder as suggested by @nazar-pc and that has fixed the issue. Thank you so much! :heart: