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 9bbac9023 [consensus] fix linkage failure on macOS
9bbac9023 is described below

commit 9bbac9023c702de8de9422747ca25bdd12b41312
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Sep 29 12:43:02 2025 -0700

    [consensus] fix linkage failure on macOS
    
    A prior patch implementing KUDU-1973 has introduced DCHECK_EQ()
    that wouldn't compile on macOS with clang, even if it completes
    successfully on Linux.  I didn't try to find the difference in how
    the glog in 3rd-party is built, but simply replaced DCHECK_EQ()
    with equivalent DCHECK() and now build passes on macOS as well.
    
    Before this patch, building the project on macOS would fail with an
    error like below:
    
    Undefined symbols for architecture x86_64:
      "void 
google::MakeCheckOpValueString<std::nullptr_t>(std::__1::basic_ostream<char, 
std::__1::char_traits<char>>*, std::nullptr_t const&)", referenced from:
          std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char>>* google::MakeCheckOpString<std::nullptr_t, 
std::__1::shared_ptr<kudu::rpc::PeriodicTimer>>(std::nullptr_t const&, 
std::__1::shared_ptr<kudu::rpc::PeriodicTimer> const&, char const*) in 
multi_raft_batcher.cc.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
    
    [1] https://github.com/apache/kudu/commit/4999c30d1
    
    Change-Id: I26d0b4c1149f2df92e0f8654f7dba654fa6e281d
    Reviewed-on: http://gerrit.cloudera.org:8080/23476
    Reviewed-by: Zoltan Martonka <[email protected]>
    Tested-by: Alexey Serbin <[email protected]>
    Reviewed-by: Abhishek Chennaka <[email protected]>
---
 src/kudu/consensus/multi_raft_batcher.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/consensus/multi_raft_batcher.cc 
b/src/kudu/consensus/multi_raft_batcher.cc
index 94e76539e..0eea97935 100644
--- a/src/kudu/consensus/multi_raft_batcher.cc
+++ b/src/kudu/consensus/multi_raft_batcher.cc
@@ -113,7 +113,7 @@ MultiRaftHeartbeatBatcher::MultiRaftHeartbeatBatcher(
 
 void MultiRaftHeartbeatBatcher::StartTimer() {
   std::weak_ptr<MultiRaftHeartbeatBatcher> const weak_peer = 
shared_from_this();
-  DCHECK_EQ(nullptr, heartbeat_timer_) << "Heartbeat timer started twice";
+  DCHECK(!heartbeat_timer_) << "Heartbeat timer started twice";
   heartbeat_timer_ = PeriodicTimer::Create(
       messenger_,
       [weak_peer]() {

Reply via email to