-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the bug
Under a very specific set of circumstances, Meson can be led to ignore a subprojects folder that matches in name to a Rust crate present in the root's Cargo.lock. This leads to subproject calls returning inexplicably
meson.build:7:9: ERROR: Neither a subproject directory nor a libfoo.wrap file was found.
because the ignore criteria in the wrap.py module isn't listed anywhere.
To the best of my ability you need to:
- consume the repo hosting the crate as a submodule
- redirect
subproject_dirto said submodule - have both
libfoothe Meson project andlibfoo-rsthe crate folder (namedlibfoo) reside in the root of the submodule
Calling up subproject('libfoo') will be enough to break the build, as wrap.py will ignore libfoo because of libfoo-rs crate's name.
To Reproduce
Checkout https://github.com/amyspark/meson-bug-cargo, initialize submodules, and issue meson setup build.
Expected behavior
Configure should succeed. Instead you will get:
The Meson build system
Version: 1.7.99
Source dir: /home/amalia/Escritorio/meson-bug-cargo
Build dir: /home/amalia/Escritorio/meson-bug-cargo/build
Build type: native build
Project name: monorepo
Project version: 0.1
C compiler for the host machine: ccache cc (gcc 14.2.1 "cc (GCC) 14.2.1 20250207")
C linker for the host machine: cc ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
ERROR: Subproject gst-depth-meta is buildable: NO
meson.build:7:9: ERROR: Neither a subproject directory nor a gst-depth-meta.wrap file was found.
A full log can be found at /home/amalia/Escritorio/meson-bug-cargo/build/meson-logs/meson-log.txt
system parameters
- Is this a cross build or just a plain native build (for the same computer)? Native
- what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) Manjaro
- what Python version are you using e.g. 3.8.0
3.12.1 - what
meson --version1.7.99commit 0be18b0 - what
ninja --versionif it's a Ninja build1.12.1