Vladimir, I just generated a backtrace, hope I did it correct,
I used Ardour-9.7.125-dbg and LSP-plugins-1.2.33.
I’m on Arch, X11, KDE
would like to provide you this 93kb textfile, but cannot succeed here… pls advice,
suse
OK. Now it’s clear. Seems that system FreeType library that LSP Plugins try to load gets into conflict with Ardour’s one. This hack was implemented because Ardour uses rare version of FreeType and thus the rendering of some glyphs was incorrect.
Plugins must be self contained and not dependent on external libraries.
Just statically link them, since you cannot even be certain that libfreetype is available to begin with. It almost certainly is not on most systems that Ardour runs on.
—
PS. Ardour’s libfreetype is patches to disable byte odes (we think the rendered text looks nicer). You may not want this for your plugins.
@x42
LSP Plugins use FreeType as a system library on Linux and FreeBSD. On Windows there is another way to render custom fonts. For MacOS we also will implement the solution that uses standard system libraries.
The problem here is that libfreetype overrides the system FreeType library because is provided as a shared object inside of Ardour’s environment. Maybe it would be better to use libfreetype as a statically-linked library by Ardour then?
There is stb_truetype, a single header public domain licensed library providing support for custom font loading (No fontconfig no libfreetype). Works well for me. stb/stb_truetype.h at master · nothings/stb · GitHub
so far so good, the specialists exchanged their positions - and what do I do with this? Any advice, any chance for me as a user getting the cow off the ice?
At the risk of sounding like a broken record again…
That doesn’t work when you load multiple plugins. Two different plugins may depend on different versions of libraries. A common example for this is aubio. Debian even ships libaudio.2 and libaubio.3 which are not compatible, dynamically linked plugins broke when they’re loaded in the same memory space.
That doesn’t work when you load multiple plugins. Two different plugins may depend on different versions of libraries. A common example for this is aubio.
Hmm. I supposed that statically-linked library should be linked with -fvisibility=hidden option so plugins won’t see Ardour’s libfreetype library and use the system one. By another way, the clash between versions of other libraries is a serious problem, too. I remember the problems of GTK3 vs GTK2. But I suppose it being a bit different problem because here the Ardour’s freetype library clashes with system one we want to use.
I’ve moved the usage of system FreeType library under the option so users now are responsible for turning this hack on. Changes will be available in the next release.
@x42 the main question about Ardour is, is there any reason why Ardour uses dynamically-linked libfreetype in it’s binaries tree? I suppose it would be a good feature to make libfreetype statically linked for Ardour.
Same reason all other libraries are not statically linked: Manly because that’ll break distro builds of Ardour.
There is a even a config option to do so, but it also results in a huge binary. Besides that’d be Ardour only, there may still be other hosts or other deployment systems (e.g. flatpak version of Ardour)…
PS. x42-plugins do statically link against libfreetype.
Another reason is that static linking is incredibly slow and while I care about users, I link Ardour dozens to hundreds of times per day. While in theory a simple switch for the release builds could work, that exposes us to another set of risks, since the version we’d be using day to day and for development would be linked entirely differently.