Linux/Ubuntu plugins compile but will not open in Audacity or AudioPluginHost

I’m trying to build plug-ins in Linux. At first I thought it was the code changes I made to, but then I tried another plug-in that runs on my Mac in Logic, Ableton, and the AudioPluginHost, and this one also fails to get recognized in Linux by both Audacity and the AudioPluginHost. I also tried the simple GainPlugin demo provided and this also fails to load.

The AudioPluginHost gives the message: “Note that the following files appeared to be plugin files, but failed to load correctly:” and then it lists the plug-ins.

The standalone app of all my plugins run on Linux, but something is going on with the VST build. Not sure if it could be related, but I had issues getting the Release build to complete with link-time optimization enabled.

Linking Compressor - Shared Code
ar: build/intermediate/Release/PluginProcessor_a059e380.o: plugin needed to handle lto object

Linking Compressor - VST
build/Compressor.a(include_juce_audio_plugin_client_utils_e32edaee.o): In function createPluginFilterOfType(juce::AudioProcessor::WrapperType)': include_juce_audio_plugin_client_utils.cpp:(.text+0x20f): undefined reference to createPluginFilter()’

So I disabled link-time optimization and it built without this error. Again, not sure if this is related to the plug-ins not loading correctly in Audacity or the PluginHost, but I thought I’d include it just in case.

I tried downloading the latest VST_SDK, still no changes. I just built JUCE on Linux yesterday, and again, the standalone applications are working in all cases. Any help would be greatly appreciated.

I don’t think this error is related to LTO.

The latest VST SDK doesn’t include the VST2 headers, so this won’t have helped. Are you perhaps attempting to build a VST3? At the moment JUCE does not support building or hosting VST3 plug-ins on Linux (but we’re working on it).

It was not VST3. The Debug build was working fine and the Release build only worked when I disabled link-time optimization.

Since then, I downloaded 4.3.1 and everything compiles just fine. I still have some issues with Audacity, but the AudioPluginHost is able to load my plugins, and Ardour can as well.

Obviously that’s not a real solution to the original problem, but it makes me think it is not something on my CPU…

Building with LTO support on Linux requires a bit more effort - you will probably have to specify the correct LTO-aware linker to use on your system:

https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ

That is not the cause of plug-ins failing to load in a host however.

Something else is amiss with either your system or how you’re building plug-ins. I’ve just tried building the AudioPluginDemo and the GainPlugin projects and they load correctly in both Ardour and REAPER.