Linux soHandle undefined symbol

Hi,

I’m trying to get my vst to run on linux so I can run targets like the validator or editorhost on my CI system. So far, I’ve not been able to get it to work and I’m facing the same issue no matter what I try.

My vst compiles properly on ubuntu 20.10, the .so file is created under the “VST3/test_vst.vst3/Contents/x86_64-linux/” folder after the build. However, when I try to load it from validator or editorhost, I get the following error:

Could not create Module for file:/home/mike/Documents/test_vst/generated/VST3/test_vst.vst3
Error: dlopen failed.
/home/mike/Documents/test_vst/generated/VST3/test_vst.vst3/Contents/x86_64-linux/test_vst.so: undefined symbol: _ZN6VSTGUI8soHandleE
[1] + Done “/usr/bin/gdb” --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-c4rjzab9.wsd" 1>"/tmp/Microsoft-MIEngine-Out-i9wsx2ea.2l3"

I’m using VST3 SDK 3.7.1.
I’ve linked my vst target to the vstgui and vstgui_support ones, but nothing changes.

What am I missing ?

The symbol missing is this one: vst3_public_sdk/vstguieditor.cpp at master · steinbergmedia/vst3_public_sdk · GitHub
You get this normally when linking with the vstgui_support library. Double check that this file is compiled when you build.

Thank Arne for your answer.
I managed to find a solution to the issue.

I have a custom made library I call “vstgenerator” which encapsulates all VST3 SDK specific code, and I linked it like this:

target_link_libraries(vstgenerator PUBLIC base sdk glui vstgui vstgui_support)

I then link my vst target to this library

target_link_libraries({target_vst} PUBLIC vstgenerator {REPO_NAME}_engine)

The code above produces the soHandle issue.

If I add vstgui (not vstgui_support) to my vst target, the problem is solved.

I would expect the vstgui link in vstgenerator to be transfered to my vst target, since the link is public. Please let me know if there is something I didn’t understand properly here, I’m not a cmake expert.

EDIT: Also, the above code worked perfectly on mac and windows already.

I’m also no cmake expert, so sorry no idea.

Linux tends to ship really old versions of cmake. If it works on mac/win, try upgrading your cmake installation from https://apt.kitware.com - this has solved several issues for me.

I use cmake 3.16.3 which is more recent version as the ones I have installed on my macOS or Windows setups.