Problem adding a track with yoshimi in Debian Linux and Wayland

Hi.

Thanks a lot por this audio application. I have started the learning of Ardour recently. In my trials, adding a Yoshimi synth track freezes Ardour until I kill the process. I use Wayland.

Other scenario where it works: if I launch Ardour with FLTK_BACKEND=x11, the track is added and Yoshimi works well, but it is launched in X11 mode with XWayland.

I think a few months ago I added a Yoshimi track without changing FLTK_BACKEND environment variable, but I am not sure.

Greets and thank you for your help.

It’s a known yoshimi bug.

Ardour is still a X11 App.

That bug seems to involve running Yoshimi stand alone under Wayland. Ardour always runs in XWayland on a Wayland desktop, so seems odd that it could show up as a plugin running in XWayland.

Also, this description is a little worrying if it applies to the plugin as well:
“In this release we no longer make any direct use of gtk. However we suspect
problem is fltk’s use of gtk modules.”

Yoshimi problem is solved in Debian now. In fact, when I launch it without Ardour, it works in Wayland without problem. Only adding a track on Ardour seems problematic.

Thank you :slight_smile:

Does the LV2 plugin version of Yoshimi statically link the graphics toolkit?

Don’t know about the debian version, but the fedora version uses a lot of shared libraries, which causes problems with plugins:

$ ldd /usr/lib64/lv2/yoshimi.lv2/yoshimi_lv2.so
linux-vdso.so.1 (0x00007f47376f0000)
libfltk.so.1.3 => /lib64/libfltk.so.1.3 (0x00007f473649d000)
libmxml.so.1 => /lib64/libmxml.so.1 (0x00007f473769c000)
libfftw3f.so.3 => /lib64/libfftw3f.so.3 (0x00007f4736000000)
libcairo.so.2 => /lib64/libcairo.so.2 (0x00007f4736353000)
libz.so.1 => /lib64/libz.so.1 (0x00007f4737672000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f4735c00000)
libm.so.6 => /lib64/libm.so.6 (0x00007f4735ee9000)
libmvec.so.1 => /lib64/libmvec.so.1 (0x00007f4735b06000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4737643000)
libc.so.6 => /lib64/libc.so.6 (0x00007f473590b000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f47357b5000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f473762f000)
libXinerama.so.1 => /lib64/libXinerama.so.1 (0x00007f4737629000)
libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f4737621000)
libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f4737614000)
libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f4737607000)
libXft.so.2 => /lib64/libXft.so.2 (0x00007f47375ec000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f4737599000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f4736316000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f47356d9000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f47362ec000)
libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007f4735eda000)
libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007f47362e8000)
libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007f4735628000)
/lib64/ld-linux-x86-64.so.2 (0x00007f47376f2000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f47354b9000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f4735ec6000)
libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007f473537d000)
libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007f4735eb7000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f4735378000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f4735342000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f47351e0000)
libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007f47351c0000)
libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007f473519d000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f47350ec000)

Tried to launch yoshimi in CachyOS, Plasma Wayland:

yoshimi 
yoshimi 2.3.6.2 is starting...


Start-up Synth-Instance(0)...

-----Connect-attempt----(jack_audio/alsa_midi)----
finding manual
-----Connect-SUCCESS-------------------

Using jack_audio for audio and alsa_midi for midi
manual found

Found 3131 instruments in 80 banks
Root 20. Bank set to 125 "SynthPiano"
Set jack session callback failed
Alsa midi priority is 1


 WARNING: Yoshimi forced to X11 due to missing Cairo support in FLTK


Build Number 2422
Clientname: yoshimi
Audio: jack -> 'default'
Midi: alsa -> 'default'
Oscilsize: 512
Samplerate: 48000
Period size: 256

Yay! We're up and running :-)
yoshimi> Failed to load plugin 'libdecor-gtk.so': failed to init
Main Engine initialised
fish: Job 1, 'yoshimi' terminated by signal SIGSEGV (Adressbereichsfehler)

Did a search for the libdecor-gtk error:

The error message “Failed to load plugin ‘libdecor-gtk.so’: failed to init” indicates that the application is unable to initialize the libdecor plugin, which is often related to issues with the Wayland display server. To resolve this, you may need to ensure that the libdecor-gtk plugin is properly installed and configured for your environment.

Issues with stand-alone Yoshimi would be different, and not really relevant to the Ardour forums.
At least I assume that when the original poster wrote “adding a Yoshimi synth track” that meant adding a MIDI track with Yoshimi LV2 plugin added as an instrument plugin.

Currently I would consider the Yoshimi LV2 build process very broken. I just downloaded the 2.3.6.2 source code, and using the default build process I got a yoshimi_lv2.so which not only referenced system libraries rather than linking statically, it even linked to libwayland-egl.so.1, libwayland-client.so.0, and libwayland-cursor.so.0.
As far as I know LV2 does not support Wayland, so possibly that is being pulled in by linking to the FLTK libraries.

The LV2 plugin also is linked to libblkid, libmount, and libselinux. Maybe there is an argument to be made that the plugin needs libselinux to create and edit preset files (although I think that would probably be covered by whatever permissions the host application has), but I don’t see any situation in which an LV2 plugin would need to access raw block devices and attempt to mount any filesystems from block devices.

I will file an issue on the Yoshimi github page, but I don’t use the Yoshimi plugin myself, so if you are interested in progress you can check:

1 Like

I expect most libraries are indeed indirect dependencies from fltk.

I will meet Will, at the Linux Audio Conference in two weeks where he’ll host a Yoshimi Workshop and I’ll ask him to look into this as well.

Meanwhile zynaddsubfx (zyn-fusion) not just looks nicer but also works OOTB…

Not very many dynamically linked libraries. Is it OK to dynamically link the math and FFT libraries? libm is installed with glibc, so maybe OK, but I thought FFTW was supposed to be statically linked in plugins.

$ ldd /usr/lib64/lv2/zynadd.lv2/zynadd.so
linux-vdso.so.1 (0x00007f04d9ebe000)
libfftw3.so.3 => /lib64/libfftw3.so.3 (0x00007f04d9a00000)
liblv2dynparamplugin1.so.0 => /lib64/liblv2dynparamplugin1.so.0 (0x00007f04d9e41000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f04d9600000)
libm.so.6 => /lib64/libm.so.6 (0x00007f04d9d2a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f04d9cfd000)
libc.so.6 => /lib64/libc.so.6 (0x00007f04d9407000)
/lib64/ld-linux-x86-64.so.2 (0x00007f04d9ec0000)

libfftw3 is indeed potentially problematic, but that has been API and ABI stable for a while.
No idea why it’s dynamically linked, maybe some licensing issues for official binaries.