synthclone icon indicating copy to clipboard operation
synthclone copied to clipboard

linker can't find -ljack when using pipewire-jack

Open edogawa23 opened this issue 1 year ago • 5 comments

Hi Devin,

very nice to see you started working on synthclone again!

I have a small issue, the linker errors like this:

make[3]: Entering directory '/home/ed/src/synthclone/src/plugins/jack' rm -f libsynthclone_jack.so g++ -Wl,-rpath,/usr/lib64 -Wl,-rpath-link,/usr/lib64 -shared -fPIC -o libsynthclone_jack.so ../../../make/plugins/jack/eventthread.o ../../../make/plugins/jack/participant.o ../../../make/plugins/jack/plugin.o ../../../make/plugins/jack/sampler.o ../../../make/plugins/jack/sampleratechangeview.o ../../../make/plugins/jack/qrc_jack.o ../../../make/plugins/jack/moc_eventthread.o ../../../make/plugins/jack/moc_participant.o ../../../make/plugins/jack/moc_plugin.o ../../../make/plugins/jack/moc_sampler.o ../../../make/plugins/jack/moc_sampleratechangeview.o /home/ed/src/synthclone/build/lib/libsynthclone.so.0.3.0 -ljack /usr/lib64/libQt6Gui.so /usr/lib64/libGLX.so /usr/lib64/libOpenGL.so /usr/lib64/libQt6Core.so -lpthread -lGLX -lOpenGL /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: cannot find -ljack: No such file or directory collect2: error: ld returned 1 exit status make[3]: *** [Makefile:187: ../../../build/lib/synthclone/plugins/libsynthclone_jack.so] Error 1 make[3]: Leaving directory '/home/ed/src/synthclone/src/plugins/jack' make[2]: *** [Makefile:107: sub-jack-make_first] Error 2

to add the custom path, I changed line 12 in src/plugins/jack/jack.pro to read:

LIBS += -L/usr/lib64/pipewire-0.3/jack -ljack

This way it succeeds, but I'm not sure if this is the most appropriate way to handle that, otherwise I'd have made a PR...

edogawa23 avatar Dec 26 '23 14:12 edogawa23

@edogawa23 this would indeed not be appropriate for anyone that is not using pipewire-jack :thinking:

dromer avatar Dec 26 '23 14:12 dromer

I'd think that only adding an additional search path wouldn't do harm when using "real" libjack?

But sure, some sort of conditional would be better, I just don't know what to check for and how to express that in qmake .pro syntax...

edogawa23 avatar Dec 26 '23 14:12 edogawa23

yeah maybe that would be ok indeed. if it fails silently when the path doesn't exist.

only issue is if a user has installed both and you can't easily determine which one you should use

dromer avatar Dec 26 '23 15:12 dromer

I'm just learning about pipewire. Seems kind of awesome. :)

Am I correct in assuming that you'd like to make the JACK plugin work with the pipewire JACK bindings because it seems like the shortest path to sampling via pipewire? IOW, would a pipewire specific sampler solve your issue, or is there a specific reason you want to use the pipewire JACK bindings?

surfacepatterns avatar Dec 29 '23 02:12 surfacepatterns

@surfacepatterns it is generally recommended to not use pipewire API directly and just use the existing alsa/pulse/jack APIs.

I think just being able to use the pipewire jack libs should be good enough for now.

dromer avatar Dec 29 '23 10:12 dromer