Fix Boost 1.89+ and Lua 5.4 compatibility, update CI infrastructure#872
Open
johncarmack1984 wants to merge 4 commits intosystemed:masterfrom
Open
Fix Boost 1.89+ and Lua 5.4 compatibility, update CI infrastructure#872johncarmack1984 wants to merge 4 commits intosystemed:masterfrom
johncarmack1984 wants to merge 4 commits intosystemed:masterfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boost::sortconflicts withboost::geometry'sboost::range::sortwhen both headers are included in the same translation unitLUA_GCSETPAUSE/LUA_GCSETSTEPMULwere renamed toLUA_GCPPAUSE/LUA_GCPSTEPMULChanges
tile_data_base.hand replacedboost::sortwithstd::sortin files that also useboost::geometrykaguya.hppto map old GC constants to new names-Lflag to curl for redirects, fixed Docker CMake flagsTest plan