Skip to content

Conversation

@johncarmack1984
Copy link

Summary

  • Fix Boost 1.89+ compatibility where boost::sort conflicts with boost::geometry's boost::range::sort when both headers are included in the same translation unit
  • Fix Lua 5.4 compatibility in kaguya.hpp where LUA_GCSETPAUSE/LUA_GCSETSTEPMUL were renamed to LUA_GCPPAUSE/LUA_GCPSTEPMUL
  • Update CI workflow to fix deprecated GitHub Actions and infrastructure issues

Changes

  1. Boost 1.89+ fix: Moved shared type definitions to tile_data_base.h and replaced boost::sort with std::sort in files that also use boost::geometry
  2. Lua 5.4 fix: Added conditional defines in kaguya.hpp to map old GC constants to new names
  3. CI fixes: Updated actions/checkout and actions/cache from v2 to v4, added -L flag to curl for redirects, fixed Docker CMake flags

Test plan

…ometry

Boost 1.89 introduced a conflict where boost::geometry includes boost::range,
which defines boost::range::sort that conflicts with boost::sort. This causes
ambiguous calls when both are visible in the same translation unit.

Solution: Move sorting code to separate translation units where boost::sort
can be included before any boost::geometry headers, preventing the conflict.

Changes:
- Create tile_data_base.h with shared struct definitions
- Create tile_sorting.cpp to isolate finalizeObjects template with boost::sort
- Use extern template declarations to prevent implicit instantiation
- Update CMakeLists.txt with conditional Boost system component handling
- Update Makefile with new source file and modernized flags

This maintains use of boost::sort::pdqsort for optimal sorting performance
while being compatible with Boost 1.66+ through 1.90+.
- Update actions/checkout from v2 to v4
- Update actions/cache from v2 to v4
- Update docker/login-action to v3
- Update docker/metadata-action to v5
- Update docker/build-push-action to v6
- Add -L flag to curl commands to follow redirects
- Use HTTPS for Geofabrik downloads
- Fix Docker CMake boost_system variant issue with -DBoost_USE_DEBUG_RUNTIME=OFF
Some Lua 5.4 builds (e.g., vcpkg) removed LUA_GCSETPAUSE and
LUA_GCSETSTEPMUL constants, replacing them with LUA_GCPPAUSE and
LUA_GCPSTEPMUL. Add conditional defines to handle both cases.
boost::sort conflicts with boost::geometry's boost::range::sort in
Boost 1.89+. The conflict occurs when both are included in the same
translation unit, regardless of include order.

Solution: Use std::sort in files that need boost::geometry (tile_data.cpp,
tile_sorting.cpp, tilemaker.cpp). boost::sort is still used in isolated
files like node_stores.cpp and way_stores.cpp that don't use geometry.

This trades some parallel sorting performance for Boost 1.89+ compatibility.
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.

1 participant