Skip to content

Linux compilation fails with PipeWire 1.6 — spa_pod_builder field mismatch #185

Open

Description

@Itz-Agasta

scap v0.0.8 fails to compile on Linux systems with PipeWire 1.6+ due to incompatible libspa bindings. The spa_pod_builder struct layout changed in PipeWire 1.x, breaking the pipewire v0.8 crate dependency chain.

Error

error[E0609]: no field `data` on type `spa_pod_builder`
  --> ~/.cargo/registry/src/.../libspa-0.8.0/src/pod/builder.rs:38:25
   |
38 |         (*this).builder.data = (*this).data.as_mut_ptr().cast::<c_void>();
   |                         ^^^^ unknown field
   |
   = note: available field is: `_address`

error[E0609]: no field `size` on type `spa_pod_builder`
  --> ~/.cargo/registry/src/.../libspa-0.8.0/src/pod/builder.rs:39:25
   |
39 |         (*this).builder.size = (*this)
   |                         ^^^^ unknown field
   |
   = note: available field is: `_address`

Dependency chain

scap v0.0.8
└── pipewire v0.8.0
    └── libspa v0.8.0  ← broken with PipeWire 1.6 headers

Environment

  • OS: Arch Linux
  • PipeWire version: 1.6.6
  • Rust edition: 2024
  • scap version: 0.0.8 (latest on crates.io)

Root cause

The pipewire crate v0.8.0 (and its libspa dependency) was written against older PipeWire C headers where spa_pod_builder had public data and size fields. In PipeWire 1.x, these fields were refactored into an opaque _address union member.

Activity

  1. tembo commented on May 28, 2026

    @tembo

    This is a known compatibility issue with the upstream pipewire Rust crate. The scap v0.0.8 on crates.io pins pipewire = "^0.8.0", which was written against older PipeWire C headers (pre-1.x).

    The upstream pipewire crate has newer releases that fix this:

    • v0.9.2 (Sep 2025) - requires Rust 1.77
    • v0.10.0 (May 2026) - adds explicit feature flags for PipeWire 1.0 and 1.2 compatibility, requires Rust 1.80

    The fix would be for scap to bump its pipewire dependency to ^0.9 or ^0.10. In PR #35, the project previously bumped from 0.7.2 to 0.8.0 to address a similar header compatibility issue.

    Workaround until a new scap release: If you're building from source, you can patch the dependency in your project's Cargo.toml:

    [patch.crates-io]
    pipewire = { version = "0.10" }
    libspa = { version = "0.10" }

    Or if using scap as a git dependency, you could fork and update Cargo.toml in the scap repo to use pipewire = "^0.10".

    Note: The main Cap repository already uses scap as a submodule at crates/scap-*, so this would need to be addressed there as well for Cap desktop users on Arch/newer distros.

  2. Itz-Agasta commented on May 28, 2026

    @Itz-Agasta
    Author

    The patch approach wont work... pipewire 0.10 API is significantly different from 0.8 ... too many breaking changes in scap...ig it needs rework release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions