Skip to content

Commit

Permalink
Fix linker error with tablet_replica-test-base.cc on Mac OS
Browse files Browse the repository at this point in the history
Hit following linker error on Mac OS 10.15.4 which indicates
missing gtest related library.

Undefined symbols for architecture x86_64:
  "kudu::KuduTest::SetUp()", referenced from:
      kudu::tablet::KuduTabletTest::SetUp() in tablet_replica-test-base.cc.o
  "testing::Test::TearDown()", referenced from:
      kudu::tablet::TabletReplicaTestBase::TearDown() in tablet_replica-test-base.cc.o
  "testing::Message::Message()", referenced from:
      kudu::tablet::TabletReplicaTestBase::SetUp() in tablet_replica-test-base.cc.o
  "testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)", referenced from:
      kudu::tablet::TabletReplicaTestBase::SetUp() in tablet_replica-test-base.cc.o
  "testing::internal::AssertHelper::~AssertHelper()", referenced from:
      kudu::tablet::TabletReplicaTestBase::SetUp() in tablet_replica-test-base.cc.o
  "testing::internal::AssertHelper::operator=(testing::Message const&) const", referenced from:
      kudu::tablet::TabletReplicaTestBase::SetUp() in tablet_replica-test-base.cc.o
  "typeinfo for kudu::KuduTest", referenced from:
      typeinfo for kudu::tablet::KuduTabletTest in tablet_replica-test-base.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)
make[2]: *** [lib/libtablet_test_util.dylib] Error 1

Added kudu_test_util as suggested by Andrew to fix the linker issue.

Change-Id: Ie5857cc0b3436452b5de5aa85fbffe42fad7dff3
Reviewed-on: http://gerrit.cloudera.org:8080/16038
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
  • Loading branch information
bbhavsar authored and andrwng committed Jun 5, 2020
1 parent df1a5d9 commit c394526
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/kudu/tablet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ add_library(tablet_test_util
tablet_replica-test-base.cc)
target_link_libraries(tablet_test_util
kudu_common
kudu_test_util
log_proto
tablet)

Expand Down

0 comments on commit c394526

Please sign in to comment.