From c9bc0dd9d4361d71f2efaa23552bc6b6d7fdf834 Mon Sep 17 00:00:00 2001 From: Brandon Myers Date: Fri, 25 Mar 2016 18:59:00 -0700 Subject: [PATCH] GLOG depends on libunwind. Sometimes libunwind symbols were missing. This commit adds libunwind explicitly to the linking command. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dcc6c95b..e53d7f063 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,12 @@ list(APPEND GRAPPA_ENV GLOG_v=1 ) +# libunwind must go after GLOG library in the linking list to resolve its references. +# We force find_library to use static library because we are putting all dynamics before statics +find_library(UNWIND_FOUND NAMES libunwind.a REQUIRED) +message("UNWIND_FOUND: ${UNWIND_FOUND}") +list(APPEND GRAPPA_STATIC_LIBS ${UNWIND_FOUND}) + ###################################################################### # Google flags # in theory, it may come from third-party or from system directories,