Compilation failed with -Werror=uninitialized

Hi Robbie,

It might be a compiler bug.

I just downloaded Boost 1.76 and compiled GPlates (using the same source code as you, assuming you got it from this thread) on Ubuntu 21.04 using gcc 10.3. It compiled and ran.

You can try disabling the particular error you’re getting (-Werror=uninitialized) with -Wno-error=uninitialized. You may also need -Wno-error=maybe-uninitialized. These can be added to src/CMakeLists.txt - just search for -Wno-maybe-uninitialized in that file and add them there (this is for GNU compilers; there’s a nearby section for Clang). Normally I wouldn’t suggest this (since it can mask a bug) but it’s worth a try. By the way, what compiler version are you using?

So this is changing:

		set(_DISABLE_WARNINGS
				-Wno-clobbered -Wno-maybe-uninitialized)

…to…

		set(_DISABLE_WARNINGS
				-Wno-clobbered -Wno-maybe-uninitialized -Wno-error=uninitialized)