jpcima / tunefish

Tunefish virtual analog synthesizer
GNU General Public License v3.0
4 stars 1 forks source link

Cannot build on Ubuntu 20.04 #4

Open hellocatfood opened 3 years ago

hellocatfood commented 3 years ago

I'm trying to build tunefish on Ubuntu 20.04. I've installed the required dependencies but the build fails. If I follow the instructions from LV2-README.txt and run make -C src/tunefish4/Builds/LinuxMakefile -f Makefile.LV2 CONFIG=Release the build fails:

make -C src/tunefish4/Builds/LinuxMakefile -f Makefile.LV2 CONFIG=Release
make: Entering directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile'
make: Makefile.LV2: No such file or directory
make: *** No rule to make target 'Makefile.LV2'. Stop.
make: Leaving directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile'

If I run the instructions from the README and run make inside src/tunefish4/Builds/LinuxMakefile it fails too:

Compiling include_juce_audio_plugin_client_VST2.cpp
../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:10: fatal error: juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp: No such file or directory
    9 | #include <juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:138: build/intermediate/Debug/include_juce_audio_plugin_client_VST2_dd551e08.o] Error 1
jpcima commented 3 years ago

Hello, may you be missing submodules? Try git submodule update --init --recursive

hellocatfood commented 3 years ago

Thanks for that. However, when I run make -C src/tunefish4/Builds/LinuxMakefile -f Makefile.LV2 CONFIG=Release I still get this error:

make: Entering directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile'
make: Makefile.LV2: No such file or directory
make: *** No rule to make target 'Makefile.LV2'. Stop.
make: Leaving directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile

Makefile.LV2 doesn't exist.

hellocatfood commented 3 years ago

I tried running make -C LinuxMakefile directly in src/tunefish4/Builds and got these errors:

make: Entering directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile'
Compiling include_juce_audio_plugin_client_VST2.cpp
In file included from ../../../../thirdparty/JUCE/modules/juce_graphics/juce_graphics.h:111,
                 from ../../../../thirdparty/JUCE/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:29,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h:114:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  114 | e uint8& getAlpha() noexcept           { return comps [indexA]; }
      |                                                 ~~~~~~~~~~~~~^

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

../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getGreen()’:
../../../../thirdparty/JUCE/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[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  116 | e uint8& getGreen() noexcept           { return comps [indexG]; }
      |                                                 ~~~~~~~~~~~~~^

../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getBlue()’:
../../../../thirdparty/JUCE/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[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  117 | e uint8& getBlue() noexcept            { return comps [indexB]; }
      |                                                 ~~~~~~~~~~~~~^

In file included from ../../../../thirdparty/JUCE/modules/juce_graphics/juce_graphics.h:133,
                 from ../../../../thirdparty/JUCE/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:29,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../../thirdparty/JUCE/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]’:
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:638:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLineFull(int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = true]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1891:29:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::SubRectangleIterator::iterate(Renderer&) const [with Renderer = juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB, true>; SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1515: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::SubRectangleIterator; DestPixelType = juce::PixelRGB]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2556:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIterator]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1816:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, const juce::Rectangle<int>&, juce::PixelARGB, bool) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1813:14:   required from here
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:683: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]
  683 |                             int* d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../../../thirdparty/JUCE/modules/juce_graphics/juce_graphics.h:111,
                 from ../../../../thirdparty/JUCE/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:29,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h:362:17: note: defined here
  362 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
In file included from ../../../../thirdparty/JUCE/modules/juce_graphics/juce_graphics.h:133,
                 from ../../../../thirdparty/JUCE/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:29,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../../thirdparty/JUCE/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]’:
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:638:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLineFull(int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = false]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1891:29:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::SubRectangleIterator::iterate(Renderer&) const [with Renderer = juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB, false>; SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1520: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::SubRectangleIterator; DestPixelType = juce::PixelRGB]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2556:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIterator]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1816:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, const juce::Rectangle<int>&, juce::PixelARGB, bool) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1813:14:   required from here
../../../../thirdparty/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:683: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]
  683 |                             int* d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../../../thirdparty/JUCE/modules/juce_graphics/juce_graphics.h:111,
                 from ../../../../thirdparty/JUCE/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:29,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:78,
                 from ../../../../thirdparty/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../../thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h:362:17: note: defined here
  362 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
make: *** [Makefile:138: build/intermediate/Debug/include_juce_audio_plugin_client_VST2_dd551e08.o] Error 1
make: Leaving directory '/home/hellocatfood/Desktop/tunefish/src/tunefish4/Builds/LinuxMakefile'
jpcima commented 3 years ago

It is a known problem, this version of Juce became broken sometime around gcc version 9. The simpler workaround it's to build with clang as compiler. This should do make -C src/tunefish4/Builds/LinuxMakefile -f Makefile.LV2 CONFIG=Release CC=clang CXX=clang++

hellocatfood commented 3 years ago

As I said in my above comment Makefile.LV2 doesn't exist and so I had to run the command without it

make -C src/tunefish4/Builds/LinuxMakefile CONFIG=Release CC=clang CXX=clang++

This worked and compiled the lv2 version. It didn't work in Ardour (failed to instantiate) but did work in Zrythm.

farvardin commented 3 years ago

@jpcima : hello, have you tracked the Makefile.LV2 in git? It's missing from the repo.

jpcima commented 3 years ago

Hi, I believe what happened is that I updated the build system some time ago, such that LV2 is no longer a separate Makefile. I'm updating the README to reflect that. Try without -f Makefile.LV2.

farvardin commented 3 years ago

thank you very much, it's working now, I've compiled it and made some sound with it!