Skip to content

Support wireplumber 0.5 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sullyj3 opened this issue Jun 4, 2024 · 18 comments
Open

Support wireplumber 0.5 #10

sullyj3 opened this issue Jun 4, 2024 · 18 comments

Comments

@sullyj3
Copy link

sullyj3 commented Jun 4, 2024

Arch is using wireplumber 0.5, which means that pwvucontrol, depending on 0.4, can't be built.

Blocked by open issue upstream: arcnmx/wireplumber.rs/issues/35

@saivert
Copy link
Owner

saivert commented Jun 4, 2024

Yes. I will have to wait for wireplumber-rs 0.5 as well.

If you really want to you can parallel install libwireplumber 0.4 with 0.5 on the same system as long as you only copy libwireplumber.0.4.so to your distro's /usr/local/lib equivalent and skip the rest of the stuff (wpctl, wireplumber binary itself and so on). Then pwvucontrol can be built against that and still work. This is what I do on my system during development since upgrading to Fedora 40 which ships wireplumber 0.5.

It only uses libwireplumber to talk to pipewire and having that older library version has no impact on the functioning of your pipewire or wireplumber installation.

@sullyj3
Copy link
Author

sullyj3 commented Jun 4, 2024

Yes. I will have to wait for wireplumber-rs 0.5 as well.

Of course! I didn't mean to imply you ought to do anything in the meantime. I'm just opening to keep track of what's going on. I have a bad memory, so I've already cloned this repo and failed to build twice.

you can parallel install libwireplumber 0.4 with 0.5

Thanks, I appreciate the tip! I don't really want to mess around with going behind my package manager's back though, I'm happy to wait.

@zakissimo
Copy link

Hi,

Sorry for the dumb question, but where can I get libwireplumber.0.4.so ?

Thanks

@sullyj3
Copy link
Author

sullyj3 commented Jun 6, 2024

If you're also on arch, it's likely still in your pacman cache. You can do
ls /var/cache/pacman/pkg/|grep libwireplumber to check. Copy the latest 0.4 to an empty directory and extract it using unzstd and tar. That should give you a just usr directory containing the package contents, including the file you want under ./usr/lib

If it's not in the cache, see https://wiki.archlinux.org/title/downgrading_packages#Arch_Linux_Archive

@flipreverse
Copy link

Debian Trixie (testing) is currently at libwireplumber 0.4.13 (, or libwireplumbe-0.5). Is there any chance to downgrade to build process such as it builds with 0.4.13?

@raininja
Copy link

raininja commented Jul 5, 2024

Commenting to follow this issue, and to give my vote for support of wireplumber-0.5

@ThatOneCalculator
Copy link

ThatOneCalculator commented Jul 16, 2024

Same here, would love to make an AUR package but I don't think I should ship one since it requires a version below.

@flipreverse
Copy link

@ThatOneCalculator I managed to make it work. Here is my diff:

diff --git a/Cargo.toml b/Cargo.toml
index cb1c308..04c84f6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,8 +10,7 @@ glib = { version = "0.18", features = ["log"] }
 log = "0.4.11"
 imbl = "3.0.0"
 once_cell = "1.15.0"
-wireplumber = { git = "https://github.com/arcnmx/wireplumber.rs.git", rev = "2c0ee463d029d3562ee66db90554c5af573565c1", features = ["v0_4_16"] }
+wireplumber = { git = "https://github.com/arcnmx/wireplumber.rs.git", rev = "a01b47d27e3e38c050e939a0176a565a27c1aee1", features = ["v0_4_12"] }
 futures = "0.3"
 anyhow = "1.0"
 pipewire = "0.7"
diff --git a/meson.build b/meson.build
index 066e09a..32c2f22 100644
--- a/meson.build
+++ b/meson.build
@@ -14,7 +14,7 @@ dependency('gio-2.0', version: '>= 2.66')
 dependency('gtk4', version: '>= 4.0.0')
 dependency('libadwaita-1', version: '>= 1.2')
 dependency('libpipewire-0.3', version: '>= 0.3.83')
-dependency('wireplumber-0.4', version: '>= 0.4.15')
+dependency('wireplumber-0.4', version: '>= 0.4.13')
 
 find_program('glib-compile-resources', required: true)
 glib_compile_schemas = find_program('glib-compile-schemas', required: true)
``

@ThatOneCalculator
Copy link

ThatOneCalculator commented Jul 16, 2024

@flipreverse I tried applying it directly but got error: corrupt patch at line 14
image

@ThatOneCalculator
Copy link

Also, even applying those changes manually, I get this:

Run-time dependency libpipewire-0.3 found: YES 1.2.1
Found CMake: /usr/bin/cmake (3.30.0)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency wireplumber-0.4 found: NO (tried pkgconfig and cmake)

meson.build:17:0: ERROR: Dependency "wireplumber-0.4" not found, tried pkgconfig and cmake

@moabeat-berlin
Copy link

If you really want to you can parallel install libwireplumber 0.4 with 0.5 on the same system as long as you only copy libwireplumber.0.4.so to your distro's /usr/local/lib equivalent and skip the rest of the stuff (wpctl, wireplumber binary itself and so on).

Thanks for this hint. I have created a compatibility package in the AUR to provide this and also created an AUR package for pwvucontrol.

@jujudusud
Copy link
Contributor

Hi here, there is already a wp 0.5 branch in the WirePlumber rs repository.

@flipreverse
Copy link

Also, even applying those changes manually, I get this:

Run-time dependency libpipewire-0.3 found: YES 1.2.1
Found CMake: /usr/bin/cmake (3.30.0)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency wireplumber-0.4 found: NO (tried pkgconfig and cmake)

meson.build:17:0: ERROR: Dependency "wireplumber-0.4" not found, tried pkgconfig and cmake

Although quite late: Have you installed libwireplumber-0.4-0?

@C0rn3j
Copy link

C0rn3j commented Oct 7, 2024

Is this the reason why pwvucontrol currently shows up as using the old API?

[1] % wpctl status
PipeWire 'pipewire-0' [1.2.5, c0rn3j@Luxuria, cookie:2703756527]
 └─ Clients:
        32. plasmashell                         [1.2.5, c0rn3j@Luxuria, pid:9997]
        67. pwvucontrol                         [0.3.83, c0rn3j@Luxuria, pid:2]

@jujudusud
Copy link
Contributor

Any news here?
Is it possible to build against the wp-0.5 branch of wireplumber rs?

@oldrust
Copy link

oldrust commented Jan 2, 2025

Any updates on this issue?

@hboetes
Copy link

hboetes commented Apr 12, 2025

So I changed this:

-dependency('wireplumber-0.4', version: '>= 0.4.15')
+dependency('wireplumber-0.5', version: '>= 0.5.8')

And then during the build I got:

warning: wireplumber-sys@0.1.0: 
error: failed to run custom build command for `wireplumber-sys v0.1.0 (https://github.com/arcnmx/wireplumber.rs.git?rev=6e48383a85aecfca22dac3ffc589fb3f25404eda#6e48383a)`

Caused by:
  process didn't exit successfully: `/usr/pkgmk/work/pwvucontrol/src/pwvucontrol/build/src/release/build/wireplumber-sys-6716a3c4876bdb2f/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=WIREPLUMBER_0.4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags wireplumber-0.4 'wireplumber-0.4 >= 0.4.16'

  The system library `wireplumber-0.4` required by crate `wireplumber-sys` was not found.

Ah ha! That led to this issue: arcnmx/wireplumber.rs#35 and this branch: https://github.com/arcnmx/wireplumber.rs/tree/wp-0.5

So now I got this diff:

diff --git a/Cargo.toml b/Cargo.toml
index 6c5cbea..d2f4cc0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,9 +18,9 @@ pipewire = "0.8"
 formatx = "0.2.3"
 
 [dependencies.wireplumber]
-git = "https://github.com/arcnmx/wireplumber.rs.git"
-rev = "6e48383a85aecfca22dac3ffc589fb3f25404eda"
-features = ["v0_4_16"]
+git = "https://github.com/arcnmx/wireplumber.rs"
+features = ["v0_5"]
+branch = "wp-0.5"
 
 [dependencies.adw]
 package = "libadwaita"
diff --git a/meson.build b/meson.build
index 2e23efc..0212ead 100644
--- a/meson.build
+++ b/meson.build
@@ -14,7 +14,7 @@ dependency('gio-2.0', version: '>= 2.66')
 dependency('gtk4', version: '>= 4.0.0')
 dependency('libadwaita-1', version: '>= 1.2')
 dependency('libpipewire-0.3', version: '>= 0.3.83')
-dependency('wireplumber-0.4', version: '>= 0.4.15')
+dependency('wireplumber-0.5', version: '>= 0.5.8')
 
 find_program('glib-compile-resources', required: true)
 glib_compile_schemas = find_program('glib-compile-schemas', required: true)

And the build continues, but... it's getting stuck elsewhere. 😢

@saivert
Copy link
Owner

saivert commented Apr 12, 2025

The wp-0.5 branch of wireplumber-rs is not ready yet. pwvucontrol will be stuck on wireplumber-rs 0.4 for the foreseeable future unless someone steps in and completes the work on wireplumber-rs. pwvucontrol currently need anything that is in the new version and it works very well to just link against wireplumber 0.4.

The proper solution would be to rewrite pwvucontrol to not have to depend on wireplumber by reimplementing some of the object tracking code of wireplumber in rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests