JUCE no longer seems to be building clean on Linux

Using Ubuntu-latest on GitHub Actions:

In file included from /home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_core/juce_core.h:277:0,
                 from /home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_graphics/juce_graphics.h:58,
                 from /home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_gui_basics/juce_gui_basics.h:57,
                 from /home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_gui_basics/juce_gui_basics.cpp:46:
/home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_core/misc/juce_Functional.h: In instantiation of ‘static void juce::NullCheckedInvocation::invoke(Callable&&, Args&& ...) [with Callable = const juce::showDialog(const juce::MessageBoxOptions&, juce::ModalComponentManager::Callback*, juce::Async)::<lambda(int)>; Args = {int&}; typename std::enable_if<juce::detail::EqualityComparableToNullptr<Callable>::value, int>::type <anonymous> = 0]’:
/home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.h:179:92:   required from ‘void juce::ModalCallbackFunction::create(CallbackFn&&)::Callable::modalStateFinished(int) [with CallbackFn = const juce::showDialog(const juce::MessageBoxOptions&, juce::ModalComponentManager::Callback*, juce::Async)::<lambda(int)>&]’
/home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.h:182:9:   required from ‘static juce::ModalComponentManager::Callback* juce::ModalCallbackFunction::create(CallbackFn&&) [with CallbackFn = const juce::showDialog(const juce::MessageBoxOptions&, juce::ModalComponentManager::Callback*, juce::Async)::<lambda(int)>&]’
/home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_gui_basics/native/juce_linux_Windowing.cpp:771:72:   required from here
/home/runner/work/tracktion_engine/tracktion_engine/modules/juce/modules/juce_core/misc/juce_Functional.h:57:16: error: the address of ‘static constexpr void juce::showDialog(const juce::MessageBoxOptions&, juce::ModalComponentManager::Callback*, juce::Async)::<lambda(int)>::_FUN(int)’ will never be NULL [-Werror=address]
         if (fn != nullptr)
             ~~~^~~~~~~~~~

That image has multiple installed compilers. Which one are you using?

The CXX compiler identification is GNU 7.5.0

Which I assume is the default? I don’t seem to be setting it anywhere in my CMake file. Seems quite old.

Well, I wouldn’t have guessed that - that version is not even listed as preinstalled on the docs page!

We regularly test with GCC 5 and 10 but I guess there must be something special about 7.5. I’ll try to reproduce the issue and put a fix together.

We are manually setting gcc 7. I just found it in the workflow yaml, rather than in the CMake file or the build script. I’ll figure out why we are using that version, and if no reason I’ll upgrade to 10.

7 (7.5) is default on Ubuntu 18.04

Suffering from the same issue on Debian 10, gcc 8.3.0

Have you updated to the latest develop? This issue should be resolved there:

Hi @reuk
Have not tried develop, but I’ve patched our fork with basically the same thing (using JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE) to solve the issue, so I’m confident your commit will fix it.