ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.

Home Page:https://ryukau.github.io/VSTPlugins/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugins causing crashes on Fedora Linux

REIS0 opened this issue · comments

Trying some plugins on Ardour I got the following error after crashing:

/opt/Ardour-7.3.0/bin/ardour-7.3.0: symbol lookup error: /home/arthur/.vst3/CubicPadSynth.vst3/Contents/x86_64-linux/CubicPadSynth.so: undefined symbol: pango_font_metrics_get_height

Apparently this is happening with all plugins, so far all five I've tried got the same error.

But while this happens in Ardour, with Carla I got crashes with only CubicPadSynth, LightPadSynth and Feedback Phase. The logs from the crash were just saying basically "carla crashed" so nothing helpful.

I'm currently using Fedora Linux 37.

commented

Hi, @REIS0.

Just in case, did you build the plugins from source code? The binaries on release page of this repository are built on Ubuntu. They won't work on Fedora.

This is unlikely, but perhaps Pango is missing on your system. Try installing it if that's the case.

https://packages.fedoraproject.org/pkgs/pango/pango/

Pango is not missing so I'm guessing maybe the symlink to it in Fedora is different (this happened with other libraries) so I'll try building to see how it goes.

EDIT: Unfortunately I couldn't build it, it gives me this error:

[ 13%] Building CXX object public.sdk/samples/vst-hosting/inspectorapp/CMakeFiles/VST3Inspector.dir/__/__/__/source/vst/moduleinfo/moduleinfoparser.cpp.o
/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp: In member function ‘T Steinberg::ModuleInfoLib::{anonymous}::ModuleInfoJsonParser::getInteger(const JSON::Value&) const’:
/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:110:73: error: ‘numeric_limits’ is not a member of ‘std’
  110 |                     if (result > static_cast<int64_t> (std::numeric_limits<T>::max ()) ||
      |                                                             ^~~~~~~~~~~~~~

/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:110:89: error: expected primary-expression before ‘>’ token
  110 |     if (result > static_cast<int64_t> (std::numeric_limits<T>::max ()) ||
      |                                                             ^

/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:110:92: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  110 |   if (result > static_cast<int64_t> (std::numeric_limits<T>::max ()) ||
      |                                                              ^~~
      |                                                              std::max
In file included from /usr/include/c++/12/string:50,
                 from /home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfo.h:40,
                 from /home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.h:40,
                 from /home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:38:
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: ‘std::max’ declared here
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:111:73: error: ‘numeric_limits’ is not a member of ‘std’
  111 |                         result < static_cast<int64_t> (std::numeric_limits<T>::min ()))
      |                                                             ^~~~~~~~~~~~~~

/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:111:89: error: expected primary-expression before ‘>’ token
  111 |         result < static_cast<int64_t> (std::numeric_limits<T>::min ()))
      |                                                             ^

/home/arthur/code/vst/vst3sdk/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp:111:92: error: ‘::min’ has not been declared; did you mean ‘std::min’?
  111 |         result < static_cast<int64_t> (std::numeric_limits<T>::min ()))
      |                                                                ^~~
      |                                                                std::min
/usr/include/c++/12/bits/stl_algobase.h:278:5: note: ‘std::min’ declared here
  278 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
gmake[2]: *** [public.sdk/samples/vst-hosting/inspectorapp/CMakeFiles/VST3Inspector.dir/build.make:146: public.sdk/samples/vst-hosting/inspectorapp/CMakeFiles/VST3Inspector.dir/__/__/__/source/vst/moduleinfo/moduleinfoparser.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1395: public.sdk/samples/vst-hosting/inspectorapp/CMakeFiles/VST3Inspector.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
commented

It's a bug on VST 3 SDK. The issue below has a solution to it.

steinbergmedia/vst3sdk#103

#include <limits> is missing on public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp.

It worked but I got another error related to the sdk, this is getting harder than it should

[ 18%] Linking CXX executable ../../../../bin/Release/validator
/usr/bin/ld: CMakeFiles/validator.dir/__/__/__/source/vst/testsuite/general/scanparameters.cpp.o: in function `Steinberg::Vst::StringResult::queryInterface(char const*, void**)':
scanparameters.cpp:(.text._ZN9Steinberg3Vst12StringResult14queryInterfaceEPKcPPv[_ZN9Steinberg3Vst12StringResult14queryInterfaceEPKcPPv]+0x12): undefined reference to `Steinberg::IStringResult::iid'
/usr/bin/ld: scanparameters.cpp:(.text._ZN9Steinberg3Vst12StringResult14queryInterfaceEPKcPPv[_ZN9Steinberg3Vst12StringResult14queryInterfaceEPKcPPv]+0x4b): undefined reference to `Steinberg::IStringResult::iid'
/usr/bin/ld: ../../../../lib/Release/libbase.a(fobject.cpp.o): in function `Steinberg::Singleton::lockRegister()':
fobject.cpp:(.text+0x2a8): undefined reference to `Steinberg::Base::Thread::FLock::FLock(char const*)'
/usr/bin/ld: ../../../../lib/Release/libbase.a(fstring.cpp.o): in function `Steinberg::ConstString::copyTo(Steinberg::IStringResult*) const':
fstring.cpp:(.text+0x8598): undefined reference to `Steinberg::IString::iid'
/usr/bin/ld: ../../../../lib/Release/libbase.a(fstring.cpp.o): in function `Steinberg::StringObject::queryInterface(char const*, void**)':
fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0x7): undefined reference to `Steinberg::IStringResult::iid'
/usr/bin/ld: fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0x17): undefined reference to `Steinberg::IString::iid'
/usr/bin/ld: ../../../../lib/Release/libbase.a(fstring.cpp.o): in function `non-virtual thunk to Steinberg::StringObject::queryInterface(char const*, void**)':
fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0xdf): undefined reference to `Steinberg::IStringResult::iid'
/usr/bin/ld: fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0xef): undefined reference to `Steinberg::IString::iid'
/usr/bin/ld: ../../../../lib/Release/libbase.a(fstring.cpp.o): in function `non-virtual thunk to Steinberg::StringObject::queryInterface(char const*, void**)':
fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0x1af): undefined reference to `Steinberg::IStringResult::iid'
/usr/bin/ld: fstring.cpp:(.text._ZN9Steinberg12StringObject14queryInterfaceEPKcPPv[_ZN9Steinberg12StringObject14queryInterfaceEPKcPPv]+0x1bf): undefined reference to `Steinberg::IString::iid'
collect2: error: ld returned 1 exit status
gmake[2]: *** [public.sdk/samples/vst-hosting/validator/CMakeFiles/validator.dir/build.make:885: bin/Release/validator] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1424: public.sdk/samples/vst-hosting/validator/CMakeFiles/validator.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
commented

Okay, this is the first time I see that error. This is just a guess, but try running cmake without -j as following.

cmake --build .

Or, disabling validator with -DSMTG_RUN_VST_VALIDATOR=FALSE might skip the problematic part.

cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -DSMTG_MYPLUGINS_SRC_PATH="../../VSTPlugins" \
  -DSMTG_ADD_VST3_HOSTING_SAMPLES=FALSE \
  -DSMTG_ADD_VST3_PLUGINS_SAMPLES=FALSE \
  -DSMTG_RUN_VST_VALIDATOR=FALSE \ # Add this.
  ..

cmake --build .

If both of above doesn't solve the issue, please report the error to VST 3 SDK repository. The error indicates link failure on VST 3 validator. I don't have environment to test it for now, so can't provide a fix in this case.

While I'd like to support Linux better, I can't do it without help from people who are familiar with the specific distribution. In case of macOS, there were several people who stepped up to help me debugging the issue. Some of those lengthy conversations aren't on this repository because it was done in email.

Sorry for inconvenience.

@ryukau No problem, unfortunately I can't help much since my knowledge with these specific stuff is basically none, I'll try to look more and give another try in the future.

EDIT: Build completed with these workarounds but even so still crashes in Ardour, different error but still unusable.

commented

Sorry for late reply. I haven't noticed the edit. It's probably better to add a new comment when there is progress, so that I can get email notification.

Did you get core dump on crash? I'll provide debugging instruction depending on core dump is there or not.

Also, just in case, make sure to clean the previously installed plugin (Ubuntu builds) from ~/.vst3. I'm pretty sure you did this, but I'd like to have a confirmation.

commented

In addition to above comment:

To check if core dump is produced, run following command.

coredumpctl list | tail

Or, maybe -1 option is sufficient instead of tail.

coredumpctl list -1

If the bottom of the list is changing for each crash, then core dump is available.

Unfortunately no changes and yes I'm cleaning the install every time.

commented

Steps to get debug information are following:

  1. Edit top level CMakeLists.txt to reduce build time.
  2. Build plugin in debug mode.
  3. Attach gdb to Ardour and get backtrace.

Details are written below.

It might not work as intended, because this is the first time I use gdb this way. In this case, let me know about it. I'll work on it.

1. Reduce build time

Edit top level CMakeLists.txt in this repository as following. CubicPadSynth becomes debug plugin in this case. It will be used to trigger crash in step 3.

cmake_minimum_required(VERSION 3.20)

add_subdirectory(common)

add_subdirectory(CubicPadSynth)

To restore top level CMakeLists.txt, following command can be used.

git checkout -- CMakeLists.txt

2. Build plugin in debug mode

Rebuild is required. Change -DCMAKE_BUILD_TYPE=Release to -DCMAKE_BUILD_TYPE=Debug as following.

cmake \
  -DCMAKE_BUILD_TYPE=Debug \ # Change here.
  -DSMTG_MYPLUGINS_SRC_PATH="../../VSTPlugins" \
  -DSMTG_ADD_VST3_HOSTING_SAMPLES=FALSE \
  -DSMTG_ADD_VST3_PLUGINS_SAMPLES=FALSE \
  -DSMTG_RUN_VST_VALIDATOR=FALSE \
  ..

cmake --build .

I'm not sure if it's still the case, but if cmake is generating Makefile, building might fail. In this case, move or delete existing build directory and create new one.

3. Attach gdb to Ardour

Probably following command can be used to get backtrace.

gdb ardour
(gdb) r
# Ardour should be running here. Load debug plugin to trigger crash before next command.
(gdb) thread apply all bt full

Once backtrace is obtained, copy it to here. If it's too long, Gist might be used.

Above commands are paraphrase of this answer found in StackOverflow.

commented

I also found that Ardour has demo version for Windows. And the plugins on this repository worked on my Windows environment. So this issue seems specific to Ardour on Linux environment.

Possibly, in my case I'm using the version pre compiled from ardour website. (don't know if this can be a fedora specific issue too)

The only thing I've found that caught my eye was this, but don't know if was the crash cause:

[Thread 0x7fff957fa6c0 (LWP 7084) exited]
"/home/arthur/.config/UhhyouPlugins/style/style.json" is not regular file or doesn't exist.
"/home/arthur/.config/UhhyouPlugins/style/style.json" is not regular file or doesn't exist.
"/home/arthur/.config/UhhyouPlugins/style/style.json" is not regular file or doesn't exist.
commented

The error messages can be ignored. It is about missing optional config file.

As you pointed out, the use of pre compiled version might be the cause. Perhaps try a package provided by Fedora, and let me know if it works or not.

dnf install ardour7 # or ardour6.

same problem, if it work in Ubuntu I bet it's something related to fedora only, I won't be able to do much next days but I'll comment if I find something

commented

Could you download REAPER demo, and see if the plugins work on there? After extracting the archive, REAPER executable is found at reaper_linux_x86_64/REAPER/reaper.

Context: This comment shows Linux environment I used last time. There's a video on the linked comment, and the plugins were working on REAPER on Fedora at that point. So I'd like to know if the situation is changed.

Edit: Added link to REAPER download page.

@ryukau with Reaper is working indeed, I'll try to contact ardour devs to check what could be happening
image

Some updates, Paul answered (even though I asked in the wrong place) and here's what he said:

the problem is caused by using the wrong version of pango in either the plugin build or the ardour or both
basically someone built the plugin with a different version of pango than is used by the ardour.org ardour build
and that's illegal - plugins should be statically linked and not rely on the runtime environment to provide them with libraries they use
let me be more clear: a plugin can use whatever version of pango it wants, but it must statically link against pango
commented

Hmm. I think we hit a wall.

I looked into if all the required packages for VST 3 SDK contains static libraries. However, following packages are missing static library file (*.a).

  • libxkbcommon
  • libxkbcommon-x11
  • pango
Links to Packaged Files on Debian, Ubuntu, and Fedora

Debian unstable:

Ubuntu 22.04:

Fedora 38:

This means that I have to build and include those libraries into this repository, but I wouldn't like to maintain static libraries which I'm not familiar with.

My understanding is that the fully statically linked program may fail if the version of statically linked library is far diverged from the system library version. For example, if some config path is changed, then the program fails because it tries to search into old path. My concern is that I have no idea how stable above libraries were in the past, so I can't determine if including static library into this repository is good idea or not.

So I won't likely work on this issue. However if someone is able to provide a solution, pull requests are welcome. A solution in this case probably requires to:

  • Build and include static libraries.
  • Provide -static option to linker.

Probably, it only requires to change the codes in common/cmake.

Another option might be to find a way to dynamically link Ardour dependencies, and to provide the information to Fedora packager.

I'll keep open this issue, and sorry again for inconvenience.

@ryukau I see, anyway thanks for helping me with it.