Skip to content
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

Cannot build against current PipeWire #3620

Closed
v-fox opened this issue Jan 6, 2025 · 8 comments
Closed

Cannot build against current PipeWire #3620

v-fox opened this issue Jan 6, 2025 · 8 comments

Comments

@v-fox
Copy link

v-fox commented Jan 6, 2025

EasyEffects Version

7.2.2+0~git20250105.95af8a010

What package are you using?

openSUSE

Distribution

Tumbleweed

Describe the bug

Updated the system and got myself #3611 BUT I'm using my own builds of PW and EE from fresh git snapshots. And this time rebuilding has failed.

Expected Behavior

Get built and launch.

Debug Log

Build Log
[  136s] c++ -Isrc/easyeffects.p -Isrc -I../src -I../include -I. -I.. -Idata -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++20 -Wno-missing-field-initializers -Wno-unused-parameter '-DG_LOG_DOMAIN="easyeffects"' -DENABLE_RNNOISE=1 -DENABLE_LIBPORTAL=1 -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -fPIC -O3 -ftree-parallelize-loops=4 -ftree-vectorize -fpredictive-commoning -flto=4 -ffat-lto-objects -flto-odr-type-merging -fuse-linker-plugin -fuse-ld=gold -Wl,--icf=safe -Wl,--gc-sections -fPIC -Wl,--sort-common -Wl,--no-keep-memory -Wl,-O1 -flto=4 -fuse-linker-plugin -mfpmath=sse -msse -msse2 -isystem/usr/include/gio-unix-2.0 -pthread -isystem/usr/include/soundtouch -isystem/usr/include/opus -isystem/usr/include/bs2b -isystem/usr/include/lilv-0 -isystem/usr/include/sratom-0 -isystem/usr/include/sord-0 -isystem/usr/include/serd-0 -isystem/usr/include/sigc++-3.0 -isystem/usr/lib64/sigc++-3.0/include -isystem/usr/include/libadwaita-1 -mfpmath=sse -msse -msse2 -isystem/usr/include/appstream -isystem/usr/include/gtk-4.0 -isystem/usr/include/pango-1.0 -isystem/usr/include/fribidi -isystem/usr/include/harfbuzz -isystem/usr/include/gdk-pixbuf-2.0 -isystem/usr/include/cairo -isystem/usr/include/libpng16 -isystem/usr/include/freetype2 -isystem/usr/include/pixman-1 -isystem/usr/include/graphene-1.0 -isystem/usr/lib64/graphene-1.0/include -mfpmath=sse -msse -msse2 -DWITH_GZFILEOP -isystem/usr/include/libmount -isystem/usr/include/blkid -isystem/usr/include/libxkbcommon -isystem/usr/include/glib-2.0 -isystem/usr/lib64/glib-2.0/include -isystem/usr/include/pipewire-0.3 -isystem/usr/include/spa-0.2 -D_REENTRANT -MD -MQ src/easyeffects.p/pipe_manager.cpp.o -MF src/easyeffects.p/pipe_manager.cpp.o.d -o src/easyeffects.p/pipe_manager.cpp.o -c ../src/pipe_manager.cpp
[  136s] ../src/pipe_manager.cpp: In function ‘void {anonymous}::on_registry_global(void*, uint32_t, uint32_t, const char*, uint32_t, const spa_dict*)’:
[  136s] ../src/pipe_manager.cpp:1256:26: error: cannot convert ‘pw_proxy*’ to ‘pw_node*’
[  136s]  1256 |     pw_node_add_listener(proxy, &nd->object_listener, &node_events, nd);
[  136s]       |                          ^~~~~
[  136s]       |                          |
[  136s]       |                          pw_proxy*
[  136s] In file included from ../include/pipe_objects.hpp:23,
[  136s]                  from ../include/pipe_manager.hpp:37,
[  136s]                  from ../src/pipe_manager.cpp:20:
[  136s] /usr/include/pipewire-0.3/pipewire/node.h:189:59: note:   initializing argument 1 of ‘int pw_node_add_listener(pw_node*, spa_hook*, const pw_node_events*, void*)’
[  136s]   189 | PW_API_NODE_IMPL int pw_node_add_listener(struct pw_node *object,
[  136s]       |                                           ~~~~~~~~~~~~~~~~^~~~~~
[  136s] In file included from /usr/include/pipewire-0.3/pipewire/core.h:79,
[  136s]                  from /usr/include/pipewire-0.3/pipewire/context.h:48,
[  136s]                  from ../include/pipe_manager.hpp:22:
[  136s] /usr/include/pipewire-0.3/pipewire/proxy.h:88:8: note: class type ‘pw_proxy’ is incomplete
[  136s]    88 | struct pw_proxy;
[  136s]       |        ^~~~~~~~
[  136s] ../src/pipe_manager.cpp:1326:26: error: cannot convert ‘pw_proxy*’ to ‘pw_link*’
[  136s]  1326 |     pw_link_add_listener(proxy, &pd->object_listener, &link_events, pd);
[  136s]       |                          ^~~~~
[  136s]       |                          |
[  136s]       |                          pw_proxy*
[  136s] In file included from ../include/pipe_objects.hpp:22:
[  136s] /usr/include/pipewire-0.3/pipewire/link.h:118:59: note:   initializing argument 1 of ‘int pw_link_add_listener(pw_link*, spa_hook*, const pw_link_events*, void*)’
[  136s]   118 | PW_API_LINK_IMPL int pw_link_add_listener(struct pw_link *object,
[  136s]       |                                           ~~~~~~~~~~~~~~~~^~~~~~
[  136s] /usr/include/pipewire-0.3/pipewire/proxy.h:88:8: note: class type ‘pw_proxy’ is incomplete
[  136s]    88 | struct pw_proxy;
[  136s]       |        ^~~~~~~~
[  136s] ../src/pipe_manager.cpp:1402:28: error: cannot convert ‘pw_proxy*’ to ‘pw_module*’
[  136s]  1402 |     pw_module_add_listener(proxy, &pd->object_listener, &module_events, pd);
[  136s]       |                            ^~~~~
[  136s]       |                            |
[  136s]       |                            pw_proxy*
[  136s] In file included from ../src/pipe_manager.cpp:29:
[  136s] /usr/include/pipewire-0.3/pipewire/module.h:90:65: note:   initializing argument 1 of ‘int pw_module_add_listener(pw_module*, spa_hook*, const pw_module_events*, void*)’
[  136s]    90 | PW_API_MODULE_IMPL int pw_module_add_listener(struct pw_module *object,
[  136s]       |                                               ~~~~~~~~~~~~~~~~~~^~~~~~
[  136s] /usr/include/pipewire-0.3/pipewire/proxy.h:88:8: note: class type ‘pw_proxy’ is incomplete
[  136s]    88 | struct pw_proxy;
[  136s]       |        ^~~~~~~~
[  136s] ../src/pipe_manager.cpp:1433:28: error: cannot convert ‘pw_proxy*’ to ‘pw_client*’
[  136s]  1433 |     pw_client_add_listener(proxy, &pd->object_listener, &client_events, pd);
[  136s]       |                            ^~~~~
[  136s]       |                            |
[  136s]       |                            pw_proxy*
[  136s] In file included from ../src/pipe_manager.cpp:22:
[  136s] /usr/include/pipewire-0.3/pipewire/client.h:160:65: note:   initializing argument 1 of ‘int pw_client_add_listener(pw_client*, spa_hook*, const pw_client_events*, void*)’
[  136s]   160 | PW_API_CLIENT_IMPL int pw_client_add_listener(struct pw_client *object,
[  136s]       |                                               ~~~~~~~~~~~~~~~~~~^~~~~~
[  136s] /usr/include/pipewire-0.3/pipewire/proxy.h:88:8: note: class type ‘pw_proxy’ is incomplete
[  136s]    88 | struct pw_proxy;
[  136s]       |        ^~~~~~~~
[  136s] ../src/pipe_manager.cpp:1492:32: error: cannot convert ‘pw_proxy*’ to ‘pw_device*’
[  136s]  1492 |         pw_device_add_listener(proxy, &pd->object_listener, &device_events, pd);
[  136s]       |                                ^~~~~
[  136s]       |                                |
[  136s]       |                                pw_proxy*
[  136s] In file included from ../src/pipe_manager.cpp:25:
[  136s] /usr/include/pipewire-0.3/pipewire/device.h:150:65: note:   initializing argument 1 of ‘int pw_device_add_listener(pw_device*, spa_hook*, const pw_device_events*, void*)’
[  136s]   150 | PW_API_DEVICE_IMPL int pw_device_add_listener(struct pw_device *object,
[  136s]       |                                               ~~~~~~~~~~~~~~~~~~^~~~~~
[  136s] /usr/include/pipewire-0.3/pipewire/proxy.h:88:8: note: class type ‘pw_proxy’ is incomplete
[  136s]    88 | struct pw_proxy;
[  136s]       |        ^~~~~~~~

Additional Information

Maybe this is relevant?
PipeWire/pipewire@84bd4b7
PipeWire/pipewire@b03f2f7

@wwmm
Copy link
Owner

wwmm commented Jan 6, 2025

Maybe this is relevant?

It seems to be. But I do not know yet how this is supposed to be fixed. And it is strange that they would break API compatibility in a such a radical way.

@wwmm
Copy link
Owner

wwmm commented Jan 6, 2025

I am looking at what the current macro does and it does a type casting on the proxy pointer we pass to it (struct spa_interface*)proxy. Are you able to replace proxy by this type casting in the source code lines that are giving the compilation error? I think I will not have time to build a custom package for pipewire in the next days. Maybe all that needs to be done is an explicit type casting.

@v-fox
Copy link
Author

v-fox commented Jan 6, 2025

It seems to be. But I do not know yet how this is supposed to be fixed. And it is strange that they would break API compatibility in a such a radical way.

Strange that they did not increase API version when doing that.

I am looking at what the current macro does and it does a type casting on the proxy pointer we pass to it (struct spa_interface*)proxy. Are you able to replace proxy by this type casting in the source code lines that are giving the compilation error? I think I will not have time to build a custom package for pipewire in the next days. Maybe all that needs to be done is an explicit type casting.

This is beyond my understanding. So for now I've just downgraded PW to 1.2.7 version.
Can you write an example in form of code-quote?

Is it like this?

pw_node_add_listener((struct spa_interface*)proxy, &nd->object_listener, &node_events, nd);
    pw_proxy_add_listener(proxy, &nd->proxy_listener, &node_proxy_events, nd);
…
    pw_link_add_listener((struct spa_interface*)proxy, &pd->object_listener, &link_events, pd);
    pw_proxy_add_listener(proxy, &pd->proxy_listener, &link_proxy_events, pd);
…
    pw_module_add_listener((struct spa_interface*)proxy, &pd->object_listener, &module_events, pd);
    pw_proxy_add_listener(proxy, &pd->proxy_listener, &module_proxy_events, pd);
…
    pw_client_add_listener((struct spa_interface*)proxy, &pd->object_listener, &client_events, pd);
    pw_proxy_add_listener(proxy, &pd->proxy_listener, &client_proxy_events, pd);
…
        pw_device_add_listener((struct spa_interface*)proxy, &pd->object_listener, &device_events, pd);
        pw_proxy_add_listener(proxy, &pd->proxy_listener, &device_proxy_events, pd);
…

The nasty part is that a lot of things have dependency on PW now, so rebuilding its package in OBS causes a lot of useless repo-wide rebuilds. And I can only test it after installing which will leave me with half-broken sound in case of failure which would require either finishing up the fix/workaround or downgrading with another rebuild. Or doing a bunch of hacks with package management.

@wwmm
Copy link
Owner

wwmm commented Jan 6, 2025

Is it like this?

Yes. But like I've said before I am not 100% sure this is going to fix it. So it is probably better to keep the downgrade you did for now.

@wwmm
Copy link
Owner

wwmm commented Jan 6, 2025

I am looking at pw-cli sources and it seems that at some point they started to use pw_proxy_add_object_listener instead of the calls we have been using. I've updated our master branch now with this change. It should fix the compilation error.

@v-fox
Copy link
Author

v-fox commented Jan 6, 2025

I am looking at pw-cli sources and it seems that at some point they started to use pw_proxy_add_object_listener instead of the calls we have been using. I've updated our master branch now with this change. It should fix the compilation error.

Compiled and working. Thanks!

@v-fox v-fox closed this as completed Jan 6, 2025
@Digitalone1
Copy link
Contributor

I've updated our master branch now with this change.

@wwmm Shouldn't we do the same for Qt port? I can't check the code right now, but I suppose we are using the same previous functions in the Qt app.

@wwmm
Copy link
Owner

wwmm commented Jan 8, 2025

I've updated our master branch now with this change.

@wwmm Shouldn't we do the same for Qt port? I can't check the code right now, but I suppose we are using the same previous functions in the Qt app.

Yes. I have already updated the qt branch with this fix too.

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

3 participants