Skip to content

Build failed due to ‘for_each_dimension’ is not a member of ‘boost::geometry::detail’ #4

@xiaotianyao

Description

@xiaotianyao

While executing
scripts/build.py -o release -t route
I encountered the following errors:

In file included from /lustre/software/boost/1.83.0/include/boost/geometry/algorithms/detail/closest_points/interface.hpp:16,
                 from /lustre/software/boost/1.83.0/include/boost/geometry/algorithms/closest_points.hpp:13,
                 from /lustre/software/boost/1.83.0/include/boost/geometry/geometry.hpp:66,
                 from /lustre/software/boost/1.83.0/include/boost/geometry.hpp:17,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/util/geometry/Polygon.h:19,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/export/Rsyn/Polygon:1,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/phy/util/PhysicalTransform.h:23,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/core/Rsyn.h:47,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/io/reader/PopulateRsyn.h:33,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/session/Reader.h:27,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/session/Session.h:22,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/src/../rsyn/src/rsyn/export/Rsyn/Session:1,
                 from /lustre/home/2300012829/ws_routing/original/cu-gr-2/rsyn/src/rsyn/phy/PhysicalService.cpp:16:
/lustre/software/boost/1.83.0/include/boost/geometry/algorithms/detail/closest_points/utilities.hpp: In static member function ‘static void boost::geometry::detail::closest_points::swap_segment_points::apply(Segment&)’:
/lustre/software/boost/1.83.0/include/boost/geometry/algorithms/detail/closest_points/utilities.hpp:40:27: error: ‘for_each_dimension’ is not a member of ‘boost::geometry::detail’
         geometry::detail::for_each_dimension<Segment>([&](auto index)
                           ^~~~~~~~~~~~~~~~~~
/lustre/software/boost/1.83.0/include/boost/geometry/algorithms/detail/closest_points/utilities.hpp:40:27: note: suggested alternative: ‘for_each_index’
         geometry::detail::for_each_dimension<Segment>([&](auto index)
                           ^~~~~~~~~~~~~~~~~~
                           for_each_index
/lustre/software/boost/1.83.0/include/boost/geometry/algorithms/detail/closest_points/utilities.hpp:40:53: error: expected primary-expression before ‘>’ token
         geometry::detail::for_each_dimension<Segment>([&](auto index)

My dependencies:
1) cmake/3.25.0 2) gcc/12.2.0 3) boost/1.83.0

I have tried to install the exact dependencies you gave in another issue on my HPC platform, but unfortunately some other problems popped up as I am not using the modules the platform provided.
It seems like an error due to syntax changes between different versions. Is there any quick fix? Like, can I simply change it to 'for_each_index' as the compiler suggested? Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions