Hello,
I'm trying to compile a Rust project on FreeBSD 15.0-RELEASE (64-bit) that depends on the pipewire crate (version 0.8.0). The build fails with:
I have PipeWire installed:
The development headers are present:
However, when I search for pw_init symbols in the headers, I don't find a direct function definition. Instead, I see this in /usr/local/include/pipewire-0.3/pipewire/pipewire.h:
Is this modification (`#define pw_init pipewire_init`) an intentional part of the FreeBSD port of PipeWire? If so, is it documented anywhere?
Looking at the headers, it seems like on FreeBSD the actual function is `pipewire_init`, and `pw_init` is just a macro to avoid clashing with something else in the system. Is that correct?
If this is the intended behavior, I can submit a pull request to the `pipewire` rust crate to add FreeBSD support with a conditional compilation flag (using `pipewire_init` instead of `pw_init` on FreeBSD). But first I want to confirm this is indeed the case and not just an issue with my local setup.
Thanks!
I'm trying to compile a Rust project on FreeBSD 15.0-RELEASE (64-bit) that depends on the pipewire crate (version 0.8.0). The build fails with:
Code:
Compiling x11 v2.21.0
Compiling libspa-sys v0.8.0
Compiling libdbus-sys v0.2.5
Compiling dbus v0.9.7
Compiling xcb v1.5.0
Compiling libspa v0.8.0
Compiling pipewire-sys v0.8.0
Compiling pipewire v0.8.0
error[E0425]: cannot find function `pw_init` in crate `pw_sys`
--> /home/morgados/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pipewire-0.8.0/src/lib.rs:158:49
|
158 | INITIALIZED.get_or_init(|| unsafe { pw_sys::pw_init(ptr::null_mut(), ptr::null_mut()) });
| ^^^^^^^ not found in `pw_sys`
error[E0425]: cannot find function `pw_deinit` in crate `pw_sys`
--> /home/morgados/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pipewire-0.8.0/src/lib.rs:167:13
|
167 | pw_sys::pw_deinit()
| ^^^^^^^^^ not found in `pw_sys`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `pipewire` (lib) due to 2 previous errors
I have PipeWire installed:
Code:
morgados@morgado:~ $ pkg info | grep pipewire
pipewire-1.4.9 Server and user space API to deal with multimedia pipelines
pipewire-spa-oss-g20251117_1 PipeWire SPA plugin implementing a FreeBSD OSS backend
plasma6-kpipewire-6.5.5 Components relating to Flatpak 'pipewire' use in Plasma
The development headers are present:
Code:
root@morgado:~ # find /usr/local -name "pipewire.h"
/usr/local/include/pipewire-0.3/pipewire/pipewire.h
However, when I search for pw_init symbols in the headers, I don't find a direct function definition. Instead, I see this in /usr/local/include/pipewire-0.3/pipewire/pipewire.h:
Code:
root@morgado:~ # grep -r "pw_init" /usr/local/include/pipewire-0.3/
/usr/local/include/pipewire-0.3/pipewire/pipewire.h:/* BSD has pw_init already */
/usr/local/include/pipewire-0.3/pipewire/pipewire.h:#define pw_init pipewire_init
/usr/local/include/pipewire-0.3/pipewire/log.h: * in pw_init() but you can install a custom logger before calling
/usr/local/include/pipewire-0.3/pipewire/log.h: * pw_init(). */
Is this modification (`#define pw_init pipewire_init`) an intentional part of the FreeBSD port of PipeWire? If so, is it documented anywhere?
Looking at the headers, it seems like on FreeBSD the actual function is `pipewire_init`, and `pw_init` is just a macro to avoid clashing with something else in the system. Is that correct?
If this is the intended behavior, I can submit a pull request to the `pipewire` rust crate to add FreeBSD support with a conditional compilation flag (using `pipewire_init` instead of `pw_init` on FreeBSD). But first I want to confirm this is indeed the case and not just an issue with my local setup.
Thanks!