# Pygplates compilation failed error

**URL:** https://discourse.gplates.org/t/pygplates-compilation-failed-error/378
**Category:** Q&A
**Created:** [10 September 2021 17:52 UTC](https://discourse.gplates.org/t/pygplates-compilation-failed-error/378 "2021-09-10T17:52:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![luis.meza](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/l/5daacb/32.png) [@luis.meza](https://discourse.gplates.org/u/luis.meza)
#### Post date: [10 September 2021 17:52 UTC](https://discourse.gplates.org/t/pygplates-compilation-failed-error/378/1 "2021-09-10T17:52:08Z")

</div>

Hi All,  
I’m trying to install pygplates on archlinux as a dependency on pybacktrack. But the compilation fails with the following output:

```
[51%] Building CXX object src/CMakeFiles/pygplates.dir/maths/GeometryDistance.cc.o
En el fichero incluido desde /usr/include/boost/bind.hpp:30,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/utils/ReferenceCount.h:29,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/ProximityHitDetail.h:35,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryOnSphere.h:31,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/PointOnSphere.h:37,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/GreatCircleArc.h:41,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.h:34,
                 desde /home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:26:
/usr/include/boost/bind.hpp:36:1: nota: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^ ~~~~~~~~~~~~~~~~~~~
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc: En la función ‘GPlatesMaths::AngularDistance GPlatesMaths::minimum_distance(const GPlatesMaths::PolylineOnSphere&, const GPlatesMaths::MultiPointOnSphere&, boost::optional, boost::optional<boost::tuples::tuple >, boost::optional<boost::tuples::tuple >)’:
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1621:25: error: ‘*(boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)).boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >::head’ is used uninitialized [-Werror=uninitialized]
 1621 | closest_positions_reversed;
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1621:25: error: ‘((boost::tuples::cons*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)))[1].boost::tuples::cons::head’ is used uninitialized [-Werror=uninitialized]
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc: En la función ‘GPlatesMaths::AngularDistance GPlatesMaths::minimum_distance(const GPlatesMaths::PolygonOnSphere&, const GPlatesMaths::MultiPointOnSphere&, bool, boost::optional, boost::optional<boost::tuples::tuple >, boost::optional<boost::tuples::tuple >)’:
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1823:25: error: ‘*(boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)).boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >::head’ is used uninitialized [-Werror=uninitialized]
 1823 | closest_positions_reversed;
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1823:25: error: ‘((boost::tuples::cons*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)))[1].boost::tuples::cons::head’ is used uninitialized [-Werror=uninitialized]
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc: En la función ‘GPlatesMaths::AngularDistance GPlatesMaths::minimum_distance(const GPlatesMaths::PolygonOnSphere&, const GPlatesMaths::PolylineOnSphere&, bool, boost::optional, boost::optional<boost::tuples::tuple >, boost::optional<boost::tuples::tuple >)’:
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1860:25: error: ‘*(boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)).boost::tuples::cons<GPlatesMaths::UnitVector3D&, boost::tuples::cons >::head’ is used uninitialized [-Werror=uninitialized]
 1860 | closest_positions_reversed;
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luis/Descargas/pygplates_rev28_src/src/maths/GeometryDistance.cc:1860:25: error: ‘((boost::tuples::cons*)((char*)&closest_positions_reversed + offsetof(boost::optional<boost::tuples::tuple >,boost::optional<boost::tuples::tuple >::.boost::optional_detail::optional_base<boost::tuples::tuple >::m_storage.boost::optional_detail::aligned_storage<boost::tuples::tuple >::dummy_)))[1].boost::tuples::cons::head’ is used uninitialized [-Werror=uninitialized]
cc1plus: algunos avisos se tratan como errores
make[2]: *** [src/CMakeFiles/pygplates.dir/build.make:6890: src/CMakeFiles/pygplates.dir/maths/GeometryDistance.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:535: src/CMakeFiles/pygplates.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

```

Compiler:  
cmake 3.21.2  
gcc 11.1  
boost 1.76

I think it may be an error similar to [this thread](https://discourse.gplates.org/t/compilation-failed-with-werror-uninitialized/322/8)

Kind regards,  
Luis

---

<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: [13 September 2021 01:55 UTC](https://discourse.gplates.org/t/pygplates-compilation-failed-error/378/2 "2021-09-13T01:55:31Z")

</div>

Hi Luis,

Yes it looks like the same error. This was fixed between the last pyGPlates release and GPlates 2.3, so I’ll send you the source for the latest internal pyGPlates.

---

<div class="post-metadata">

### Author: ![luis.meza](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/l/5daacb/32.png) [@luis.meza](https://discourse.gplates.org/u/luis.meza)
#### Post date: [13 September 2021 17:44 UTC](https://discourse.gplates.org/t/pygplates-compilation-failed-error/378/3 "2021-09-13T17:44:27Z")

</div>

Hi John, the compilation was successful.  
Thank you!
