You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2018/08/25 08:13:37 UTC

kudu git commit: [gutil] add libunwind along with libglog to fix build

Repository: kudu
Updated Branches:
  refs/heads/master be360bf01 -> 0dc19bfb3


[gutil] add libunwind along with libglog to fix build

Since libglog depends on libunwind (at least on older Linux systems),
it's necessary to add libunwind into the list of libraries when
linking in libglog.  Otherwise, in case of a static linkage, there are
errors like below:

./../../lib/../src/kudu/util/CMakeFiles/kudu_util.dir/debug-util.cc.o: In function `PrimeLibunwind':
src/kudu/src/kudu/util/debug-util.cc:349: undefined reference to `_Ux86_64_getcontext'
src/kudu/src/kudu/util/debug-util.cc:350: undefined reference to `_ULx86_64_init_local'
../../../lib/../src/kudu/util/CMakeFiles/kudu_util.dir/debug-util.cc.o: In function `kudu::StackTrace::Collect(int)':
src/kudu/src/kudu/util/debug-util.cc:591: undefined reference to `_Ux86_64_getcontext'
src/kudu/src/kudu/util/debug-util.cc:592: undefined reference to `_ULx86_64_init_local'
src/kudu/src/kudu/util/debug-util.cc:607: undefined reference to `_ULx86_64_step'
src/kudu/src/kudu/util/debug-util.cc:598: undefined reference to `_ULx86_64_get_reg'
src/kudu/src/kudu/util/debug-util.cc:607: undefined reference to `_ULx86_64_step'
../../../../../thirdparty/installed/uninstrumented/lib/libglog.a(libglog_la-utilities.o): In function `GetStackTrace':
src/kudu/thirdparty/src/glog-0.3.5/src/stacktrace_libunwind-inl.h:65: undefined reference to `_Ux86_64_getcontext'
src/kudu/thirdparty/src/glog-0.3.5/src/stacktrace_libunwind-inl.h:66: undefined reference to `_ULx86_64_init_local'
src/kudu/thirdparty/src/glog-0.3.5/src/stacktrace_libunwind-inl.h:78: undefined reference to `_ULx86_64_step'
src/kudu/thirdparty/src/glog-0.3.5/src/stacktrace_libunwind-inl.h:70: undefined reference to `_ULx86_64_get_reg'
src/kudu/thirdparty/src/glog-0.3.5/src/stacktrace_libunwind-inl.h:78: undefined reference to `_ULx86_64_step'
collect2: error: ld returned 1 exit status

This is a follow-up for a8d088e11b8b901a91e4820dcfdca9537a1e801a: in
that changelist KUDU_BASE_LIBS were removed from the linkage
of libraries/binaries where libgutil was linked in (KUDU_BASE_LIBS
contains both libglog and libunwind).

Change-Id: Ia91824b257fbc41a442b484bbc5a5f926db708ec
Reviewed-on: http://gerrit.cloudera.org:8080/11327
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/0dc19bfb
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/0dc19bfb
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/0dc19bfb

Branch: refs/heads/master
Commit: 0dc19bfb37cf9a20b9e1d7122084c199720d5ca4
Parents: be360bf
Author: Alexey Serbin <as...@cloudera.com>
Authored: Sat Aug 25 00:05:52 2018 -0700
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Sat Aug 25 08:06:19 2018 +0000

----------------------------------------------------------------------
 src/kudu/gutil/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/0dc19bfb/src/kudu/gutil/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/CMakeLists.txt b/src/kudu/gutil/CMakeLists.txt
index 3d487eb..093cc1b 100644
--- a/src/kudu/gutil/CMakeLists.txt
+++ b/src/kudu/gutil/CMakeLists.txt
@@ -54,6 +54,7 @@ set(GUTIL_SRCS
 
 set(GUTIL_LIBS
   glog
+  unwind
   protobuf)
 
 if (NOT APPLE)