pierreguillot / Camomile

An audio plugin with Pure Data embedded that allows to load and to control patches
GNU General Public License v3.0
910 stars 64 forks source link

JUCE compile errors on Linux - juce::PixelARGB::getAlpha() cannot bind packed field #164

Closed daveriedstra closed 4 years ago

daveriedstra commented 4 years ago
  1. Please provide an explicit title to the issue. JUCE compile errors on Linux - juce::PixelARGB::getAlpha() cannot bind packed field

  2. Describe your environment

    • OS: Pop!_OS 19.10
    • DAW: n/a
    • Plugin: n/a
    • Audio: n/a
    • etc.: occurs on master and on latest commit (09f3d8e on branch origin/dev/v1.0.7)
  3. Describe the problem or the feature request

    • Steps to reproduce
      • clone and compile per instructions in readme
    • Observed Results
      • compile errors; see log below
    • Expected Results
      • compiles successfully
Compiling include_juce_audio_plugin_client_VST2.cpp
In file included from ../../../Juce/modules/juce_graphics/juce_graphics.h:121,
                 from ../../../Juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:88,
                 from ../../../Juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
../../../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[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  116 |     forcedinline uint8& getAlpha() noexcept           { return comps [indexA]; }
      |                                                                ~~~~~~~~~~~~~^
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getRed()’:
../../../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[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  117 |     forcedinline uint8& getRed() noexcept             { return comps [indexR]; }
      |                                                                ~~~~~~~~~~~~~^
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getGreen()’:
../../../Juce/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 |     forcedinline uint8& getGreen() noexcept           { return comps [indexG]; }
      |                                                                ~~~~~~~~~~~~~^
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getBlue()’:
../../../Juce/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 |     forcedinline uint8& getBlue() noexcept            { return comps [indexB]; }
      |                                                                ~~~~~~~~~~~~~^
In file included from ../../../Juce/modules/juce_graphics/juce_graphics.h:143,
                 from ../../../Juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:88,
                 from ../../../Juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../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]’:
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:627:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = true]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:2025: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]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1591: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]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:2644:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = juce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1896:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1893:14:   required from here
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:713: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]
  713 |                             auto d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../../Juce/modules/juce_graphics/juce_graphics.h:121,
                 from ../../../Juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:88,
                 from ../../../Juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h:366:17: note: defined here
  366 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
In file included from ../../../Juce/modules/juce_graphics/juce_graphics.h:143,
                 from ../../../Juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:88,
                 from ../../../Juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../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]’:
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:627:17:   required from ‘void juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType, replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType = juce::PixelRGB; bool replaceExisting = false]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:2025: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]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1596: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]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:2644:67:   required from ‘void juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&, juce::PixelARGB, bool) const [with IteratorType = j
uce::RenderingHelpers::ClipRegions<juce::RenderingHelpers::SoftwareRendererSavedState>::RectangleListRegion::SubRectangleIteratorFloat]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1896:13:   required from ‘void juce::RenderingHelpers::ClipRegions<SavedStateType>::RectangleListRegion::fillRectWithColour(SavedStateType&, juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType = juce::RenderingHelpers::SoftwareRendererSavedState]’
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:1893:14:   required from here
../../../Juce/modules/juce_graphics/native/juce_RenderingHelpers.h:713: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]
  713 |                             auto d = reinterpret_cast<int*> (dest);
      |                                  ^
In file included from ../../../Juce/modules/juce_graphics/juce_graphics.h:121,
                 from ../../../Juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/../juce_audio_plugin_client.h:53,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/../utility/juce_IncludeModuleHeaders.h:27,
                 from ../../../Juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:88,
                 from ../../../Juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp:27,
                 from ../../JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp:9:
../../../Juce/modules/juce_graphics/colour/juce_PixelFormats.h:366:17: note: defined here
  366 | class JUCE_API  PixelRGB
      |                 ^~~~~~~~
make[1]: *** [Makefile:143: build/intermediate/Release/include_juce_audio_plugin_client_VST2_dd551e08.o] Error 1
make[1]: Leaving directory '/home/dried/Software/Camomile/Instrument/Builds/LinuxMakefile'
make: *** [Makefile:3: all] Error 2
jmaibaum commented 4 years ago

Seems that the version of JUCE bundled with Camomile needs an update to work with GCC >= 9.

Relevant upstream JUCE ticket: https://github.com/juce-framework/JUCE/issues/527 Upstream fix is in this commit: https://github.com/juce-framework/JUCE/commit/4e0adb2af8b424c43d22bd431011c9a6c57d36b6

pierreguillot commented 4 years ago

As I updated Juce origin/dev/v1.0.7, this should be fixed. Can you confirm?

jmaibaum commented 4 years ago

Yes, the origin/dev/v1.0.7 branch now compiles without errors on GCC 10.1.0. master is still failing though, as expected.