From 37f6d224d69edd532197d615ace872933be5d74b Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 7 Mar 2018 23:22:47 -0800 Subject: Fix build issue with KafkaDataset (#17418) * Fix build issue with KafkaDataset This fix tries to address the issue raised in 17210 where error of `NotFoundError: Op type not registered 'KafkaDataset' in binary.` returned from kafka ops. The issue was that the inclusion of kafka ops was removed due to the conflict merge from the other PR. This fix fixes the issue. This fix fixes 17210. Signed-off-by: Yong Tang * Change `import readers.Dataset` to `import dataset_ops.Dataset`, due to the changes in some other places. Signed-off-by: Yong Tang * Fix library dependency issues in bazel Signed-off-by: Yong Tang * Add dependency to bazel rules Signed-off-by: Yong Tang * Add license to lib and pip package Signed-off-by: Yong Tang * Remove unneeded changes in bazel Signed-off-by: Yong Tang * Address review feedback Signed-off-by: Yong Tang * Fix sanity check Signed-off-by: Yong Tang * Add zlib dependency and include path Signed-off-by: Yong Tang * Add copts in bazel to address the discrepancy in clang and gcc Signed-off-by: Yong Tang --- third_party/kafka/BUILD | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'third_party/kafka') diff --git a/third_party/kafka/BUILD b/third_party/kafka/BUILD index a61a9e1f6c..a839ca717e 100644 --- a/third_party/kafka/BUILD +++ b/third_party/kafka/BUILD @@ -130,12 +130,16 @@ cc_library( ], hdrs = [ "config.h", + "src-cpp/rdkafkacpp.h", + "src-cpp/rdkafkacpp_int.h", + "src/lz4.c", + "src/snappy_compat.h", ], - defines = [ + copts = [ + "-Iexternal/kafka/src", + "-Iexternal/kafka/src-cpp", ], - includes = [ - "src", - "src-cpp", + defines = [ ], linkopts = [ "-lpthread", @@ -143,5 +147,6 @@ cc_library( visibility = ["//visibility:public"], deps = [ "@boringssl//:ssl", + "@zlib_archive//:zlib", ], ) -- cgit v1.2.3