Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685202 - media-libs/libopenshot-0.2.2: juce_PixelFormats.h:113:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
Summary: media-libs/libopenshot-0.2.2: juce_PixelFormats.h:113:77: error: cannot bind ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 686928 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-06 15:37 UTC by Kobboi
Modified: 2019-07-29 06:57 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,70.42 KB, text/x-log)
2019-05-06 15:37 UTC, Kobboi
Details
Patch of juce_PixelFormats.h from media-libs/libopenshot-audio (pixelformats.patch,1.45 KB, patch)
2019-05-27 10:03 UTC, thulle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2019-05-06 15:37:09 UTC
[ 13%] Building CXX object src/CMakeFiles/openshot.dir/AudioResampler.cpp.o
cd /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2_build/src && /usr/bin/x86_64-pc-linux-gnu-g++ -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DOPENSHOT_IMAGEMAGICK_COMPATIBILITY=0 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DUSE_IMAGEMAGICK=1 -Dopenshot_EXPORTS -I/usr/include/ImageMagick-7 -I/usr/include/libopenshot-audio -I/var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/../thirdparty/jsoncpp/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtMultimediaWidgets   -DNDEBUG -std=c++11           -g -ggdb  -fopenmp  -fPIC   -fPIC -std=gnu++11 -o CMakeFiles/openshot.dir/AudioResampler.cpp.o -c /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/AudioResampler.cpp
In file included from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/juce_graphics.h:82,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/juce_gui_basics.h:28,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:28,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/JuceHeader.h:20,
                 from /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/../include/AudioResampler.h:41,
                 from /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/AudioResampler.cpp:28:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:113:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  113 |     forcedinline uint8& getAlpha() noexcept           { return comps [indexA]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getRed()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:114:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  114 |     forcedinline uint8& getRed() noexcept             { return comps [indexR]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getGreen()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:115:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  115 |     forcedinline uint8& getGreen() noexcept           { return comps [indexG]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getBlue()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:116:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  116 |     forcedinline uint8& getBlue() noexcept            { return comps [indexB]; }
      |                                                                ~~~~~~~~~~~~~^
In file included from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/juce_graphics.h:82,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/juce_gui_basics.h:28,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:28,
                 from /usr/include/libopenshot-audio/JuceLibraryCode/JuceHeader.h:20,
                 from /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/../include/AudioBufferSource.h:40,
                 from /var/tmp/portage/media-libs/libopenshot-0.2.2/work/libopenshot-0.2.2/src/AudioBufferSource.cpp:28:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getAlpha()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:113:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  113 |     forcedinline uint8& getAlpha() noexcept           { return comps [indexA]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getRed()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:114:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  114 |     forcedinline uint8& getRed() noexcept             { return comps [indexR]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getGreen()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:115:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  115 |     forcedinline uint8& getGreen() noexcept           { return comps [indexG]; }
      |                                                                ~~~~~~~~~~~~~^
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h: In member function ‘juce::uint8& juce::PixelARGB::getBlue()’:
/usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_PixelFormats.h:116:77: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::<anonymous>.juce::PixelARGB::<unnamed union>::comps[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
  116 |     forcedinline uint8& getBlue() noexcept            { return comps [indexB]; }
      |                                                                ~~~~~~~~~~~~~^
Comment 1 Kobboi 2019-05-06 15:37:34 UTC
Created attachment 575406 [details]
build.log
Comment 2 Kobboi 2019-05-06 15:37:58 UTC
Compiled fine on April 24th. Now failing with GCC 9.1
Comment 3 Michael Baer 2019-05-18 21:33:52 UTC
Had the same problem. Found some information about reference to packed field here:
https://stackoverflow.com/questions/27491432/why-cant-i-return-a-reference-to-a-packed-field#

I changed the lines 116ff of /usr/include/libopenshot-audio/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
from
    forcedinline uint8& getAlpha() noexcept { return comps [indexA]; }
    forcedinline uint8& getRed() noexcept { return comps [indexR]; }
    forcedinline uint8& getGreen() noexcept { return comps [indexG]; }
    forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
to
    forcedinline uint8& getAlpha() noexcept { return (uint8 &) comps [indexA]; }
    forcedinline uint8& getRed() noexcept { return (uint8 &) comps [indexR]; }
    forcedinline uint8& getGreen() noexcept { return (uint8 &) comps [indexG]; }
    forcedinline uint8& getBlue() noexcept { return (uint8 &) comps [indexB]; }


At least, libopenshot is compiling and installing fine after the changes.
I'm not quiet sure, if it causes some trouble. Use at your own risk...
Comment 4 thulle 2019-05-27 10:03:35 UTC
Created attachment 577872 [details, diff]
Patch of juce_PixelFormats.h from media-libs/libopenshot-audio

Made a patch from Michaels comment
Comment 5 thulle 2019-05-27 10:05:10 UTC
After throwing the patch in /etc/portage/patches/media-libs/libopenshot-audio and emerging libopenshot-audio, libopenshot-0.2.2 compiles fine, as commented by Michael.
Comment 6 Stefan Strogin gentoo-dev 2019-06-11 20:38:14 UTC
*** Bug 686928 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2019-06-13 15:31:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0f2bd393ef4f222b699a647e9b93989bb9b0e2c

commit c0f2bd393ef4f222b699a647e9b93989bb9b0e2c
Author:     Stefan Strogin <steils@gentoo.org>
AuthorDate: 2019-06-12 15:16:13 +0000
Commit:     Stefan Strogin <steils@gentoo.org>
CommitDate: 2019-06-13 15:30:44 +0000

    media-libs/libopenshot-audio: bump version to 0.1.9_pre20190502
    
    Closes: https://bugs.gentoo.org/685136
    Closes: https://bugs.gentoo.org/685202
    Package-Manager: Portage-2.3.67, Repoman-2.3.14
    Signed-off-by: Stefan Strogin <steils@gentoo.org>

 media-libs/libopenshot-audio/Manifest              |  1 +
 .../libopenshot-audio-0.1.9_pre20190502.ebuild     | 29 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)