Error when building juce extras

Trying to build juce extras with cmake cmake --build build/juce/AudioPluginHost (after confiuring of course cmake -S submodules/juce -B build/juce/AudioPluginHost -DCMAKE_BUILD_TYPE=Release -DJUCE_BUILD_EXTRAS=ON -DJUCE_BUILD_EXAMPLES=OFF).
My build directory was completely empty prior to these steps.
I get this build error that I just can’t really understand:

In file included from ./submodules/juce/extras/NetworkGraphicsDemo/Source/Main.cpp:52:
./submodules/juce/extras/NetworkGraphicsDemo/Source\SharedCanvas.h:301:7: warning: abstract class is marked 'final' [-Wabstract-final-class]
 301 | class CanvasGeneratingContext final : public LowLevelGraphicsContext
     |       ^
./submodules/juce/modules\juce_graphics\contexts/juce_LowLevelGraphicsContext.h:148:40: note: unimplemented pure virtual method 'getPreferredImageTypeForTemporaryImages' in 'CanvasGeneratingContext'
 148 |     virtual std::unique_ptr<ImageType> getPreferredImageTypeForTemporaryImages() const = 0; 
     |                                        ^
In file included from ./submodules/juce/extras/NetworkGraphicsDemo/Source/Main.cpp:55:
./submodules/juce/extras/NetworkGraphicsDemo/Source\MasterComponent.h:359:67: error: allocating an object of abstract class type 'CanvasGeneratingContext'    
 359 |             std::unique_ptr<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));
     |                                                                   ^
1 warning and 1 error generated.

I went to investigate CanvasGeneratingContext in SharedCanvas.h, and indeed it does inherit from LowLevelGraphicsContext, which does have a pure virtual funciton called getPreferredImageTypeForTemporaryImages(), that is not overwritten / implemented by SharedCanvas (and CanvasGeneratingContext is marked final).

So what is up here? What do I do? Did I mess up somewhere, or is this a bug?

I am using the master branch, on d6181bd, which is tagged v8.0.8.
I replaced the path to the root of my project with a dot in the logs.
Thanks for any help in advance.

It does build on 8.0.7, but I still want to get to the bottom of this

This is a known issue that broke the build of the NetworkGraphicsDemo. It’s fixed on the develop branch. Other targets should be unaffected.

Not sure if you’re aware, but the command you’re using to configure the build will include targets for all of the “extras” targets, and not just the AudioPluginHost. If you only need to build the AudioPluginHost, you can add --target AudioPluginHost to the end of your cmake --build ... command.

1 Like