This is an automated email from the ASF dual-hosted git repository. tarmstrong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push: new dadc3bd IMPALA-9940: add missing kudu protobuf deps dadc3bd is described below commit dadc3bd61bfb23ad6ef713309b79f9c7bd9b4909 Author: Tim Armstrong <tarmstr...@cloudera.com> AuthorDate: Thu Jul 9 20:37:46 2020 -0700 IMPALA-9940: add missing kudu protobuf deps Parts of Impala have transitive dependencies on protobuf generated headers from the kudu/ subdirectories, e.g. kudu/util/hash.pb.h. We did not define this dependency in our CMakeLists, so race conditions are possible that cause build failures. This patch fixes the problem by making the gen-deps target depend on the protobuf-generated code in the kudu/ subdirectories. Change-Id: I481d290b424c26da9ec3853d8681c3d6fc34bec6 Reviewed-on: http://gerrit.cloudera.org:8080/16164 Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Reviewed-by: Thomas Tauber-Marshall <tmarsh...@cloudera.com> --- CMakeLists.txt | 3 ++- be/src/kudu/rpc/CMakeLists.txt | 7 +++++++ be/src/kudu/security/CMakeLists.txt | 4 ++++ be/src/kudu/util/CMakeLists.txt | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f273bd..6e4e2e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -420,7 +420,8 @@ add_subdirectory(ext-data-source) add_subdirectory(query-event-hook-api) # Build target for all generated files which most backend code depends on -add_custom_target(gen-deps ALL DEPENDS thrift-deps proto-deps fb-deps) +add_custom_target(gen-deps ALL DEPENDS thrift-deps proto-deps fb-deps + kudu-util-proto-deps kudu-rpc-proto-deps kudu-security-proto-deps) add_custom_target(tarballs ALL DEPENDS shell_tarball) diff --git a/be/src/kudu/rpc/CMakeLists.txt b/be/src/kudu/rpc/CMakeLists.txt index 19b2f57..1c1118e 100644 --- a/be/src/kudu/rpc/CMakeLists.txt +++ b/be/src/kudu/rpc/CMakeLists.txt @@ -15,6 +15,9 @@ # specific language governing permissions and limitations # under the License. +# Target including all protobuf-generated code. +add_custom_target(kudu-rpc-proto-deps) + #### Global header protobufs PROTOBUF_GENERATE_CPP( RPC_HEADER_PROTO_SRCS RPC_HEADER_PROTO_HDRS RPC_HEADER_PROTO_TGTS @@ -26,6 +29,8 @@ ADD_EXPORTABLE_LIBRARY(rpc_header_proto DEPS protobuf pb_util_proto token_proto NONLINK_DEPS ${RPC_HEADER_PROTO_TGTS}) +add_dependencies(kudu-rpc-proto-deps ${RPC_HEADER_PROTO_TGTS}) + PROTOBUF_GENERATE_CPP( RPC_INTROSPECTION_PROTO_SRCS RPC_INTROSPECTION_PROTO_HDRS RPC_INTROSPECTION_PROTO_TGTS SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. @@ -39,6 +44,8 @@ ADD_EXPORTABLE_LIBRARY(rpc_introspection_proto DEPS ${RPC_INTROSPECTION_PROTO_LIBS} NONLINK_DEPS ${RPC_INTROSPECTION_PROTO_TGTS}) +add_dependencies(kudu-rpc-proto-deps ${RPC_INTROSPECTION_PROTO_TGTS}) + add_definitions(-DKUDU_HEADERS_USE_SHORT_STATUS_MACROS) ### RPC library diff --git a/be/src/kudu/security/CMakeLists.txt b/be/src/kudu/security/CMakeLists.txt index ad7c0f6..22e7442 100644 --- a/be/src/kudu/security/CMakeLists.txt +++ b/be/src/kudu/security/CMakeLists.txt @@ -19,6 +19,9 @@ # The top-level CMakeLists sets a ${KRB5_REALM_OVERRIDE} variable which should # be linked first into all Kudu binaries. +# Target including all protobuf-generated code. +add_custom_target(kudu-security-proto-deps) + ############################## # krb5_realm_override ############################## @@ -46,6 +49,7 @@ ADD_EXPORTABLE_LIBRARY(token_proto DEPS ${TOKEN_PROTO_LIBS} NONLINK_DEPS ${TOKEN_PROTO_TGTS}) +add_dependencies(kudu-security-proto-deps ${TOKEN_PROTO_TGTS}) ############################## # security diff --git a/be/src/kudu/util/CMakeLists.txt b/be/src/kudu/util/CMakeLists.txt index 82286ac..5a225f6 100644 --- a/be/src/kudu/util/CMakeLists.txt +++ b/be/src/kudu/util/CMakeLists.txt @@ -15,6 +15,9 @@ # specific language governing permissions and limitations # under the License. +# Target including all protobuf-generated code. +add_custom_target(kudu-util-proto-deps) + ####################################### # block_bloom_filter_proto ####################################### @@ -29,6 +32,8 @@ ADD_EXPORTABLE_LIBRARY(block_bloom_filter_proto DEPS hash_proto pb_util_proto protobuf NONLINK_DEPS ${BLOCK_BLOOM_FILTER_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${BLOCK_BLOOM_FILTER_PROTO_TGTS}) + ####################################### # util_compression_proto ####################################### @@ -43,6 +48,8 @@ ADD_EXPORTABLE_LIBRARY(util_compression_proto DEPS protobuf NONLINK_DEPS ${UTIL_COMPRESSION_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${UTIL_COMPRESSION_PROTO_TGTS}) + add_definitions(-DKUDU_HEADERS_USE_SHORT_STATUS_MACROS) ####################################### @@ -59,6 +66,8 @@ ADD_EXPORTABLE_LIBRARY(hash_proto DEPS protobuf NONLINK_DEPS ${HASH_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${HASH_PROTO_TGTS}) + ####################################### # histogram_proto ####################################### @@ -73,6 +82,8 @@ ADD_EXPORTABLE_LIBRARY(histogram_proto DEPS protobuf NONLINK_DEPS ${HISTOGRAM_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${HISTOGRAM_PROTO_TGTS}) + ####################################### # maintenance_manager_proto ####################################### @@ -87,6 +98,8 @@ ADD_EXPORTABLE_LIBRARY(maintenance_manager_proto DEPS protobuf NONLINK_DEPS ${MAINTENANCE_MANAGER_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${MAINTENANCE_MANAGER_PROTO_TGTS}) + ####################################### # mem_tracker_proto ####################################### @@ -101,6 +114,8 @@ ADD_EXPORTABLE_LIBRARY(mem_tracker_proto DEPS protobuf NONLINK_DEPS ${MEM_TRACKER_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${MEM_TRACKER_PROTO_TGTS}) + ####################################### # pb_util_proto ####################################### @@ -115,6 +130,8 @@ ADD_EXPORTABLE_LIBRARY(pb_util_proto DEPS protobuf NONLINK_DEPS ${PB_UTIL_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${PB_UTIL_PROTO_TGTS}) + ####################################### # version_info_proto ####################################### @@ -129,6 +146,8 @@ ADD_EXPORTABLE_LIBRARY(version_info_proto DEPS protobuf NONLINK_DEPS ${VERSION_INFO_PROTO_TGTS}) +add_dependencies(kudu-util-proto-deps ${VERSION_INFO_PROTO_TGTS}) + ############################################################ # Version stamp ############################################################