Upgraded to the new Ubuntu 18.10 this weekend, which has gnu g++ v8.2. This has brought up some problems when trying to compile JUCE v5.3.1-155. For example:
modules/juce_graphics/native/juce_RenderingHelpers.h:969:24:
error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class juce::PixelAlpha’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
modules/juce_core/containers/juce_Array.h:479:25:
error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class juce::Rectangle<int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memmove (insertPos + 1, insertPos, ((size_t) numberToMove) * sizeof (ElementType));
modules/juce_core/memory/juce_HeapBlock.h:266:74:
error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class juce::Rectangle<int>’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess]
: std::realloc (data, static_cast<size_t> (newNumElements) * elementSize));
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I don’t know why git doesn’t realize that there is a 5.3.2 tag, but 155 commits after 5.3.1 is about 28 commits after 5.3.2, which is quite old, around beginning of May 2018.
So I’m guessing the julianstorer version is out-of-date, and I should just be using the WeAreROLI one. Going to try and update that to see if it fixes everything.
I did a brand new checkout of what I believe to be the correct version:
> git clone https://github.com/WeAreROLI/JUCE.git
This gave me this version:
5.3.1-138-gefddea0ef
Why do you say that this version was in May 2018? Am I grabbing it from the wrong location, or perhaps on the wrong branch?
Either way – I can definitely confirm I cannot build JUCE with the newer gnu g++ compiler included with Ubuntu 18.10. The errors described at the top of this post seem to still exist in the codebase.
5.3.1-138-gefddea0ef is the current master branch, which currently contains 11 commits after 5.3.2. The develop branch contains 478 commits after 5.3.2. What @jules referred as “latest version” in his post is the develop branch.