jd-13 / Carve-Distortion

Carve is a two stage wave shaping distortion Audio Unit, with multiple wave shapes and serial/parallel routing options.
GNU General Public License v3.0
16 stars 1 forks source link

Errors building on Linux #23

Open samuel-zuk opened 1 year ago

samuel-zuk commented 1 year ago

Heyo, I was curious about this plugin and wanted to mess around with its underlying code, but upon setting things up, it would appear that I've run into some problems. I set the header search path to include the VST3 and WECore SDKs and installed the Montserrat font to the correct location, but upon running make, I get the following error log:

note: <USER> was manually search & replaced in this log file
Compiling include_juce_audio_plugin_client_VST3.cpp
In file included from ../../../../../.local/lib/JUCE/modules/juce_audio_processors/format_types/juce_VST3Headers.h:121,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:42,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp:26,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp:9:
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:296:2: warning: #warning is a GCC extension
  296 | #warning DEPRECATED No Linux implementation
      |  ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:296:2: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:320:2: warning: #warning is a GCC extension
  320 | #warning DEPRECATED No Linux implementation
      |  ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:320:2: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1598:10: warning: #warning is a GCC extension
 1598 |         #warning DEPRECATED No Linux implementation
      |          ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1598:10: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1627:10: warning: #warning is a GCC extension
 1627 |         #warning DEPRECATED No Linux implementation
      |          ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1627:10: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1926:2: warning: #warning is a GCC extension
 1926 | #warning DEPRECATED No Linux implementation
      |  ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:1926:2: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:2007:2: warning: #warning is a GCC extension
 2007 | #warning DEPRECATED No Linux implementation
      |  ^~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:2007:2: warning: #warning DEPRECATED No Linux implementation [-Wcpp]
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp: In member function ‘Steinberg::String& Steinberg::String::printFloat(double, Steinberg::uint32)’:
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:3390:85: warning: conversion from ‘long int’ to ‘double’ changes value from ‘9223372036854775807’ to ‘9.2233720368547758e+18’ [-Wfloat-conversion]
 3390 |         const bool withinInt64Boundaries = value <= std::numeric_limits<int64>::max () && value >= std::numeric_limits<int64>::lowest ();
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:3392:36: warning: conversion from ‘double’ to ‘Steinberg::int64’ {aka ‘long int’} may change value [-Wfloat-conversion]
 3392 |                 return printInt64 (value);
      |                                    ^~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:3395:52: warning: conversion from ‘double’ to ‘Steinberg::uint32’ {aka ‘unsigned int’} may change value [-Wfloat-conversion]
 3395 |         const uint32 valueExponent = absValue >= 1 ? std::log10 (absValue) : -std::log10 (absValue) + 1;
      |                                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:3412:28: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
 3412 |                 if (isWide && testChar16 (i, '0') || testChar8 (i, '0'))
      |                     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/home/<USER>/.local/lib/VST_SDK/vst3sdk/base/source/fstring.cpp:3414:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
 3414 |                 else if (isWide && testChar16(i,'.') || testChar8(i, '.'))
      |                          ~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:54:
../../../../../.local/lib/JUCE/modules/juce_audio_processors/format_types/juce_VST3Common.h: In function ‘bool juce::isLayoutTableValid()’:
../../../../../.local/lib/JUCE/modules/juce_audio_processors/format_types/juce_VST3Common.h:409:40: error: call of overloaded ‘countNumberOfBits(const Steinberg::Vst::SpeakerArrangement&)’ is ambiguous
  409 |         if ((size_t) countNumberOfBits (item.arrangement) != item.channelOrder.size())
      |                      ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from ../../../../../.local/lib/JUCE/modules/juce_core/juce_core.h:223,
                 from ../../../../../.local/lib/JUCE/modules/juce_graphics/juce_graphics.h:58,
                 from ../../../../../.local/lib/JUCE/modules/juce_gui_basics/juce_gui_basics.h:60,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client.h:54,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/../utility/juce_IncludeModuleHeaders.h:26,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:49:
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:551:12: note: candidate: ‘int juce::countNumberOfBits(uint32)’
  551 | inline int countNumberOfBits (uint32 n) noexcept
      |            ^~~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:562:12: note: candidate: ‘int juce::countNumberOfBits(uint64)’
  562 | inline int countNumberOfBits (uint64 n) noexcept
      |            ^~~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘virtual Steinberg::tresult juce::JuceVST3EditController::setChannelContextInfos(Steinberg::Vst::IAttributeList*)’:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:989:78: error: cannot bind non-const lvalue reference of type ‘Steinberg::int64&’ {aka ‘long int&’} to a value of type ‘juce::int64’ {aka ‘long long int’}
  989 |                     if (list->getInt (Vst::ChannelContext::kChannelColorKey, colour) == kResultTrue)
      |                                                                              ^~~~~~
In file included from /home/<USER>/.local/lib/VST_SDK/vst3sdk/pluginterfaces/vst/ivstchannelcontextinfo.h:20,
                 from ../../../../../.local/lib/JUCE/modules/juce_audio_processors/format_types/juce_VST3Headers.h:146:
/home/<USER>/.local/lib/VST_SDK/vst3sdk/pluginterfaces/vst/ivstattributes.h:50:62: note:   initializing argument 2 of ‘virtual Steinberg::tresult Steinberg::Vst::IAttributeList::getInt(AttrID, Steinberg::int64&)’
   50 |         virtual tresult PLUGIN_API getInt (AttrID id, int64& value) = 0;
      |                                                       ~~~~~~~^~~~~
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘virtual void juce::JuceVST3EditController::restartComponentOnMessageThread(juce::int32)’:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:1424:29: error: unable to deduce ‘auto*’ from ‘((juce::JuceVST3EditController*)this)->juce::JuceVST3EditController::<anonymous>.Steinberg::Vst::EditController::componentHandler’
 1424 |         if (auto* handler = componentHandler)
      |                             ^~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:1424:29: note:   mismatched types ‘auto*’ and ‘Steinberg::IPtr<Steinberg::Vst::IComponentHandler>’
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp: In member function ‘virtual juce::Optional<juce::AudioPlayHead::PositionInfo> juce::JuceVST3Component::getPosition() const’:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2916:37: error: no matching function for call to ‘jmax(juce::int64, const Steinberg::Vst::TSamples&)’
 2916 |         info.setTimeInSamples (jmax ((juce::int64) 0, processContext.projectTimeSamples));
      |                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:94:16: note: candidate: ‘template<class Type> constexpr Type juce::jmax(Type, Type)’
   94 | constexpr Type jmax (Type a, Type b)                                   { return a < b ? b : a; }
      |                ^~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:94:16: note:   template argument deduction/substitution failed:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2916:37: note:   deduced conflicting types for parameter ‘Type’ (‘long long int’ and ‘long int’)
 2916 |         info.setTimeInSamples (jmax ((juce::int64) 0, processContext.projectTimeSamples));
      |                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:98:16: note: candidate: ‘template<class Type> constexpr Type juce::jmax(Type, Type, Type)’
   98 | constexpr Type jmax (Type a, Type b, Type c)                           { return a < b ? (b < c ? c : b) : (a < c ? c : a); }
      |                ^~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:98:16: note:   template argument deduction/substitution failed:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2916:37: note:   deduced conflicting types for parameter ‘Type’ (‘long long int’ and ‘long int’)
 2916 |         info.setTimeInSamples (jmax ((juce::int64) 0, processContext.projectTimeSamples));
      |                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:102:16: note: candidate: ‘template<class Type> constexpr Type juce::jmax(Type, Type, Type, Type)’
  102 | constexpr Type jmax (Type a, Type b, Type c, Type d)                   { return jmax (a, jmax (b, c, d)); }
      |                ^~~~
../../../../../.local/lib/JUCE/modules/juce_core/maths/juce_MathsFunctions.h:102:16: note:   template argument deduction/substitution failed:
../../../../../.local/lib/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:2916:37: note:   deduced conflicting types for parameter ‘Type’ (‘long long int’ and ‘long int’)
 2916 |         info.setTimeInSamples (jmax ((juce::int64) 0, processContext.projectTimeSamples));
      |                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:158: build/intermediate/Debug/include_juce_audio_plugin_client_VST3_dd633589.o] Error 1

Some more relevant info about my system:

If you'd like more info, just let me know!

jd-13 commented 1 year ago

Hi, are you using the Projucer to configure the project? It sounds like you're using a separate VST SDK, could you try removing it from the search path? The one configured by JUCE/Projucer should work ok for this project.

If that's not the issue then it might be GCC 12, the latest I've tested the project with is 10.

There's a docker image that has everything set up, if you run the image with the directory containing this repo mounted to it, then you should be able to run Scripts/BuildLinux.sh. This is pretty much what the CI does for this project. https://hub.docker.com/layers/jackd13/audioplugins/gcc10/images/sha256-969ce03c48e1b58f48bde7566eee3386ebebb2a08d904cf6f0b4e496140b24a2?context=repo