This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new ef5ed59  [util] fix debug builds in macOS
ef5ed59 is described below

commit ef5ed59760280537ad532c93d73ca2a7afcb74d3
Author: Alexey Serbin <[email protected]>
AuthorDate: Wed Feb 19 21:04:01 2020 -0800

    [util] fix debug builds in macOS
    
    Prior to this patch, a debug build on macOS would fail with linker error
    like below:
    
      Undefined symbols for architecture x86_64:
        "kudu::HashAlgorithm_IsValid(int)", referenced from:
            
kudu::BlockBloomFilterPB::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)
 in block_bloom_filter.pb.cc.o
            kudu::BlockBloomFilterPB::set_hash_algorithm(kudu::HashAlgorithm) 
in block_bloom_filter.pb.cc.o
        "kudu::protobuf_kudu_2futil_2fhash_2eproto::InitDefaults()", referenced 
from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::TableStruct::InitDefaultsImpl()
 in block_bloom_filter.pb.cc.o
        "kudu::protobuf_kudu_2futil_2fhash_2eproto::AddDescriptors()", 
referenced from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::(anonymous 
namespace)::AddDescriptorsImpl() in block_bloom_filter.pb.cc.o
        "kudu::protobuf_kudu_2futil_2fpb_5futil_2eproto::InitDefaults()", 
referenced from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::TableStruct::InitDefaultsImpl()
 in block_bloom_filter.pb.cc.o
        "kudu::protobuf_kudu_2futil_2fpb_5futil_2eproto::AddDescriptors()", 
referenced from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::(anonymous 
namespace)::AddDescriptorsImpl() in block_bloom_filter.pb.cc.o
      ld: symbol(s) not found for architecture x86_64
    
    and
    
      Undefined symbols for architecture x86_64:
        "kudu::protobuf_kudu_2futil_2fpb_5futil_2eproto::InitDefaults()", 
referenced from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::TableStruct::InitDefaultsImpl()
 in block_bloom_filter.pb.cc.o
        "kudu::protobuf_kudu_2futil_2fpb_5futil_2eproto::AddDescriptors()", 
referenced from:
            
kudu::protobuf_kudu_2futil_2fblock_5fbloom_5ffilter_2eproto::(anonymous 
namespace)::AddDescriptorsImpl() in block_bloom_filter.pb.cc.o
      ld: symbol(s) not found for architecture x86_64
    
    and
    
      Undefined symbols for architecture x86_64:
        "kudu::tablet::TestCFileSet::kRatio", referenced from:
            kudu::tablet::TestCFileSet::WriteTestRowSet(int) in 
cfile_set-test.cc.o
            kudu::tablet::TestCFileSet::FillBloomFilter(int, 
kudu::BlockBloomFilter*, kudu::BlockBloomFilter*, kudu::BlockBloomFilter*, 
kudu::BlockBloomFilter*) in cfile_set-test.cc.o
            kudu::tablet::TestCFileSet::GetBloomFilterResult(int, 
kudu::BlockBloomFilter*, kudu::BlockBloomFilter*, kudu::BlockBloomFilter*, 
kudu::BlockBloomFilter*, std::__1::vector<unsigned long, 
std::__1::allocator<unsigned long> >*, std::__1::vector<unsigned long, 
std::__1::allocator<unsigned long> >*, std::__1::vector<unsigned long, 
std::__1::allocator<unsigned long> >*, std::__1::vector<unsigned long, 
std::__1::allocator<unsigned long> >*) in cfile_set-test.cc.o
      ld: symbol(s) not found for architecture x86_64
    
    This is a follow-up to 961888dd14e5bd306d3e5b741bc4443620617664.
    
    Change-Id: I48775a683bf47af5b97d44e14aa351eb54a69181
    Reviewed-on: http://gerrit.cloudera.org:8080/15252
    Reviewed-by: Adar Dembo <[email protected]>
    Tested-by: Kudu Jenkins
---
 src/kudu/tablet/cfile_set-test.cc | 4 +++-
 src/kudu/util/CMakeLists.txt      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/kudu/tablet/cfile_set-test.cc 
b/src/kudu/tablet/cfile_set-test.cc
index 8838ce2..638cb0c 100644
--- a/src/kudu/tablet/cfile_set-test.cc
+++ b/src/kudu/tablet/cfile_set-test.cc
@@ -267,13 +267,15 @@ class TestCFileSet : public KuduRowSetTest {
     return attr;
   }
 
-  static constexpr int kRatio[] = {2, 10, 100};
+  static const int kRatio[];
 
  protected:
   static const int32_t kNoBound;
   google::FlagSaver saver;
 };
 
+const int TestCFileSet::kRatio[] = {2, 10, 100};
+
 const int32_t TestCFileSet::kNoBound = kuint32max;
 
 TEST_F(TestCFileSet, TestPartiallyMaterialize) {
diff --git a/src/kudu/util/CMakeLists.txt b/src/kudu/util/CMakeLists.txt
index b09b495..b185434 100644
--- a/src/kudu/util/CMakeLists.txt
+++ b/src/kudu/util/CMakeLists.txt
@@ -26,7 +26,7 @@ PROTOBUF_GENERATE_CPP(
   PROTO_FILES block_bloom_filter.proto)
 ADD_EXPORTABLE_LIBRARY(block_bloom_filter_proto
   SRCS ${BLOCK_BLOOM_FILTER_PROTO_SRCS}
-  DEPS protobuf
+  DEPS hash_proto pb_util_proto protobuf
   NONLINK_DEPS ${BLOCK_BLOOM_FILTER_PROTO_TGTS})
 
 #######################################

Reply via email to