# Compilation failed with -Werror=uninitialized

**URL:** https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322
**Category:** Q&A
**Created:** [16 June 2021 13:17 UTC](https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322 "2021-06-16T13:17:47Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)
#### Post date: [17 June 2021 06:02 UTC](https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322/2 "2021-06-17T06:02:06Z")

</div>

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](https://discourse.gplates.org/t/compiling-gplates-from-the-souce-code-on-ubuntu-20-04/235)) 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:

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

```

…to…

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

```

---

_[View the full topic](https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322)._
