Why is libreadline bundled?

Hello,

I came from Windows and FL Studio, so I have a fairly large library of paid plugins that I can really only use on Windows or through WINE. For a while I was using Carla to run these plugins and route them properly. But this felt tacky and introduced a lot of latency (especially on lower-powered devices like my Steam Deck). So, I decided to start using yabridge. yabridge is awesome because it basically just creates a little native Linux shim that interacts with the original Windows binaries. Reduces a fair amount of overhead and allows me to use the plugins directly in Ardour, as if they were meant to be used on Linux. The problem is that yabridge needs to make use of libreadline. And this was okay for a while (I had it all sitting in a crusty, old Arch Linux container). But when I went to update everything, yabridge broke. It started failing to start or load any yabridge-based plugin. After some investigation, readline turned out to be the culprit. Ardour asks yabridge to start, yabridge asks bash to perform a readline, and because bash and libreadline got out of sync (system/container bash updated, but the bundled libreadline did not), yabridge can no longer find the readline symbols it needs with bash.

There is already an issue created for this on yabridge’s issue tracker: Wine host process has exited unexpectedly · Issue #442 · robbert-vdh/yabridge · GitHub

The solution is to LD_PRELOAD the system version of libreadline (e.g. LD_PRELOAD=/usr/lib/libreadline.so pw-jack /opt/Ardour-8.12.0/bin/ardour8), so that the version is close enough for the expected symbols to be there. This seems odd though. The very point of bundling all of these libraries is to avoid incompatibilities with a given system. But this problem would happen with anything that needs to use readline. It will happen in any up-to-date container. It will happen even on any up-to-date baremetal setup. So it had me wondering… when is Ardour ever actually using readline? Why is it not a problem for Ardour? Because the only reason it’s a problem for yabridge is because I’m running it within the Ardour environment (which would use the bundled libraries). Ardour is using this exact same environment.

If Ardour is actually using libreadline, I would love to see libreadline updated within the bundled libraries, so that a new user (or someone coming back from a break) won’t be crazy confused about why their stuff isn’t working. LD_PRELOAD is not really something I would want to have to suggest to friends that may want to try Ardour.

If Ardour is not actually using libreadline, I would love to see it removed from the bundled libraries, so we can rely on the system version of libreadline (which is far more likely to already be compatible with the system’s bash).

Thank you for your time.

Ardour Lua Commandline tool uses it.

Since a few months (upcoming Ardour9) that tool is now statically linked against libreadline; Ardour no longer comes with libreadline bundled.

So, if I understand you correctly, this shouldn’t be an issue with Ardour 9 and I (as well as people that I may recommend to use Ardour) won’t have to preload the system’s libreadline.so? It will “just work”?