Skip to content
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

GCC Release build error #4748

Closed
ghost opened this issue Jul 13, 2021 · 4 comments
Closed

GCC Release build error #4748

ghost opened this issue Jul 13, 2021 · 4 comments
Labels
Linux Issues which only occur on Linux
Milestone

Comments

@ghost
Copy link

ghost commented Jul 13, 2021

Linux 64 bit
All formats but Release only

When compiling with GCC 9 it currently errors with the following warnings
(it builds when setting -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow=" )

In file included from /usr/include/stdio.h:867,
                 from /home/xxx/surge/src/common/globals.h:19,
                 from /home/xxx/surge/src/gui/SurgeGUIEditor.h:18,
                 from /home/xxx/surge/src/gui/SurgeGUIEditorValueCallbacks.cpp:16:
In function ‘int snprintf(char*, size_t, const char*, ...)’,
    inlined from ‘virtual int32_t SurgeGUIEditor::controlModifierClicked(Surge::GUI::IComponentTagValue*, const juce::ModifierKeys&, bool)’ at /home/xxx/surge/src/gui/SurgeGUIEditorValueCallbacks.cpp:46:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: warning: ‘int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)’ specified bound 256 exceeds destination size 16 [-Wstringop-overflow=]
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘int snprintf(char*, size_t, const char*, ...)’,
    inlined from ‘virtual int32_t SurgeGUIEditor::controlModifierClicked(Surge::GUI::IComponentTagValue*, const juce::ModifierKeys&, bool)’ at /home/xxx/surge/src/gui/SurgeGUIEditorValueCallbacks.cpp:49:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: warning: ‘int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)’ specified bound 256 exceeds destination size 16 [-Wstringop-overflow=]
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘int snprintf(char*, size_t, const char*, ...)’,
    inlined from ‘virtual int32_t SurgeGUIEditor::controlModifierClicked(Surge::GUI::IComponentTagValue*, const juce::ModifierKeys&, bool)’ at /home/xxx/surge/src/gui/SurgeGUIEditorValueCallbacks.cpp:52:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: warning: ‘int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...)’ specified bound 256 exceeds destination size 16 [-Wstringop-overflow=]
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@baconpaul
Copy link
Collaborator

aww man i thought we built with gcc9 in the pipeline to make sure we catch that. let me look.

@ghost
Copy link
Author

ghost commented Jul 13, 2021

you do, but its all debug builds except unittest
and debug builds fine

@baconpaul
Copy link
Collaborator

Ok thanks! I’ll break the pipelines then fix the code tomorrow and close tbis then

appreciated

baconpaul added a commit to baconpaul/surge that referenced this issue Jul 14, 2021
This commit withouc cpp change should *fail* CI since it activates the warning
in question

So then correct the build error which Release exposes on gcc8

Closes surge-synthesizer#4748
@baconpaul
Copy link
Collaborator

broke pipelines in a PR yup. The LV2 now builds release (I chose the LV2 since it is the smaller build - we just build surge not the full ci set).

Pushed a fix. If that works I'll merge it and ti will close this issue

tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux Issues which only occur on Linux
Projects
None yet
Development

No branches or pull requests

1 participant