Skip to content

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

@Itz-Agasta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions