paynebc / tunefish

Tunefish virtual analog synthesizer
GNU General Public License v3.0
249 stars 35 forks source link

Cannot compile on Ubuntu 20.04 #24

Open hellocatfood opened 3 years ago

hellocatfood commented 3 years ago

I'm trying to compile Tunefish on Ubuntu 20.04 but I get this error when I run make

Compiling include_juce_audio_plugin_client_VST2.cpp
In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:112,
                 from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:116:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  116 | e uint8& getAlpha() noexcept           { return comps [indexA]; }
      |                                                 ~~~~~~~~~~~~~^

../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getRed()’:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:117:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  117 | e uint8& getRed() noexcept             { return comps [indexR]; }
      |                                                 ~~~~~~~~~~~~~^

../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getGreen()’:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:118:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  118 | e uint8& getGreen() noexcept           { return comps [indexG]; }
      |                                                 ~~~~~~~~~~~~~^

../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getBlue()’:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:119:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  119 | e uint8& getBlue() noexcept            { return comps [indexB]; }
      |                                                 ~~~~~~~~~~~~~^

In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:134,
                 from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h: In instantiation of ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::replaceLine(juce::PixelRGB*, juce::PixelARGB, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = true]’:
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:628:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = true]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:2026:57:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::SubRectangleIteratorFloat::iterate(Renderer&) const [with Renderer = juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB, true>; SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1592:13:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with Iterator = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat; DestPixelType = juce::PixelRGB]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:2645:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1897:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1894:14:   required from here
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:714:34: warning: converting a packed ‘juce::PixelRGB’ pointer (alignment 1) to a ‘int’ pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  714 |                             auto d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:112,
                 from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:366:17: note: defined here
  366 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:134,
                 from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h: In instantiation of ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::replaceLine(juce::PixelRGB*, juce::PixelARGB, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = false]’:
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:628:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = false]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:2026:57:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::SubRectangleIteratorFloat::iterate(Renderer&) const [with Renderer = juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB, false>; SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1597:13:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with Iterator = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat; DestPixelType = juce::PixelRGB]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:2645:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1897:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:1894:14:   required from here
../../JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h:714:34: warning: converting a packed ‘juce::PixelRGB’ pointer (alignment 1) to a ‘int’ pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  714 |                             auto d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:112,
                 from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h:366:17: note: defined here
  366 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
hellocatfood commented 3 years ago

This fork adds support for compiling an lv2 version of tunefish. https://github.com/jpcima/tunefish/issues/4#issuecomment-664007978

paynebc commented 3 years ago

latest code should build fine. I built it on an ubuntu 20.04 machine successfully just now

dromer commented 3 years ago

Building on Debian Buster I just get:

dreamer@auditorium:~/Sources/_downloads/tunefish/src/tunefish4/Builds/LinuxMakefile$ make
Compiling include_juce_audio_plugin_client_VST2.cpp
In file included from ../../JuceLibraryCode/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:26,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:87:10: fatal error: pluginterfaces/vst2.x/aeffect.h: No such file or directory
 #include "pluginterfaces/vst2.x/aeffect.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:182: build/intermediate/Debug/include_juce_audio_plugin_client_VST2_dd551e08.o] Error 1
paynebc commented 3 years ago

You probably forgot to put the VST SDK in ~/SDKs The error is because the compiler cannot find its header files

dromer commented 3 years ago

Oh .. right. But VST2 SDK is no longer being distributed is it? Why not just include the Vestige header like https://github.com/DISTRHO/DPF/blob/master/distrho/src/vestige/vestige.h ?

paynebc commented 3 years ago

good idea, but this dependency is inside JUCE, not Tunefish source code. I suppose the JUCE developers would need to do the switch if possible

paynebc commented 3 years ago

No idea why there is so much fuzz about those headers, they're pretty trivial, they should just be made freely available and included in JUCE directly :(

dromer commented 3 years ago

Otherwise: is there an easy way to disable vst2 and only use vst3?

[edit: I edited the makefile, but it seems that juce_VST3_Wrapper.cpp still expects vst2 sdk to be there o.O] [edit2: ended up building the https://github.com/jpcima/tunefish fork]