Skip to content

mediasoup-sys Build Error: "Subproject exists but has no meson.build file" #1507

@mattmillen888

Description

@mattmillen888

Bug Report

Operating system: macOS 14.3 (Darwin 24.3.0)
Node version: N/A (Using Rust implementation)
npm version: N/A (Using Rust implementation)
gcc/clang version: Apple clang version 16.0.0 (clang-1600.0.26.6)
mediasoup version: 0.17.1 (Rust crate)
mediasoup-client version: N/A (Using Rust implementation)

Issue description

When building a Rust project that depends on the mediasoup crate (v0.17.1), the build fails with the following error:

meson.build:227:19: ERROR: Subproject exists but has no meson.build file.

This occurs during the compilation of the mediasoup-sys v0.9.1 dependency. The issue is that the flatbuffers subproject is missing its meson.build file, which should have been added by a patch from wrapdb.mesonbuild.com.
The build process downloads the flatbuffers source code correctly, but fails to apply the patch that would add the necessary meson.build file.
I was able to fix this issue by manually downloading and applying the patch:

  1. Navigate to the mediasoup-sys directory in the Cargo registry:
cd ~/.cargo/registry/src/index.crates.io-*/mediasoup-sys-0.9.1/subprojects
  1. Download the patch:
curl -L https://wrapdb.mesonbuild.com/v2/flatbuffers_24.3.6-1/get_patch -o flatbuffers_patch.zip
  1. Extract and apply the patch:
unzip -o flatbuffers_patch.zip -d flatbuffers-24.3.6
mv flatbuffers-24.3.6/flatbuffers-24.3.6/meson.build flatbuffers-24.3.6/
mv flatbuffers-24.3.6/flatbuffers-24.3.6/LICENSE.build flatbuffers-24.3.6/
rmdir flatbuffers-24.3.6/flatbuffers-24.3.6

After applying these steps, the build succeeds. This suggests that there might be an issue with how the mediasoup-sys crate handles the flatbuffers.wrap file or how the Meson build system applies patches from wrapdb.
This issue affects anyone trying to use the Rust implementation of mediasoup on macOS, and possibly other platforms as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions