Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-16729: [C++] Bump Abseil/gRPC dependency versions #13315

Merged
merged 3 commits into from Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
122 changes: 109 additions & 13 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Expand Up @@ -2638,6 +2638,11 @@ macro(resolve_dependency_absl)
city
civil_time
cord
cord_internal
cordz_functions
cordz_handle
cordz_info
cordz_sample_token
debugging_internal
demangle_internal
examine_stack
Expand All @@ -2662,6 +2667,7 @@ macro(resolve_dependency_absl)
leak_check
leak_check_disable
log_severity
low_level_hash
malloc_internal
periodic_sampler
random_distributions
Expand Down Expand Up @@ -2690,8 +2696,7 @@ macro(resolve_dependency_absl)
synchronization
throw_delegate
time
time_zone
wyhash)
time_zone)
# Abseil creates a number of header-only targets, which are needed to resolve dependencies.
# The list can be refreshed using:
# comm -13 <(ls -l $PREFIX/lib/libabsl_*.a | sed -e 's/.*libabsl_//' -e 's/.a$//' | sort -u) \
Expand All @@ -2713,6 +2718,9 @@ macro(resolve_dependency_absl)
config
container_common
container_memory
cordz_statistics
cordz_update_scope
cordz_update_tracker
core_headers
counting_allocator
debugging
Expand Down Expand Up @@ -2759,6 +2767,7 @@ macro(resolve_dependency_absl)
random_internal_wide_multiply
random_random
raw_hash_map
sample_recorder
span
str_format
type_traits
Expand Down Expand Up @@ -2867,23 +2876,82 @@ macro(resolve_dependency_absl)
absl::memory
absl::type_traits
absl::utility)
set_property(TARGET absl::cord
set_property(TARGET absl::cord_internal
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
absl::base_internal
absl::compressed_tuple
absl::config
absl::core_headers
absl::endian
absl::inlined_vector
absl::layout
absl::raw_logging_internal
absl::strings
absl::throw_delegate
absl::type_traits)
set_property(TARGET absl::cord
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
absl::config
absl::cord_internal
absl::cordz_functions
absl::cordz_info
absl::cordz_update_scope
absl::cordz_update_tracker
absl::core_headers
absl::endian
absl::fixed_array
absl::function_ref
absl::inlined_vector
absl::optional
absl::raw_logging_internal
absl::strings
absl::strings_internal
absl::throw_delegate
absl::type_traits)
set_property(TARGET absl::cordz_functions
PROPERTY INTERFACE_LINK_LIBRARIES
absl::config
absl::core_headers
absl::exponential_biased
absl::raw_logging_internal)
set_property(TARGET absl::cordz_handle
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
absl::config
absl::raw_logging_internal
absl::synchronization)
set_property(TARGET absl::cordz_info
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
absl::config
absl::cord_internal
absl::cordz_functions
absl::cordz_handle
absl::cordz_statistics
absl::cordz_update_tracker
absl::core_headers
absl::inlined_vector
absl::span
absl::raw_logging_internal
absl::stacktrace
absl::synchronization)
set_property(TARGET absl::cordz_sample_token
PROPERTY INTERFACE_LINK_LIBRARIES absl::config absl::cordz_handle
absl::cordz_info)
set_property(TARGET absl::cordz_statistics
PROPERTY INTERFACE_LINK_LIBRARIES
absl::config
absl::core_headers
absl::cordz_update_tracker
absl::synchronization)
set_property(TARGET absl::cordz_update_scope
PROPERTY INTERFACE_LINK_LIBRARIES
absl::config
absl::cord_internal
absl::cordz_info
absl::cordz_update_tracker
absl::core_headers)
set_property(TARGET absl::cordz_update_tracker PROPERTY INTERFACE_LINK_LIBRARIES
absl::config)
set_property(TARGET absl::core_headers PROPERTY INTERFACE_LINK_LIBRARIES absl::config)
set_property(TARGET absl::counting_allocator PROPERTY INTERFACE_LINK_LIBRARIES
absl::config)
Expand Down Expand Up @@ -3026,6 +3094,7 @@ macro(resolve_dependency_absl)
absl::flags_private_handle_accessor
absl::flags_program_name
absl::flags_reflection
absl::flat_hash_map
absl::strings
absl::synchronization)
set_property(TARGET absl::flags_usage
Expand All @@ -3050,8 +3119,9 @@ macro(resolve_dependency_absl)
absl::algorithm_container
absl::core_headers
absl::memory)
set_property(TARGET absl::function_ref PROPERTY INTERFACE_LINK_LIBRARIES
absl::base_internal absl::meta)
set_property(TARGET absl::function_ref
PROPERTY INTERFACE_LINK_LIBRARIES absl::base_internal absl::core_headers
absl::meta)
set_property(TARGET absl::graphcycles_internal
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
Expand Down Expand Up @@ -3079,7 +3149,7 @@ macro(resolve_dependency_absl)
absl::optional
absl::variant
absl::utility
absl::wyhash)
absl::low_level_hash)
set_property(TARGET absl::hash_policy_traits PROPERTY INTERFACE_LINK_LIBRARIES
absl::meta)
set_property(TARGET absl::hashtable_debug_hooks PROPERTY INTERFACE_LINK_LIBRARIES
Expand All @@ -3091,6 +3161,7 @@ macro(resolve_dependency_absl)
absl::base
absl::exponential_biased
absl::have_sse
absl::sample_recorder
absl::synchronization)
set_property(TARGET absl::inlined_vector_internal
PROPERTY INTERFACE_LINK_LIBRARIES
Expand Down Expand Up @@ -3123,6 +3194,12 @@ macro(resolve_dependency_absl)
absl::core_headers)
set_property(TARGET absl::log_severity PROPERTY INTERFACE_LINK_LIBRARIES
absl::core_headers)
set_property(TARGET absl::low_level_hash
PROPERTY INTERFACE_LINK_LIBRARIES
absl::bits
absl::config
absl::endian
absl::int128)
set_property(TARGET absl::malloc_internal
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
Expand Down Expand Up @@ -3318,7 +3395,6 @@ macro(resolve_dependency_absl)
absl::hash_policy_traits
absl::hashtable_debug_hooks
absl::have_sse
absl::layout
absl::memory
absl::meta
absl::optional
Expand All @@ -3330,6 +3406,8 @@ macro(resolve_dependency_absl)
absl::config
absl::core_headers
absl::log_severity)
set_property(TARGET absl::sample_recorder PROPERTY INTERFACE_LINK_LIBRARIES
absl::base absl::synchronization)
set_property(TARGET absl::scoped_set_env
PROPERTY INTERFACE_LINK_LIBRARIES absl::config
absl::raw_logging_internal)
Expand All @@ -3347,6 +3425,7 @@ macro(resolve_dependency_absl)
absl::core_headers)
set_property(TARGET absl::statusor
PROPERTY INTERFACE_LINK_LIBRARIES
absl::base
absl::status
absl::core_headers
absl::raw_logging_internal
Expand All @@ -3359,6 +3438,7 @@ macro(resolve_dependency_absl)
absl::atomic_hook
absl::config
absl::core_headers
absl::function_ref
absl::raw_logging_internal
absl::inlined_vector
absl::stacktrace
Expand Down Expand Up @@ -3439,6 +3519,19 @@ macro(resolve_dependency_absl)
absl::raw_logging_internal
absl::strings
absl::time_zone)
set_property(TARGET absl::type_traits PROPERTY INTERFACE_LINK_LIBRARIES absl::config)
set_property(TARGET absl::utility
PROPERTY INTERFACE_LINK_LIBRARIES absl::base_internal absl::config
absl::type_traits)
set_property(TARGET absl::variant
PROPERTY INTERFACE_LINK_LIBRARIES
absl::bad_variant_access
absl::base_internal
absl::config
absl::core_headers
absl::type_traits
absl::utility)

if(APPLE)
# This is due to upstream absl::cctz issue
# https://github.com/abseil/abseil-cpp/issues/283
Expand All @@ -3459,8 +3552,6 @@ macro(resolve_dependency_absl)
absl::core_headers
absl::type_traits
absl::utility)
set_property(TARGET absl::wyhash PROPERTY INTERFACE_LINK_LIBRARIES absl::config
absl::endian absl::int128)

externalproject_add(absl_ep
${EP_LOG_OPTIONS}
Expand Down Expand Up @@ -3548,14 +3639,16 @@ macro(build_grpc)
get_target_property(GRPC_RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(GRPC_RE2_ROOT "${GRPC_RE2_INCLUDE_DIR}" DIRECTORY)

# Put Abseil, etc. first so that local directories are searched
# before (what are likely) system directories
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${ABSL_PREFIX}")
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${GRPC_PB_ROOT}")
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${GRPC_GFLAGS_ROOT}")
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${GRPC_CARES_ROOT}")
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${GRPC_RE2_ROOT}")

# ZLIB is never vendored
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${ZLIB_ROOT}")
set(GRPC_CMAKE_PREFIX "${GRPC_CMAKE_PREFIX};${ABSL_PREFIX}")

if(RAPIDJSON_VENDORED)
add_dependencies(grpc_dependencies rapidjson_ep)
Expand Down Expand Up @@ -3625,8 +3718,11 @@ macro(build_grpc)
absl::debugging_internal
absl::demangle_internal
absl::graphcycles_internal
absl::hash
absl::int128
absl::malloc_internal
absl::random_internal_pool_urbg
absl::random_internal_randen
absl::raw_logging_internal
absl::spinlock_wait
absl::stacktrace
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/flight/CMakeLists.txt
Expand Up @@ -157,7 +157,8 @@ elseif(GRPC_VERSION EQUAL "1.34" OR GRPC_VERSION EQUAL "1.35")
elseif(GRPC_VERSION EQUAL "1.36")
add_definitions(-DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS
-DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental)
elseif(GRPC_VERSION EQUAL "1.43")
elseif((GRPC_VERSION EQUAL "1.43") OR (GRPC_VERSION EQUAL "1.46"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, do we not want to support any intermediate versions between 1.36 and 1.43, or 1.43 and 1.46?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens is that if we use system gRPC, we compile the test program and then assign a version of "1.43" regardless of the actual version; if we use bundled gRPC, we derive the version number from versions.txt. So a system gRPC 1.45 would still get reported as "1.43", but since we bumped the bundled version, we need to explicitly handle it here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I had misunderstood.

# 1.46 is the bundled version
add_definitions(-DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS
-DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental
-DGRPC_USE_CERTIFICATE_VERIFIER)
Expand Down
7 changes: 5 additions & 2 deletions cpp/src/arrow/flight/server.cc
Expand Up @@ -157,8 +157,11 @@ struct FlightServerBase::Impl {
void DoHandleSignal(int signum) {
got_signal_ = signum;
int saved_errno = errno;
// Ignore errors - pipe is nonblocking
PIPE_WRITE(self_pipe_wfd_, "0", 1);
if (PIPE_WRITE(self_pipe_wfd_, "0", 1) < 0) {
// Can't do much here, though, pipe is nonblocking so hopefully this doesn't happen
ARROW_LOG(WARNING) << "FlightServerBase: failed to handle signal " << signum
<< " errno: " << errno;
}
Comment on lines +160 to +164
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FTR, I opened https://issues.apache.org/jira/browse/ARROW-16769 to make this easier and nicer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This was just to silence a warning that I was getting

errno = saved_errno;
}

Expand Down
8 changes: 4 additions & 4 deletions cpp/thirdparty/versions.txt
Expand Up @@ -23,8 +23,8 @@
# `DEPENDENCIES` array (see the comment on top of the declaration for the
# format).

ARROW_ABSL_BUILD_VERSION=20210324.2
ARROW_ABSL_BUILD_SHA256_CHECKSUM=59b862f50e710277f8ede96f083a5bb8d7c9595376146838b9580be90374ee1f
ARROW_ABSL_BUILD_VERSION=20211102.0
ARROW_ABSL_BUILD_SHA256_CHECKSUM=dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4
ARROW_AWSSDK_BUILD_VERSION=1.8.133
ARROW_AWSSDK_BUILD_SHA256_CHECKSUM=d6c495bc06be5e21dac716571305d77437e7cfd62a2226b8fe48d9ab5785a8d6
ARROW_AWS_CHECKSUMS_BUILD_VERSION=v0.1.12
Expand All @@ -51,8 +51,8 @@ ARROW_GLOG_BUILD_VERSION=v0.5.0
ARROW_GLOG_BUILD_SHA256_CHECKSUM=eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5
ARROW_GOOGLE_CLOUD_CPP_BUILD_VERSION=v1.39.0
ARROW_GOOGLE_CLOUD_CPP_BUILD_SHA256_CHECKSUM=73e4e840018b24bec2beb49e036a3c2d8c471d4dc4a18b9026ccc4d8ab8e78cc
ARROW_GRPC_BUILD_VERSION=v1.35.0
ARROW_GRPC_BUILD_SHA256_CHECKSUM=27dd2fc5c9809ddcde8eb6fa1fa278a3486566dfc28335fca13eb8df8bd3b958
ARROW_GRPC_BUILD_VERSION=v1.46.3
ARROW_GRPC_BUILD_SHA256_CHECKSUM=d6cbf22cb5007af71b61c6be316a79397469c58c82a942552a62e708bce60964
ARROW_GTEST_BUILD_VERSION=1.11.0
ARROW_GTEST_BUILD_SHA256_CHECKSUM=b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5
ARROW_JEMALLOC_BUILD_VERSION=5.3.0
Expand Down