From 57759ffeaf4f6dc96a51ca3ece3fd680e3b9aa3a Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 7 Nov 2025 07:58:59 -0500 Subject: [PATCH] fix: temporarily disable utf8_range installation in gRPC configuration - Added a workaround to prevent utf8_range export errors in gRPC 1.67.1 by disabling its installation. - Set CMAKE_SKIP_INSTALL_RULES to TRUE during gRPC loading to avoid conflicts with Abseil installation settings. - Re-enabled installation rules after gRPC is loaded to maintain proper build configuration. --- cmake/dependencies/grpc.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/dependencies/grpc.cmake b/cmake/dependencies/grpc.cmake index 0c5b380a..9a4d269d 100644 --- a/cmake/dependencies/grpc.cmake +++ b/cmake/dependencies/grpc.cmake @@ -105,6 +105,12 @@ set(ABSL_ENABLE_INSTALL OFF CACHE BOOL "" FORCE) set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE) set(utf8_range_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(utf8_range_INSTALL OFF CACHE BOOL "" FORCE) +set(utf8_range_ENABLE_INSTALL OFF CACHE BOOL "" FORCE) + +# Temporarily disable installation to prevent utf8_range export errors +# This is a workaround for gRPC 1.67.1 where utf8_range tries to install targets +# that depend on Abseil, but we have ABSL_ENABLE_INSTALL=OFF +set(CMAKE_SKIP_INSTALL_RULES TRUE) # Use CPM to fetch gRPC with bundled dependencies # GIT_SUBMODULES "" disables submodule recursion since gRPC handles its own deps via CMake @@ -117,6 +123,9 @@ CPMAddPackage( GIT_SHALLOW TRUE ) +# Re-enable installation rules after gRPC is loaded +set(CMAKE_SKIP_INSTALL_RULES FALSE) + # Restore CPM lookup behaviour and toolchain detection environment early so # subsequent dependency configuration isn't polluted even if we hit errors. if("${_YAZE_GRPC_SAVED_CPM_USE_LOCAL_PACKAGES}" STREQUAL "__YAZE_UNSET__")