Pipewire error when building on Ubuntu 22

Hello, when I build the blender project I encountered errors about pipewire. How can I fix this?

In file included from /home/xzx/blender-git/blender/extern/audaspace/plugins/pipewire/PipeWireDevice.cpp:23:
/home/xzx/blender-git/blender/extern/audaspace/plugins/pipewire/PipeWireSymbols.h:25:17: error: ‘pw_stream_get_nsec’ was not declared in this scope; did you mean ‘pw_stream_get_name’?
   25 | PIPEWIRE_SYMBOL(pw_stream_get_nsec);
      |                 ^~~~~~~~~~~~~~~~~~
/home/xzx/blender-git/blender/extern/audaspace/plugins/pipewire/PipeWireLibrary.h:38:47: note: in definition of macro ‘PIPEWIRE_SYMBOL’
   38 | #define PIPEWIRE_SYMBOL(sym) extern decltype(&sym) AUD_##sym
      |                                               ^~~
[ 32%] Generating ../../../../release/datafiles/icons_svg/handle_auto.svg.c
/home/xzx/blender-git/blender/extern/audaspace/plugins/pipewire/PipeWireSymbols.h:26:17: error: ‘pw_stream_get_time_n’ was not declared in this scope; did you mean ‘pw_stream_get_time’?
   26 | PIPEWIRE_SYMBOL(pw_stream_get_time_n);
      |                 ^~~~~~~~~~~~~~~~~~~~
/home/xzx/blender-git/blender/extern/audaspace/plugins/pipewire/PipeWireLibrary.h:38:47: note: in definition of macro ‘PIPEWIRE_SYMBOL’
   38 | #define PIPEWIRE_SYMBOL(sym) extern decltype(&sym) AUD_##sym

Probably something that @ZedDB knows about?

libpipewire-0.3-dev is installed?

I just added in in Linux Mint 22 and can successfully compile main with Pipewire support.

@whix which pipewire version are you on? (pipewire --version)

I think I have installed this lib.

$ sudo apt install libpipewire-0.3-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libpipewire-0.3-dev is already the newest version (0.3.48-1ubuntu3).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 96 not upgraded.

The version is 0.3.48.

Thanks for bringing this to my attention.

I have created a pull request to enforce a pipewire version of at least 1.1.0 here:

OK, in my case it’s 1.0.5

It compiles fine, I wonder what will happen after 1.1.0 is enforced.

Thanks, I fix this error after installing a pipewire with version 1.2.0.

1 Like

I’m basing the 1.1.0 requirement from the comment here:
https://docs.pipewire.org/group__pw__stream.html#ga1f3a85c84e2741fe0f664e3ed314d5e4

I could lower it to 1.0.0 if you could test that playback seems to work and that the playback is smooth when using A/V sync. (No sudden jumps in the playback frame etc)

I’m using Linux Mint 22 (which is based an Ubuntu 24.04) and the current version of pipewire there is 1.0.5 which I also compiled it with.
No pops or jumps so far here.

I tried out pipewire 1.0.7, while it doesn’t noticeably jump, there is an audio drift (audio desyncs with the played back frame) that get worse with time so I’ll keep the requirement at 1.1.0.

OK, good to know. I possibly didn’t notice it because I only tested it on shorter pieces of video.

On a side note: What does it mean to users running e.g. Linux Mint 22 or Ubuntu 24.04 when trying to compile Blender with Pipewire support from then on? Will we have to install Pipewire libs > 1.1.0 now or will the libs be added to the precompiled libs folder?

The libs will not be added as these are system libs that runs system services.
(Even if we did ship the libs it wouldn’t help people to run pipewire)

For distribution versions that doesn’t ship Pipewire >= 1.1.0 it only means that they have to keep using the other available audio backends.

OK, thanks for the info. I can live with that, not using much audio in Blender anyway :wink: