VST3 doesn't compile on Linux 16.04

And also doesn’t seem to like plugin names with spaces.

2020-07-02T15:19:18.3429940Z cp: cannot stat 'build/TAuto': No such file or directory
2020-07-02T15:19:18.3430777Z cp: cannot stat 'Filter.so': No such file or directory
2020-07-02T15:19:18.3432929Z make: [build/TAuto Filter.so] Error 1 (ignored)
2020-07-02T15:19:18.3433785Z Makefile:140: recipe for target 'build/TAuto Filter.so' failed
2020-07-02T15:19:18.3441339Z Compiling include_juce_audio_plugin_client_VST3.cpp
2020-07-02T15:19:18.4839215Z In file included from ../../../modules/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp:26:0,
2020-07-02T15:19:18.4840019Z                  from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp:9:
2020-07-02T15:19:18.4841163Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2021:23: warning: multi-character character constant [-Wmultichar]
2020-07-02T15:19:18.4841722Z          if (header == 'VstW')
2020-07-02T15:19:18.4842091Z                        ^
2020-07-02T15:19:18.4842634Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2024:23: warning: multi-character character constant [-Wmultichar]
2020-07-02T15:19:18.4843146Z          if (header == 'CcnK')
2020-07-02T15:19:18.4843731Z                        ^
2020-07-02T15:19:18.4844308Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2143:47: warning: multi-character character constant [-Wmultichar]
2020-07-02T15:19:18.4844983Z          tresult status = writeVST2Int (state, 'VstW');
2020-07-02T15:19:18.4845292Z                                                ^
2020-07-02T15:19:18.4845865Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2171:50: warning: multi-character character constant [-Wmultichar]
2020-07-02T15:19:18.4846410Z          bank.chunkMagic         = (int32) htonl ('CcnK');
2020-07-02T15:19:18.4846712Z                                                   ^
2020-07-02T15:19:18.4847294Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2173:50: warning: multi-character character constant [-Wmultichar]
2020-07-02T15:19:18.4847839Z          bank.fxMagic            = (int32) htonl ('FBCh');
2020-07-02T15:19:18.4848146Z                                                   ^
2020-07-02T15:19:19.9019236Z In file included from ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/vstfxstore.h:17:0,
2020-07-02T15:19:19.9019972Z                  from ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:61,
2020-07-02T15:19:19.9040230Z                  from ../../../modules/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp:26,
2020-07-02T15:19:19.9040948Z                  from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp:9:
2020-07-02T15:19:19.9041925Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:127:32: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9042528Z  typedef VstIntPtr (VSTCALLBACK *audioMasterCallback) (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
2020-07-02T15:19:19.9042912Z                                 ^
2020-07-02T15:19:19.9043820Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:128:32: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9044290Z  typedef VstIntPtr (VSTCALLBACK *AEffectDispatcherProc) (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
2020-07-02T15:19:19.9044661Z                                 ^
2020-07-02T15:19:19.9045201Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:129:27: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9045639Z  typedef void (VSTCALLBACK *AEffectProcessProc) (AEffect* effect, float** inputs, float** outputs, VstInt32 sampleFrames);
2020-07-02T15:19:19.9045986Z                            ^
2020-07-02T15:19:19.9046472Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:130:27: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9046920Z  typedef void (VSTCALLBACK *AEffectProcessDoubleProc) (AEffect* effect, double** inputs, double** outputs, VstInt32 sampleFrames);
2020-07-02T15:19:19.9047269Z                            ^
2020-07-02T15:19:19.9047849Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:131:27: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9048273Z  typedef void (VSTCALLBACK *AEffectSetParameterProc) (AEffect* effect, VstInt32 index, float parameter);
2020-07-02T15:19:19.9048596Z                            ^
2020-07-02T15:19:19.9051536Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:132:28: error: expected ‘)’ before ‘*’ token
2020-07-02T15:19:19.9052055Z  typedef float (VSTCALLBACK *AEffectGetParameterProc) (AEffect* effect, VstInt32 index);
2020-07-02T15:19:19.9052485Z                             ^
2020-07-02T15:19:19.9053061Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:151:5: error: ‘AEffectDispatcherProc’ does not name a type
2020-07-02T15:19:19.9053441Z      AEffectDispatcherProc dispatcher;
2020-07-02T15:19:19.9053679Z      ^
2020-07-02T15:19:19.9054155Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:154:5: error: ‘AEffectProcessProc’ does not name a type
2020-07-02T15:19:19.9054572Z      AEffectProcessProc DECLARE_VST_DEPRECATED (process);
2020-07-02T15:19:19.9054828Z      ^
2020-07-02T15:19:19.9055299Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:157:5: error: ‘AEffectSetParameterProc’ does not name a type
2020-07-02T15:19:19.9055672Z      AEffectSetParameterProc setParameter;
2020-07-02T15:19:19.9055911Z      ^
2020-07-02T15:19:19.9056382Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:160:5: error: ‘AEffectGetParameterProc’ does not name a type
2020-07-02T15:19:19.9056751Z      AEffectGetParameterProc getParameter;
2020-07-02T15:19:19.9056980Z      ^
2020-07-02T15:19:19.9057444Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:185:5: error: ‘AEffectProcessProc’ does not name a type
2020-07-02T15:19:19.9057806Z      AEffectProcessProc processReplacing;
2020-07-02T15:19:19.9058036Z      ^
2020-07-02T15:19:19.9058511Z ../../../SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h:189:5: error: ‘AEffectProcessDoubleProc’ does not name a type
2020-07-02T15:19:19.9058902Z      AEffectProcessDoubleProc processDoubleReplacing;
2020-07-02T15:19:19.9059148Z      ^
2020-07-02T15:19:19.9591494Z In file included from ../../../modules/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp:26:0,
2020-07-02T15:19:19.9592527Z                  from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp:9:
2020-07-02T15:19:19.9593555Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘bool juce::JuceVST3Component::loadVST2VstWBlock(const char*, int)’:
2020-07-02T15:19:19.9594346Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:1957:76: error: ‘htonl’ was not declared in this scope
2020-07-02T15:19:19.9594814Z          auto headerLen = (int) htonl (readUnaligned<juce::int32> (data + 4)) + 8;
2020-07-02T15:19:19.9595191Z                                                                             ^
2020-07-02T15:19:19.9595866Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘bool juce::JuceVST3Component::loadVST2CcnKBlock(const char*, int)’:
2020-07-02T15:19:19.9596839Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:1972:72: error: ‘htonl’ was not declared in this scope
2020-07-02T15:19:19.9597405Z                                     (int) htonl (bank->content.data.size)));
2020-07-02T15:19:19.9597757Z                                                                         ^
2020-07-02T15:19:19.9598425Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘bool juce::JuceVST3Component::loadVST2CompatibleState(const char*, int)’:
2020-07-02T15:19:19.9599177Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2019:63: error: ‘htonl’ was not declared in this scope
2020-07-02T15:19:19.9599724Z          auto header = htonl (readUnaligned<juce::int32> (data));
2020-07-02T15:19:19.9600072Z                                                                ^
2020-07-02T15:19:19.9612985Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In static member function ‘static Steinberg::tresult juce::JuceVST3Component::writeVST2Int(Steinberg::IBStream*, int)’:
2020-07-02T15:19:19.9613984Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2137:47: error: ‘htonl’ was not declared in this scope
2020-07-02T15:19:19.9614410Z          juce::int32 t = (juce::int32) htonl (n);
2020-07-02T15:19:19.9614706Z                                                ^
2020-07-02T15:19:19.9617983Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘virtual Steinberg::tresult juce::JuceVST3Component::getState(Steinberg::IBStream*)’:
2020-07-02T15:19:19.9618778Z ../../../modules/juce/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2171:56: error: ‘htonl’ was not declared in this scope
2020-07-02T15:19:19.9619339Z          bank.chunkMagic         = (int32) htonl ('CcnK');
2020-07-02T15:19:19.9619655Z                                                         ^
2020-07-02T15:19:20.8595106Z Makefile:177: recipe for target 'build/intermediate/Release/include_juce_audio_plugin_client_VST3_dd633589.o' failed
2020-07-02T15:19:20.8595896Z make: *** [build/intermediate/Release/include_juce_audio_plugin_client_VST3_dd633589.o] Error 1
2020-07-02T15:19:20.8618011Z 
2020-07-02T15:19:20.8660400Z ##[error]Bash exited with code '1'.
2020-07-02T15:19:20.8680650Z ##[section]Finishing: Linux Build

In modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
After this line:

#if JucePlugin_Build_VST3 && (__APPLE_CPP__ || __APPLE_CC__ || _WIN32 || _WIN64 || LINUX || __linux__)

Put this:

#if JUCE_LINUX
 #include <arpa/inet.h>
#endif
1 Like
JUCE_COPYCMD_VST := $(JUCE_OUTDIR)/TAuto Filter.so $(JUCE_VSTDESTDIR)

This line in the Makefile needs quotes.

Thanks, both of these issues are now fixed on develop.

1 Like