# 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:** 8

<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:** [1 July 2021 14:23 UTC](https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322/8 "2021-07-01T14:23:34Z")

</div>

> [@Robbie](#):
>
> GCC-10 is available in the repositories, but attempting to use it causes `cmake` to fail

Hmm, yeah it looks like it’s using a different version of the standard library (or something like that).

> [@Robbie](#):
>
> I’ve also tried using Clang

Even worse, it’s failing to compile code that is should have no problem with, not sure why.

> [@john.cannon](#):
>
> 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.

I just installed gcc-11 (so switching from gcc 10.3 to 11.0.1) so that I have similar compiler to your original post (ie, gcc 11.x). I now get the original compile errors you got (in `GeometryDistance.cc`). So I’ll see if I can work around that error and then send you the working source code that should hopefully work with your original compiler (gcc 11.1.0). I’ll keep you posted.

---

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