-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error on gcc9 #1222
Comments
… On Wed, Jun 19, 2019 at 5:42 PM Teteros ***@***.***> wrote:
A lot of these spit out from the JUCE lib.
Errors such as:
g++ -mfpmath=sse -msse2 -Wall -Werror OpenGL/CheckOpenGL.cpp -c `cat buildtype.opt` -Ibin/packages/gc-7.4.16/include -IQt/ -I/usr/include/python2.7 `cat flagopts.opt` -Werror=array-bou
nds -msse2 -fomit-frame-pointer -DFOR_LINUX -DQT_X11EXTRAS_LIB -I/usr/include/qt/QtX11Extras -I/usr/include/qt -I/usr/include/qt/QtCore -DQT_GUI_LIB -I/usr/include/qt/QtGui -DQT_CORE_LIB
-DWITH_FAUST_DEV -DWITH_PD -I/home/tete/boost_1_70_0 -I/home/tete/boost_1_67_0 -I/home/tete/boost_1_63_0 -I /usr/include/vst36 -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/VST3\ SDK -I ~/SDK
s/vstsdk2.4/ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference -Wduplicated-cond -W
duplicated-branches -Wlogical-op -Wrestrict -DUSE_QT5 -Wmissing-declarations -DNDEBUG -Wno-class-memaccess -Wno-parentheses -std=gnu++11 `pkg-config --cflags Qt5Gui --cflags Qt5Networ
k --cflags Qt5OpenGL --cflags Qt5Widgets --cflags Qt5WebKitWidgets --cflags Qt5WebKit --cflags Qt5Concurrent` -Ibin/packages/qhttpserver-master/src -I/home/tete/code/aursrc/radium/src/ra
dium-5.9.67/bin/packages/QScintilla_gpl-2.10.8/Qt4Qt5 -DQHTTPSERVER_EXPORT -fPIC -Wno-deprecated-copy -Werror=array-bounds -msse2 -fomit-frame-pointer -DFOR_LINUX -DQT_X11EXTRAS_LIB -I/
usr/include/qt/QtX11Extras -I/usr/include/qt -I/usr/include/qt/QtCore -DQT_GUI_LIB -I/usr/include/qt/QtGui -DQT_CORE_LIB -DWITH_FAUST_DEV -DWITH_PD -std=gnu++11 -DCOMPILE_EXECUTABLE -o
radium_check_opengl.o
In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:121,
from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
from ../../../audio/../pluginhost/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h:56,
from ../../../audio/../pluginhost/JuceLibraryCode/JuceHeader.h:18,
from ../../../audio/Juce_plugin_scanner.cpp:11:
../../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::<u
nnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
116 | forcedinline 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::<u
nnamed union>::comps[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
117 | forcedinline 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::<u
nnamed union>::comps[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
118 | forcedinline 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::<u
nnamed union>::comps[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
119 | forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
| ~~~~~~~~~~~~~^
gcc --version
gcc (GCC) 9.1.0
**Note that clang 8.0 and setting USE_CLANG=1 in build_linux_common.sh
compiles succesfully*
So this is a gcc issue.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1222?email_source=notifications&email_token=AAIX3J62APJ3OYMCVMWC5HDP3JHVNA5CNFSM4HZK6U6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2N4A7Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIX3J7FF26Y3MZSHV7ACL3P3JHVNANCNFSM4HZK6U6A>
.
|
You can use this patch. It shouldn't lower performance notably for radium
since radium only uses juce graphics for the gui elements above and below
vst plugin guis.
diff --git
a/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
b/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
index c57ad53..cd944f8 100644
---
a/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
+++
b/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
@@ -111,12 +111,14 @@ public:
forcedinline uint8 getGreen() const noexcept { return
components.g; }
forcedinline uint8 getBlue() const noexcept { return
components.b; }
- #if JUCE_GCC
+#if JUCE_GCC
// NB these are here as a workaround because GCC refuses to bind to
packed values.
+ /*
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]; }
+ */
#else
forcedinline uint8& getAlpha() noexcept { return
components.a; }
forcedinline uint8& getRed() noexcept { return
components.r; }
On Wed, Jun 19, 2019 at 8:59 PM Kjetil Matheussen <k.s.matheussen@gmail.com>
wrote:
… see juce-framework/JUCE#527
On Wed, Jun 19, 2019 at 5:42 PM Teteros ***@***.***> wrote:
> A lot of these spit out from the JUCE lib.
> Errors such as:
>
> g++ -mfpmath=sse -msse2 -Wall -Werror OpenGL/CheckOpenGL.cpp -c `cat buildtype.opt` -Ibin/packages/gc-7.4.16/include -IQt/ -I/usr/include/python2.7 `cat flagopts.opt` -Werror=array-bou
>
> nds -msse2 -fomit-frame-pointer -DFOR_LINUX -DQT_X11EXTRAS_LIB -I/usr/include/qt/QtX11Extras -I/usr/include/qt -I/usr/include/qt/QtCore -DQT_GUI_LIB -I/usr/include/qt/QtGui -DQT_CORE_LIB
>
> -DWITH_FAUST_DEV -DWITH_PD -I/home/tete/boost_1_70_0 -I/home/tete/boost_1_67_0 -I/home/tete/boost_1_63_0 -I /usr/include/vst36 -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/VST3\ SDK -I ~/SDK
>
> s/vstsdk2.4/ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference -Wduplicated-cond -W
>
> duplicated-branches -Wlogical-op -Wrestrict -DUSE_QT5 -Wmissing-declarations -DNDEBUG -Wno-class-memaccess -Wno-parentheses -std=gnu++11 `pkg-config --cflags Qt5Gui --cflags Qt5Networ
>
> k --cflags Qt5OpenGL --cflags Qt5Widgets --cflags Qt5WebKitWidgets --cflags Qt5WebKit --cflags Qt5Concurrent` -Ibin/packages/qhttpserver-master/src -I/home/tete/code/aursrc/radium/src/ra
>
> dium-5.9.67/bin/packages/QScintilla_gpl-2.10.8/Qt4Qt5 -DQHTTPSERVER_EXPORT -fPIC -Wno-deprecated-copy -Werror=array-bounds -msse2 -fomit-frame-pointer -DFOR_LINUX -DQT_X11EXTRAS_LIB -I/
>
> usr/include/qt/QtX11Extras -I/usr/include/qt -I/usr/include/qt/QtCore -DQT_GUI_LIB -I/usr/include/qt/QtGui -DQT_CORE_LIB -DWITH_FAUST_DEV -DWITH_PD -std=gnu++11 -DCOMPILE_EXECUTABLE -o
>
> radium_check_opengl.o
>
> In file included from ../../JuceLibraryCode/modules/juce_graphics/juce_graphics.h:121,
>
> from ../../JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h:57,
>
> from ../../../audio/../pluginhost/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h:56,
>
> from ../../../audio/../pluginhost/JuceLibraryCode/JuceHeader.h:18,
>
> from ../../../audio/Juce_plugin_scanner.cpp:11:
>
> ../../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::<u
>
> nnamed union>::comps[3]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
>
> 116 | forcedinline 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::<u
>
> nnamed union>::comps[2]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
>
> 117 | forcedinline 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::<u
>
> nnamed union>::comps[1]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
>
> 118 | forcedinline 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::<u
>
> nnamed union>::comps[0]’ to ‘juce::uint8&’ {aka ‘unsigned char&’}
>
> 119 | forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
>
> | ~~~~~~~~~~~~~^
>
>
> gcc --version
> gcc (GCC) 9.1.0
>
> **Note that clang 8.0 and setting USE_CLANG=1 in build_linux_common.sh
> compiles succesfully*
> So this is a gcc issue.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#1222?email_source=notifications&email_token=AAIX3J62APJ3OYMCVMWC5HDP3JHVNA5CNFSM4HZK6U6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2N4A7Q>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAIX3J7FF26Y3MZSHV7ACL3P3JHVNANCNFSM4HZK6U6A>
> .
>
|
Thanks compile with gcc9 works with this patch diff -aur --no-dereference radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
--- radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-19 13:56:47.000000000 +0100
+++ radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-20 16:52:16.099421784 +0100
@@ -113,10 +113,11 @@
#if JUCE_GCC
// NB these are here as a workaround because GCC refuses to bind to packed values.
- 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]; }
+ // No longer needed on gcc9
+ // 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]; }
#else
forcedinline uint8& getAlpha() noexcept { return components.a; }
forcedinline uint8& getRed() noexcept { return components.r; } Will this be merged or can't easily be set conditinally for gcc9+ only? Also is gcc or clang recommended to build radium on linux with in general? It would be convenient if |
The comment is wrong though. It's not that it's no longer needed, but
it doesn't compile in gcc9. Dependening on the usage, the lines that
are commented out either changes the behavior of the program, or
optimizes the program. But for Radium's usage, it's not important. In
the JUCE ticket I linked to, there is a proper fix, but it's probably
safer to just comment out the lines.
…On Thu, Jun 20, 2019 at 6:53 PM Teteros ***@***.***> wrote:
Thanks compile with gcc9 works with this patch
(although it was malformed in the email so did it manually):
diff -aur --no-dereference radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
--- radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-19 13:56:47.000000000 +0100
+++ radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-20 16:52:16.099421784 +0100
@@ -113,10 +113,11 @@
#if JUCE_GCC
// NB these are here as a workaround because GCC refuses to bind to packed values.
- 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]; }
+ // No longer needed on gcc9
+ // 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]; }
#else
forcedinline uint8& getAlpha() noexcept { return components.a; }
forcedinline uint8& getRed() noexcept { return components.r; }
Will this be merged or can't easily be conditinally set for gcc9+ only?
Also is gcc or clang recommended to build radium on linux with in general?
clang build seems faster so far.
It would be convenient if USE_CLANG=1 could be set on environment, much like BUILDTYPE or RADIUM_QT_VERSION is, so that editing makefile by hand is not necessary.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
On Thu, Jun 20, 2019 at 6:53 PM Teteros ***@***.***> wrote:
Thanks compile with gcc9 works with this patch
(although it was malformed in the email so did it manually):
diff -aur --no-dereference radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h--- radium-5.9.67.pristine/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-19 13:56:47.000000000 +0100+++ radium-5.9.67.new/pluginhost/JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2019-06-20 16:52:16.099421784 +0100@@ -113,10 +113,11 @@
#if JUCE_GCC
// NB these are here as a workaround because GCC refuses to bind to packed values.- 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]; }+ // No longer needed on gcc9+ // 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]; }
#else
forcedinline uint8& getAlpha() noexcept { return components.a; }
forcedinline uint8& getRed() noexcept { return components.r; }
Will this be merged or can't easily be conditinally set for gcc9+ only?
Radium uses gcc 8, so I rather not want to spend time on this issue.
Also is gcc or clang recommended to build radium on linux with in general?
clang build seems faster so far.
It would be convenient if USE_CLANG=1 could be set on environment, much
like BUILDTYPE or RADIUM_QT_VERSION is, so that editing makefile by hand
is not necessary.
clang should work on macos, and gcc should work on linux and windows. I
would probably have used clang for development due to lower compilation
time (for run-time, gcc seems slightly faster in the benchmarks), but
backtrace in the crashreporter crashes with clang for me. Please test help
-> test crashreporter if you set USE_CLANG=1
|
"no longer needed" in the context of gcc9 being default in the distro.
It's fine, I think it's a good heads up when the target updates to gcc9 eventually. Currently the AUR package is using clang, I might switch that back with above patch next radium version.
Interesting, I've tested the crash on radium built with USE_CLANG=1 and send you a ticket through the UI, everything seems to work. Have you received it? |
On Fri, Jun 21, 2019 at 12:55 AM Teteros ***@***.***> wrote:
The comment is wrong though. It's not that it's no longer needed, but
it doesn't compile in gcc9.
"no longer needed" in the context of gcc9 being default in the distro.
The original code there is annotated by JUCE devs as workaround for gcc<9,
and gcc9 seems to bind to packed values now (or the workaround is bad)
Radium uses gcc 8, so I rather not want to spend time on this issue.
It's fine, I think it's a good heads up when the target updates to gcc9
eventually. Currently the AUR package is using clang, I might switch that
back with above patch next radium version.
backtrace in the crashreporter crashes with clang for me
Interesting, I've tested the crash on radium built with USE_CLANG=1 and
send you a ticket through the UI, everything seems to work. Have you
received it?
Yes. For me, radium crashes before the crash reporter window opens. Got
something to do with libbfd, but it's probably just my computer that is
screwed up.
|
Done. Called it RADIUM_USE_CLANG |
Just to elaborate my answer. To lower the amount of work I rather want to upgrade all of JUCE, not just a patch of it. And I also rather not want to upgrade juce right now (if there is a already a release containing a fix for this, which I doubt) since I upgraded juce just a few months ago, and it's a little bit of work to upgrade juce. I'm not 100% sure commenting out those lines is okay either, so I don't want that quick-fix in the repository. I do use the workaround on my main development computer though, which has gcc9, and it seems to run fine. |
I've also added a test now during startup to check if backtrace crashes, just to be sure. I guess clang should be fine to use on linux. It's good that clang is used/tested on more than one platform. |
For the record, JUCE was updated in 5adf690 which fixed this issue, so the GCC9 note in README file linking to this issue can be safely removed @kmatheussen |
Thanks, fixed. |
A lot of these spit out from the JUCE lib.
Errors such as:
gcc --version
gcc (GCC) 9.1.0
*Note that clang 8.0 and setting USE_CLANG=1 in build_linux_common.sh compiles succesfully
So this is a gcc issue.
Doesn't look like 5.9.65 builds either on this gcc.
EDIT: gcc8 works, so yes confirmed to be gcc9
The text was updated successfully, but these errors were encountered: