pitrou commented on a change in pull request #11614:
URL: https://github.com/apache/arrow/pull/11614#discussion_r746382672
##########
File path: cpp/cmake_modules/ThirdpartyToolchain.cmake
##########
@@ -971,9 +980,18 @@ macro(build_snappy)
)
set(SNAPPY_CMAKE_ARGS
- ${EP_COMMON_CMAKE_ARGS} -DCMAKE_INSTALL_LIBDIR=lib
-DSNAPPY_BUILD_TESTS=OFF
+ ${EP_COMMON_CMAKE_ARGS}
+ -DCMAKE_INSTALL_LIBDIR=lib
+ -DSNAPPY_BUILD_TESTS=OFF
+ -DSNAPPY_BUILD_BENCHMARKS=OFF
"-DCMAKE_INSTALL_PREFIX=${SNAPPY_PREFIX}")
+ # There is a bug in GCC < 4.9 with Snappy 1.1.9, so revert to 1.1.8
"SNAPPY_OLD" for those
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
VERSION_LESS
+ "4.9")
+ set(ARROW_SNAPPY_BUILD_SHA256_CHECKSUM
${ARROW_SNAPPY_OLD_BUILD_SHA256_CHECKSUM})
Review comment:
... rather than here?
##########
File path: cpp/cmake_modules/ThirdpartyToolchain.cmake
##########
@@ -579,10 +579,19 @@ endif()
if(DEFINED ENV{ARROW_SNAPPY_URL})
set(SNAPPY_SOURCE_URL "$ENV{ARROW_SNAPPY_URL}")
else()
- set_urls(SNAPPY_SOURCE_URL
-
"https://github.com/google/snappy/archive/${ARROW_SNAPPY_BUILD_VERSION}.tar.gz"
-
"https://github.com/ursa-labs/thirdparty/releases/download/latest/snappy-${ARROW_SNAPPY_BUILD_VERSION}.tar.gz"
- )
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
VERSION_LESS
+ "4.9")
+ # There is a bug in GCC < 4.9 with Snappy 1.1.9, so revert to 1.1.8
"SNAPPY_OLD" for those
+ set_urls(SNAPPY_SOURCE_URL
+
"https://github.com/google/snappy/archive/${ARROW_SNAPPY_OLD_BUILD_VERSION}.tar.gz"
+
"https://github.com/ursa-labs/thirdparty/releases/download/latest/snappy-${ARROW_SNAPPY_OLD_BUILD_VERSION}.tar.gz"
+ )
+ else()
+ set_urls(SNAPPY_SOURCE_URL
+
"https://github.com/google/snappy/archive/${ARROW_SNAPPY_BUILD_VERSION}.tar.gz"
+
"https://github.com/ursa-labs/thirdparty/releases/download/latest/snappy-${ARROW_SNAPPY_BUILD_VERSION}.tar.gz"
+ )
+ endif()
Review comment:
Can you also set something like `SNAPPY_BUILD_CHECKSUM` here...
--
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]