Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

Boost 1.90.0 reorganized geometry headers, moving multi_point.hpp from boost/geometry/multi/geometries/ to boost/geometry/geometries/. This broke compilation on Alpine Linux and other platforms using BH 1.90.0.

Changes

  • weights/VoronoiUtils.cpp: Removed unused <boost/geometry/multi/geometries/multi_point.hpp> include (file doesn't use multi_point types)
  • clustering/spatial_validation.cpp: Added explicit <boost/geometry/geometries/multi_point.hpp> include using new path (file uses bg::model::multi_point but relied on transitive includes)

Changes are backward compatible—the new header path exists in older Boost versions.

Original prompt

This section details on the original issue you should resolve

<issue_title>compilation failure with new BH 1.90.0 #56</issue_title>
<issue_description>Installing the R package rgeoda on Alpine Linux fails, ending with

libgeoda/weights/VoronoiUtils.cpp:30:10: fatal error: boost/geometry/multi/geometries/multi_point.hpp: No such file or directory
30 | #include <boost/geometry/multi/geometries/multi_point.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
The deprecated geometry/multi headers were removed in Boost 1.89.0.

According to https://www.boost.org/doc/libs/latest/libs/geometry/doc/html/geometry/reference/models/model_multi_point.html, the correct include directive is:

#include <boost/geometry/geometries/multi_point.hpp></issue_description>

<agent_instructions>Please fix it</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix compilation failure in rgeoda on Alpine Linux Fix compilation failure with Boost 1.90.0 Dec 16, 2025
Copilot AI requested a review from lixun910 December 16, 2025 16:36
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/multi_point.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you add new include here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spatial_validation.cpp uses bg::model::multi_point on line 436 but was relying on transitive includes from <boost/geometry.hpp>. In Boost 1.90.0, the main header may not transitively include all geometry types, so I added the explicit include to ensure the code compiles with both old and new Boost versions.

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/multi/geometries/multi_point.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why just remove the include? should #include <boost/geometry/geometries/multi_point.hpp> be added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VoronoiUtils.cpp doesn't actually use any multi_point types in its code, so the include was unnecessary and could be safely removed. The old include path was causing the compilation failure, but since the file doesn't use multi_point, adding the new path would just add an unused header.

@lixun910 lixun910 marked this pull request as ready for review December 16, 2025 17:41
Copilot AI requested a review from lixun910 December 16, 2025 17:43
@lixun910 lixun910 merged commit d4995cf into main Dec 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compilation failure with new BH 1.90.0 #56

2 participants