kou commented on issue #43688: URL: https://github.com/apache/arrow/issues/43688#issuecomment-2289907756
I don't want to require `patch` as much as possible because it's difficult that preparing `patch` on some environments as you noticed: https://github.com/apache/arrow/pull/43689#discussion_r1716945455 How about using `CMAKE_CXX_FLAGS_<CONFIG>` to override `-fno-rtti` instead of using `patch`? ```diff diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 495aa70483..263f9d91ea 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1365,6 +1365,13 @@ macro(build_snappy) endforeach() endif() + foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) + list(APPEND + SNAPPY_CMAKE_ARGS + "-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS_${CONFIG}} -frtti" + ) + endforeach() + if(APPLE AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20) # On macOS 10.13 we need to explicitly add <functional> to avoid a missing include error # This can be removed once CRAN no longer checks on macOS 10.13 ``` Or how about using patched Snappy in system? For example, Debian's Snappy enables RTTI ( https://sources.debian.org/patches/snappy/1.2.1-1/add_option_to_enable_rtti.patch/ ) and Conda's Snappy enables RTTI ( https://github.com/conda-forge/snappy-feedstock/pull/32 ). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
