Compilation error with boost 1.77

After upgrading to boost 1.77, GPlates fails to compile with

/build/gplates_2.3.0_src/src/gui/TopologyTools.cc: In member function 'boost::optional<__gnu_cxx::__normal_iterator<const GPlatesGui::TopologyTools::VisibleSection*, std::vector<GPlatesGui::TopologyTools::VisibleSection> > > GPlatesGui::TopologyTools::is_section_visible_boundary(std::vector<GPlatesGui::TopologyTools::SectionInfo>::size_type) const':
/build/gplates_2.3.0_src/src/gui/TopologyTools.cc:3451: error: '_1' was not declared in this scope
 3451 |      boost::bind(&VisibleSection::d_section_info_index, _1) ==
      | 
/build/gplates_2.3.0_src/src/gui/TopologyTools.cc:3451: note: suggested alternatives:
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/utility/compare_pointees.hpp:15,
                 from include/boost/optional/optional.hpp:55,
                 from include/boost/optional.hpp:15,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:38:
/nix/store/v819nrv8d33ns36gm4v9vqydq1v95axi-gcc-10.3.0/include/c++/10.3.0/functional:221:34: note:   'std::placeholders::_1'
  221 |     extern const _Placeholder<1> _1;
      |                                  ^~
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/bind/bind.hpp:2336,
                 from /build/gplates_2.3.0_src/src/utils/ReferenceCount.h:29,
                 from /build/gplates_2.3.0_src/src/model/WeakReferenceCallback.h:35,
                 from /build/gplates_2.3.0_src/src/model/WeakReference.h:37,
                 from /build/gplates_2.3.0_src/src/model/Model.h:29,
                 from /build/gplates_2.3.0_src/src/model/BasicHandle.h:39,
                 from /build/gplates_2.3.0_src/src/model/FeatureHandle.h:35,
                 from /build/gplates_2.3.0_src/src/gui/TopologySectionsContainer.h:37,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.h:37,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:54:
include/boost/bind/placeholders.hpp:58:38: note:   'boost::placeholders::_1'
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/lambda/bind.hpp:15,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:35:
include/boost/lambda/core.hpp:71:60: note:   'boost::lambda::{anonymous}::_1'
/build/gplates_2.3.0_src/src/gui/TopologyTools.cc: In member function 'boost::optional<__gnu_cxx::__normal_iterator<const GPlatesGui::TopologyTools::VisibleSection*, std::vector<GPlatesGui::TopologyTools::VisibleSection> > > GPlatesGui::TopologyTools::is_section_visible_interior(std::vector<GPlatesGui::TopologyTools::SectionInfo>::size_type) const':
/build/gplates_2.3.0_src/src/gui/TopologyTools.cc:3470: error: '_1' was not declared in this scope
 3470 |      boost::bind(&VisibleSection::d_section_info_index, _1) ==
      | 
/build/gplates_2.3.0_src/src/gui/TopologyTools.cc:3470: note: suggested alternatives:
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/utility/compare_pointees.hpp:15,
                 from include/boost/optional/optional.hpp:55,
                 from include/boost/optional.hpp:15,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:38:
/nix/store/v819nrv8d33ns36gm4v9vqydq1v95axi-gcc-10.3.0/include/c++/10.3.0/functional:221:34: note:   'std::placeholders::_1'
  221 |     extern const _Placeholder<1> _1;
      |                                  ^~
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/bind/bind.hpp:2336,
                 from /build/gplates_2.3.0_src/src/utils/ReferenceCount.h:29,
                 from /build/gplates_2.3.0_src/src/model/WeakReferenceCallback.h:35,
                 from /build/gplates_2.3.0_src/src/model/WeakReference.h:37,
                 from /build/gplates_2.3.0_src/src/model/Model.h:29,
                 from /build/gplates_2.3.0_src/src/model/BasicHandle.h:39,
                 from /build/gplates_2.3.0_src/src/model/FeatureHandle.h:35,
                 from /build/gplates_2.3.0_src/src/gui/TopologySectionsContainer.h:37,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.h:37,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:54:
include/boost/bind/placeholders.hpp:58:38: note:   'boost::placeholders::_1'
In file included from include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from include/boost/mpl/placeholders.hpp:43,
                 from include/boost/iterator/iterator_categories.hpp:16,
                 from include/boost/iterator/iterator_adaptor.hpp:14,
                 from include/boost/iterator/reverse_iterator.hpp:10,
                 from include/boost/range/reverse_iterator.hpp:21,
                 from include/boost/range/rend.hpp:19,
                 from include/boost/foreach.hpp:82,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:33:
include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note:   'mpl_::_1'
In file included from include/boost/lambda/bind.hpp:15,
                 from /build/gplates_2.3.0_src/src/gui/TopologyTools.cc:35:
include/boost/lambda/core.hpp:71:60: note:   'boost::lambda::{anonymous}::_1'
make[2]: *** [src/CMakeFiles/gplates-lib.dir/build.make:6210: src/CMakeFiles/gplates-lib.dir/gui/TopologyTools.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:591: src/CMakeFiles/gplates-lib.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Hi dotlambda,

I’ve sent you some new source code to try out.

I had missed a few places when updating for Boost 1.73+ (somehow most systems managed to compile, but not boost 1.77 I guess).

1 Like

I’m also getting this compilation error on Boost 1.78, which was updated in my distribution’s repositories a couple of days ago. I had to rebuild GPlates to use the new library and it failed about 40% in. The previous version of Boost I had installed was 1.76; I can’t downgrade boost due to dependency issues.

Try gplates_2.3.1-beta.3_src.zip located here. It worked for dotlambda.

Arch Linux now update boost to version 1.80. Still can’t compile. Crashed at 44% Topologytools.cc

It seem to me that any Linux which is using Linux kernel that’s more recent than that of most LTS distros have no success to compile so far unless there’re binaries available. 3 of my machine that have Arch Linux installed failed to compile this with the same error no matter what kernel version I used both LTS and non-LTS. Beta package also can’t compile and it failed even at 0% with so many output. I tried compile stable version on Almalinux and it also crashed at 100% as it can’t link the execution file. I tried this on OpenSUSE Tumbleweed and it failed in similar manner (compiled successfully in Leap 15.4 though). I think the default configuration might be wrong in some place. I would like to know what’s going wrong. What do I have to edit in order to make this successfully compiled and launched in all distros.

For beta package, the error message come up when it’s still in 0% PyFeature.cc.o like this. And I have to say there’s so many output on the screen and this paragraph have red words appeared.

inlined from ‘void GPlatesModel::FeatureVisitorBase<H>::visit_property_values(top_level_property_inline_type&) [with FeatureHandleType = const GPlatesModel::FeatureHandle]’ at /home/kuay/Downloads/gplates_2.3.1-beta.3_src/gplates_2.3.1-beta.3_src/src/model/FeatureVisitor.h:850:43:
/usr/include/boost/function/function_template.hpp:914:22: error: ‘*(unsigned char (*)[24])((char*)&<unnamed> + offsetof(boost::make_const_ptr_fn_type, boost::function<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>(const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&)>::<unnamed>.boost::function1<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>, const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&>::<unnamed>.boost::function_base::functor))’ is used uninitialized [-Werror=uninitialized]
  914 |           std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
      |           ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi Karn,

Just to verify, that screenshot was not from compiling gplates_2.3.1-beta.3_src.zip, is that correct? Because the source code in your error message looks like older source code.

Regarding the other errors, I wouldn’t be surprised if it’s the upgrade to Boost 1.80, as you noted, and upgrading the compiler (newer ones always seem stricter). Each Boost upgrade typically introduces new compile errors. I think the latest I’ve tried is Boost 1.78 (even the recently released Ubuntu is still on 1.74). I will try 1.80.

Yes, that error from screenshot is when I compiled the stable version on fresh installation of Arch Linux. And after that I tried to compile the beta version on the same system and that make the subsequent error, it’s not only this but before it failed every stage have similar warning before it eventually failed. The full output of the failed stage it 0% PyFeature.cc.o is like this.

In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/utils/IdStringSet.h:41,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/StringSetSingletons.h:32,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/IdTypeGenerator.h:35,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureId.h:31,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureHandle.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/api/PyFeature.h:29,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/api/PyFeature.cc:25:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/utils/SmartNodeLinkedList.h:206:45: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  206 |                                 public std::iterator<std::bidirectional_iterator_tag, ElementNodeQualifiedType>,
      |                                             ^~~~~~~~
In file included from /usr/include/c++/12.2.0/bits/stl_algobase.h:65,
                 from /usr/include/c++/12.2.0/bits/specfun.h:45,
                 from /usr/include/c++/12.2.0/cmath:1935,
                 from /usr/include/c++/12.2.0/math.h:36,
                 from /usr/include/python3.10/pyport.h:210,
                 from /usr/include/python3.10/Python.h:50,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/global/python.h:104,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/api/PyFeature.h:28:
/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureHandle.h:329:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/RevisionAwareIterator.h:93:37: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
   93 |                         public std::iterator<
      |                                     ^~~~~~~~
/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/FiniteRotation.h:34,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructionGraph.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructionTree.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructedFeatureGeometry.h:35,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/LayerProxyUtils.h:41,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/CoRegistrationLayerProxy.h:34,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/data-mining/DataMiningUtils.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/api/PyFeature.h:31:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/PointOnSphere.h:534:37: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
  534 |                         public std::binary_function<PointOnSphere, PointOnSphere, bool>
      |                                     ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/functional:49,
                 from /usr/include/boost/config/no_tr1/functional.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:14,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:15,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/global/python.h:125:
/usr/include/c++/12.2.0/bits/stl_function.h:131:12: note: declared here
  131 |     struct binary_function
      |            ^~~~~~~~~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/PolygonOnSphere.h:42,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/GeometryIntersect.h:33,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedSubSegmentRangeInSection.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTopologicalGeometrySubSegment.h:33,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTopologicalLine.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/LayerProxyUtils.h:43:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/GreatCircleArc.h:422:37: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  422 |                         public std::unary_function<GreatCircleArc, bool>
      |                                     ^~~~~~~~~~~~~~
/usr/include/c++/12.2.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTopologicalNetwork.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/TopologyReconstruct.h:39,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructMethodInterface.h:40,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructContext.h:42,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructLayerProxy.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/RasterLayerProxy.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/CoRegistrationLayerProxy.h:35:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTriangulationNetwork.h:848:53: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  848 |                                         public std::unary_function<
      |                                                     ^~~~~~~~~~~~~~
/usr/include/c++/12.2.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTriangulationNetwork.h:893:53: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  893 |                                         public std::unary_function<
      |                                                     ^~~~~~~~~~~~~~
/usr/include/c++/12.2.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/utils/ObjectPool.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/CubeQuadTree.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/opengl/GLCubeSubdivisionCache.h:36,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/opengl/GLReconstructedStaticPolygonMeshes.h:38,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructLayerProxy.h:47:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/utils/IntrusiveSinglyLinkedList.h:125:45: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  125 |                                 public std::iterator<std::forward_iterator_tag, ElementNodeQualifiedType>,
      |                                             ^~~~~~~~
/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/opengl/GLReconstructedStaticPolygonMeshes.h:46:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/maths/CubeQuadTreePartition.h:261:45: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  261 |                                 public std::iterator<std::forward_iterator_tag, ElementQualifiedType>,
      |                                             ^~~~~~~~
/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /usr/include/boost/function/detail/maybe_include.hpp:22,
                 from /usr/include/boost/function/detail/function_iterate.hpp:14,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp:19,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:1343,
                 from /usr/include/boost/function.hpp:70,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureHandle.h:32:
In member function ‘void boost::function1<R, T1>::assign_to_own(const boost::function1<R, T1>&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’,
    inlined from ‘boost::function1<R, T1>::function1(const boost::function1<R, T1>&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’ at /usr/include/boost/function/function_template.hpp:746:26,
    inlined from ‘boost::function<R(T0)>::function(const self_type&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’ at /usr/include/boost/function/function_template.hpp:1121:76,
    inlined from ‘boost::iterators::transform_iterator<UnaryFunc, Iterator> boost::iterators::make_transform_iterator(Iterator, UnaryFunc) [with UnaryFunc = boost::function<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>(const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&)>; Iterator = __gnu_cxx::__normal_iterator<const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>*, std::vector<GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler> > >]’ at /usr/include/boost/iterator/transform_iterator.hpp:141:61,
    inlined from ‘GPlatesModel::TopLevelPropertyInline::const_iterator GPlatesModel::TopLevelPropertyInline::begin() const’ at /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h:152:101,
    inlined from ‘void GPlatesModel::FeatureVisitorBase<H>::visit_property_values(top_level_property_inline_type&) [with FeatureHandleType = const GPlatesModel::FeatureHandle]’ at /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureVisitor.h:849:43:
/usr/include/boost/function/function_template.hpp:914:22: error: ‘*(unsigned char (*)[24])((char*)&<unnamed> + offsetof(boost::make_const_ptr_fn_type, boost::function<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>(const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&)>::<unnamed>.boost::function1<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>, const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&>::<unnamed>.boost::function_base::functor))’ is used uninitialized [-Werror=uninitialized]
  914 |           std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
      |           ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureVisitor.h:40,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ReconstructionFeatureProperties.h:32,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedVertexSourceInfo.h:37,
                 from /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/app-logic/ResolvedTopologicalGeometrySubSegment.h:34:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h: In member function ‘void GPlatesModel::FeatureVisitorBase<H>::visit_property_values(top_level_property_inline_type&) [with FeatureHandleType = const GPlatesModel::FeatureHandle]’:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h:152:135: note: ‘<anonymous>’ declared here
  152 |           make_const_ptr_fn_type(boost::lambda::constructor<PropertyValue::non_null_ptr_to_const_type>()));
      |                                                                                                         ^

In member function ‘void boost::function1<R, T1>::assign_to_own(const boost::function1<R, T1>&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’,
    inlined from ‘boost::function1<R, T1>::function1(const boost::function1<R, T1>&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’ at /usr/include/boost/function/function_template.hpp:746:26,
    inlined from ‘boost::function<R(T0)>::function(const self_type&) [with R = GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>; T0 = const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&]’ at /usr/include/boost/function/function_template.hpp:1121:76,
    inlined from ‘boost::iterators::transform_iterator<UnaryFunc, Iterator> boost::iterators::make_transform_iterator(Iterator, UnaryFunc) [with UnaryFunc = boost::function<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>(const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&)>; Iterator = __gnu_cxx::__normal_iterator<const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>*, std::vector<GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler> > >]’ at /usr/include/boost/iterator/transform_iterator.hpp:141:61,
    inlined from ‘GPlatesModel::TopLevelPropertyInline::const_iterator GPlatesModel::TopLevelPropertyInline::end() const’ at /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h:160:101,
    inlined from ‘void GPlatesModel::FeatureVisitorBase<H>::visit_property_values(top_level_property_inline_type&) [with FeatureHandleType = const GPlatesModel::FeatureHandle]’ at /home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/FeatureVisitor.h:850:43:
/usr/include/boost/function/function_template.hpp:914:22: error: ‘*(unsigned char (*)[24])((char*)&<unnamed> + offsetof(boost::make_const_ptr_fn_type, boost::function<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>(const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&)>::<unnamed>.boost::function1<GPlatesUtils::non_null_intrusive_ptr<const GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>, const GPlatesUtils::non_null_intrusive_ptr<GPlatesModel::PropertyValue, GPlatesUtils::NullIntrusivePointerHandler>&>::<unnamed>.boost::function_base::functor))’ is used uninitialized [-Werror=uninitialized]
  914 |           std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
      |           ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h: In member function ‘void GPlatesModel::FeatureVisitorBase<H>::visit_property_values(top_level_property_inline_type&) [with FeatureHandleType = const GPlatesModel::FeatureHandle]’:
/home/kuay/Downloads/gplates_2.3.1-beta.3_src/src/model/TopLevelPropertyInline.h:160:135: note: ‘<anonymous>’ declared here
  160 |           make_const_ptr_fn_type(boost::lambda::constructor<PropertyValue::non_null_ptr_to_const_type>()));
      |                                                                                                         ^

cc1plus: some warnings being treated as errors
make[2]: *** [src/CMakeFiles/gplates-lib.dir/build.make:428: src/CMakeFiles/gplates-lib.dir/api/PyFeature.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:484: src/CMakeFiles/gplates-lib.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I don’t believe it’s Boost problem. I tried to compile the beta version on FreeBSD 13.1 which has the latest boost version of 1.80 as well but it can compile successfully without any issue. And this error only appeared on Arch-based distribution so far (vanilla Arch, Endeavor, and Manjaro). I don’t know whether there’s significant diiference in Arch-based distribution but I suspected there’s. Maybe there’s something I didn’t installed before hand and it’s needed by the beta version and it didn’t come with Arch Linux and normal installation of the program’s dependencies on Arch Linux.

To be honest, I’d like the developer to consider making a package on Flatpak and then we need not to be headache when installed this on other distribution than Ubuntu anymore, it should be more easier to maintain the program that way.

Thanks. Those C++17 deprecation warnings can be ignored. They are fixed in a really unstable branch, that will eventually be in the next GPlates release. I might try to cherry pick the fixes across before then. But for the purpose of successful compiling we can just ignore them for now.

Interesting, it must be an upgraded compiler on Arch Linux - it thinks some variable deep inside Boost is being used without first being initialised (this always seems to happen with newer compilers that are trying too hard to catch potential bugs).

I’ve just got a Manjaro VM up and running (I tried Arch Linux but it seems it only supports a command-line interface - or maybe I just don’t know what I’m doing). So I’m now getting the same error as you (on Manjaro). So I’ll fix that (and any other errors) and send another source code link to try.

Arch Linux support desktop but you have to install it afterward. It didn’t come with desktop by default.

I’ll make sure to set aside some time to look at this in the future. It sounds like it will ease installation issues for users on non-Debian systems - although being sandboxed it might be a bit slower than a native install (not sure how much though). I guess there’s also Snap and AppImage - I’m not very familiar - maybe you have a reason to suggest Flatpak?

I suggest Flatpak as it’s the most usable and all Linux distros support it if enable. Snap in most distros didn’t get a proper supported and in some it’s always in unofficial repos or testing branch, and some distros doesn’t have Snap on their repos at all. It also much more slower as it’s need to create several loop mount to launch program from that. Also, people usually despite that because of how it works. As for AppImage, it make the program to be a portable software (download 1 program execution file and launch from it by double click on that, copy that file to any drive and it can be launch anywhere you want) and it didn’t really install program onto the system.

I’ve added the source code gplates_2.3.1-beta.5_src.zip to the above link (which is here). So anyone on an Arch Linux based system (like Manjaro) can try that out.

Karn has confirmed it compiles on his Arch Linux. And it compiles for me on Manjaro 21.3.7 (which also uses gcc 12 and Boost 1.80). The compiled GPlates works for me (except for loading NetCDF grids). However, Karn and I are currently going through a potential OpenGL issue on his system (the grid lines and geometries are not rendering).

Thanks for that, it’s very helpful.

Thank you so much for the new source code. I have verified that this new source code is working with most rolling release distros. I hope it will work for the next few months at least.

After I tried the program on various Linux distros, here is what I’ve learned.

  1. The stable version should still work with most LTS version of Linux right now. It’s working just fine on Debian 11 and OpenSUSE Leap 15.4, as far as I’ve tried. It should work on RHEL 9 and it’s derivatives as well but there’s some concerned about it. I will explained later.
  2. The beta3 source code seem to fix the compatibility with later version of boost. It should work on most Rolling Release distros or any distros that have fairly short release cycle which the default version of gcc still on version 10 or 11 while having the latest version of boost.
  3. The bleeding edge distros should now be able to install the program by the new beta5. It works on current Arch Linux and Fedora 37. Though I have seen some rendering issue of the program interface. It might not be usable on some system configuration such as when using Wayland with Nvidia graphic card. The workspace might be broken when try this but sometime it might not. But the program should work just fine on X11. I don’t know whether it will work on Wayland if using AMD graphic card or Intel. I haven’t tried yet.
  4. On some Linux distros, they have compilation crashed around something at 100%. This should not considered as a compilation failure and what make it failed at this stage usually not a problem of the program itself. For RHEL9 derivatives that crashed at 100% ‘Linking CXX executable …/bin/gplates’, those crashes come from adding PostgreSQL repository in order to install CGAL on those distros and installing PostgreSQL itself from that repo afterward just to follow the instruction available here which has been suggest by CGAL-devel install instruction on pkgs website. The solution to this can be found in this topic. The source of this error come from PostgreSQL repository that must be add in order to install CGAL which is not available on official repositories and EPEL Release. But the PostgreSQL repo also provide another source of GDAL and also libpq which is GDAL dependencies with hardwired path for it that is not in /usr/lib64. And installing PostgreSQL itself from its repository will specify the usage of libpq to be in it’s own path which make the software compilation unable to access it as it has been configure to use libpq from default path. This problem can be avoid by installing GDAL first before adding the PostgreSQL repo and when you add said repo you should not proceed to installation of PostgreSQL from its repo. Then the compilation will complete without any problem even with the stable release of this program. In Void Linux also has the compilation crashed at 100% ‘Building CXX object src/CMakeFiles/gplates.dir/ScribeExportGPlates.cc.o’. It can be solved by installing sqlite and sqlite-devel before hand.
  5. All version of the program in Linux seem to not be able to save any feature created in the program by default setting and have to add .gpml after the file name to be able to save the created feature.

Thanks very much for that contribution, it covers a lot of the Linux ecosystem!

Those dependencies can be problematic. The next GPlates release (next year) will move to Qt6 on recent systems (retaining Qt5 for older systems), and will move to Vulkan from OpenGL, so that’ll probably introduce a bunch of new issues :wink: . But until then, in terms of compilation errors in GPlates 2.3, I’ll aim to keep it up-to-date, so feel free to notify me if you encounter further compilation issues.

I still had some compilation errors with the new code, but was able to find a patch for the 2.3.0 source to compile.
I’ve made it into an AUR package so that all arch-based distros can use it: AUR/gplates. Also made one for pygplates for good measure.

Actually, gplates_2.3.1-beta.5_src.zip does compile without issue. Don’t know what went wrong earlier.