cannot find type `_bindgen_ty_10` in crate `spa_sys`
I'm trying to build xdg-desktop-portal-cosmic, which uses pipewire-rs, pipewire-sys and libspa-sys as dependencies. Building it fails with the following error in build.rs in spa_sys:
xdg-desktop-portal-cosmic/target/debug/build/libspa-sys-7510542c4fe961c0/out --cfg system_deps_have_libspa`
error[E0412]: cannot find type `_bindgen_ty_10` in crate `spa_sys`
--> /home/vadorovsky/.cargo/git/checkouts/pipewire-rs-e803a8db90410a99/6f3b9c4/libspa/src/utils/mod.rs:77:34
|
77 | pub struct SpaTypes(pub spa_sys::_bindgen_ty_10);
| ^^^^^^^^^^^^^^ help: a type alias with a similar name exists: `_bindgen_ty_1`
|
::: /home/vadorovsky/repos/cosmic-epoch/xdg-desktop-portal-cosmic/target/debug/build/libspa-sys-7510542c4fe961c0/out/bindings.rs:872:1
|
872 | pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
| ---------------------- similarly named type alias `_bindgen_ty_1` defined here
error[E0412]: cannot find type `_bindgen_ty_10` in crate `spa_sys`
--> /home/vadorovsky/.cargo/git/checkouts/pipewire-rs-e803a8db90410a99/6f3b9c4/libspa/src/utils/mod.rs:136:35
|
136 | pub fn from_raw(raw: spa_sys::_bindgen_ty_10) -> Self {
| ^^^^^^^^^^^^^^ help: a type alias with a similar name exists: `_bindgen_ty_1`
|
::: /home/vadorovsky/repos/cosmic-epoch/xdg-desktop-portal-cosmic/target/debug/build/libspa-sys-7510542c4fe961c0/out/bindings.rs:872:1
|
872 | pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
| ---------------------- similarly named type alias `_bindgen_ty_1` defined here
error[E0412]: cannot find type `_bindgen_ty_10` in crate `spa_sys`
--> /home/vadorovsky/.cargo/git/checkouts/pipewire-rs-e803a8db90410a99/6f3b9c4/libspa/src/utils/mod.rs:141:38
|
141 | pub fn as_raw(&self) -> spa_sys::_bindgen_ty_10 {
| ^^^^^^^^^^^^^^ help: a type alias with a similar name exists: `_bindgen_ty_1`
|
::: /home/vadorovsky/repos/cosmic-epoch/xdg-desktop-portal-cosmic/target/debug/build/libspa-sys-7510542c4fe961c0/out/bindings.rs:872:1
|
872 | pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
| ---------------------- similarly named type alias `_bindgen_ty_1` defined her
Full log:
I'm using Gentoo with:
❯ pipewire --version
pipewire
Compiled with libpipewire 0.3.77
Linked with libpipewire 0.3.77
And the headers are there:
xdg-desktop-portal-cosmic (c9d4a44) [!?] is v0.1.0 via v1.71.1
❯ ls /usr/include/spa-0.2/spa/
╭────┬─────────────────────────────────────┬──────┬───────┬─────────────╮
│ # │ name │ type │ size │ modified │
├────┼─────────────────────────────────────┼──────┼───────┼─────────────┤
│ 0 │ /usr/include/spa-0.2/spa/buffer │ dir │ 64 B │ a month ago │
│ 1 │ /usr/include/spa-0.2/spa/control │ dir │ 40 B │ a month ago │
│ 2 │ /usr/include/spa-0.2/spa/debug │ dir │ 118 B │ a month ago │
│ 3 │ /usr/include/spa-0.2/spa/graph │ dir │ 14 B │ 2 weeks ago │
│ 4 │ /usr/include/spa-0.2/spa/interfaces │ dir │ 10 B │ a month ago │
│ 5 │ /usr/include/spa-0.2/spa/monitor │ dir │ 66 B │ 2 weeks ago │
│ 6 │ /usr/include/spa-0.2/spa/node │ dir │ 100 B │ a month ago │
│ 7 │ /usr/include/spa-0.2/spa/param │ dir │ 542 B │ 2 weeks ago │
│ 8 │ /usr/include/spa-0.2/spa/pod │ dir │ 156 B │ a month ago │
│ 9 │ /usr/include/spa-0.2/spa/support │ dir │ 154 B │ a month ago │
│ 10 │ /usr/include/spa-0.2/spa/utils │ dir │ 280 B │ 2 weeks ago │
╰────┴─────────────────────────────────────┴──────┴───────┴─────────────╯
xdg-desktop-portal-cosmic (c9d4a44) [!?] is v0.1.0 via v1.71.1
❯ ls /usr/include/pipewire-0.3/pipewire/
╭────┬────────────────────────────────────────────────────┬──────┬─────────┬─────────────╮
│ # │ name │ type │ size │ modified │
├────┼────────────────────────────────────────────────────┼──────┼─────────┼─────────────┤
│ 0 │ /usr/include/pipewire-0.3/pipewire/array.h │ file │ 4.0 KB │ 2 weeks ago │
│ 1 │ /usr/include/pipewire-0.3/pipewire/buffers.h │ file │ 1.4 KB │ 2 weeks ago │
│ 2 │ /usr/include/pipewire-0.3/pipewire/client.h │ file │ 4.9 KB │ 2 weeks ago │
│ 3 │ /usr/include/pipewire-0.3/pipewire/conf.h │ file │ 1.5 KB │ 2 weeks ago │
│ 4 │ /usr/include/pipewire-0.3/pipewire/context.h │ file │ 6.8 KB │ 2 weeks ago │
│ 5 │ /usr/include/pipewire-0.3/pipewire/control.h │ file │ 1.3 KB │ 2 weeks ago │
│ 6 │ /usr/include/pipewire-0.3/pipewire/core.h │ file │ 19.2 KB │ 2 weeks ago │
│ 7 │ /usr/include/pipewire-0.3/pipewire/data-loop.h │ file │ 2.6 KB │ 2 weeks ago │
│ 8 │ /usr/include/pipewire-0.3/pipewire/device.h │ file │ 4.7 KB │ 2 weeks ago │
│ 9 │ /usr/include/pipewire-0.3/pipewire/extensions │ dir │ 164 B │ 5 days ago │
│ 10 │ /usr/include/pipewire-0.3/pipewire/factory.h │ file │ 2.5 KB │ 2 weeks ago │
│ 11 │ /usr/include/pipewire-0.3/pipewire/filter.h │ file │ 9.6 KB │ 2 weeks ago │
│ 12 │ /usr/include/pipewire-0.3/pipewire/global.h │ file │ 4.7 KB │ 2 weeks ago │
│ 13 │ /usr/include/pipewire-0.3/pipewire/i18n.h │ file │ 665 B │ 2 weeks ago │
│ 14 │ /usr/include/pipewire-0.3/pipewire/impl-client.h │ file │ 5.7 KB │ 2 weeks ago │
│ 15 │ /usr/include/pipewire-0.3/pipewire/impl-core.h │ file │ 2.1 KB │ 2 weeks ago │
│ 16 │ /usr/include/pipewire-0.3/pipewire/impl-device.h │ file │ 2.8 KB │ 2 weeks ago │
│ 17 │ /usr/include/pipewire-0.3/pipewire/impl-factory.h │ file │ 3.1 KB │ 2 weeks ago │
│ 18 │ /usr/include/pipewire-0.3/pipewire/impl-link.h │ file │ 3.0 KB │ 2 weeks ago │
│ 19 │ /usr/include/pipewire-0.3/pipewire/impl-metadata.h │ file │ 2.6 KB │ 2 weeks ago │
│ 20 │ /usr/include/pipewire-0.3/pipewire/impl-module.h │ file │ 2.9 KB │ 2 weeks ago │
│ 21 │ /usr/include/pipewire-0.3/pipewire/impl-node.h │ file │ 6.7 KB │ 2 weeks ago │
│ 22 │ /usr/include/pipewire-0.3/pipewire/impl-port.h │ file │ 3.6 KB │ 2 weeks ago │
│ 23 │ /usr/include/pipewire-0.3/pipewire/impl.h │ file │ 872 B │ 2 weeks ago │
│ 24 │ /usr/include/pipewire-0.3/pipewire/keys.h │ file │ 19.5 KB │ 2 weeks ago │
│ 25 │ /usr/include/pipewire-0.3/pipewire/link.h │ file │ 3.5 KB │ 2 weeks ago │
│ 26 │ /usr/include/pipewire-0.3/pipewire/log.h │ file │ 4.6 KB │ 2 weeks ago │
│ 27 │ /usr/include/pipewire-0.3/pipewire/loop.h │ file │ 2.4 KB │ 2 weeks ago │
│ 28 │ /usr/include/pipewire-0.3/pipewire/main-loop.h │ file │ 1.4 KB │ 2 weeks ago │
│ 29 │ /usr/include/pipewire-0.3/pipewire/map.h │ file │ 7.2 KB │ 2 weeks ago │
│ 30 │ /usr/include/pipewire-0.3/pipewire/mem.h │ file │ 5.9 KB │ 2 weeks ago │
│ 31 │ /usr/include/pipewire-0.3/pipewire/module.h │ file │ 2.6 KB │ 2 weeks ago │
│ 32 │ /usr/include/pipewire-0.3/pipewire/node.h │ file │ 5.9 KB │ 2 weeks ago │
│ 33 │ /usr/include/pipewire-0.3/pipewire/permission.h │ file │ 2.1 KB │ 2 weeks ago │
│ 34 │ /usr/include/pipewire-0.3/pipewire/pipewire.h │ file │ 2.1 KB │ 2 weeks ago │
│ 35 │ /usr/include/pipewire-0.3/pipewire/port.h │ file │ 4.3 KB │ 2 weeks ago │
│ 36 │ /usr/include/pipewire-0.3/pipewire/properties.h │ file │ 5.1 KB │ 2 weeks ago │
│ 37 │ /usr/include/pipewire-0.3/pipewire/protocol.h │ file │ 4.4 KB │ 2 weeks ago │
│ 38 │ /usr/include/pipewire-0.3/pipewire/proxy.h │ file │ 6.6 KB │ 2 weeks ago │
│ 39 │ /usr/include/pipewire-0.3/pipewire/resource.h │ file │ 5.0 KB │ 2 weeks ago │
│ 40 │ /usr/include/pipewire-0.3/pipewire/stream.h │ file │ 21.3 KB │ 2 weeks ago │
│ 41 │ /usr/include/pipewire-0.3/pipewire/thread-loop.h │ file │ 5.3 KB │ 2 weeks ago │
│ 42 │ /usr/include/pipewire-0.3/pipewire/thread.h │ file │ 1.2 KB │ 2 weeks ago │
│ 43 │ /usr/include/pipewire-0.3/pipewire/type.h │ file │ 781 B │ 2 weeks ago │
│ 44 │ /usr/include/pipewire-0.3/pipewire/utils.h │ file │ 2.2 KB │ 2 weeks ago │
│ 45 │ /usr/include/pipewire-0.3/pipewire/version.h │ file │ 1.7 KB │ 5 days ago │
│ 46 │ /usr/include/pipewire-0.3/pipewire/work-queue.h │ file │ 958 B │ 2 weeks ago │
├────┼────────────────────────────────────────────────────┼──────┼─────────┼─────────────┤
│ # │ name │ type │ size │ modified │
╰────┴────────────────────────────────────────────────────┴──────┴─────────┴─────────────╯
I guess there is something fishy going on with generating bindings. And I guess that might be something specific for my setup (since nobody complained yet).
For reference, here is my resulting bindings.rs. And indeed, it seems like the only _bindgen_ty
is:
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
I'm not sure how to proceed with further debugging ad this point, so I would be grateful for any hints