Skip to content

Fix libunwind symbols missing#275

Open
bmyerz wants to merge 1 commit into
masterfrom
bmyerz/libunwind
Open

Fix libunwind symbols missing#275
bmyerz wants to merge 1 commit into
masterfrom
bmyerz/libunwind

Conversation

@bmyerz

@bmyerz bmyerz commented Mar 26, 2016

Copy link
Copy Markdown
Member

GLOG (google logging) depends on libunwind. Sometimes libunwind symbols were not found by the linker.

Without the fix

[ 95%] Linking CXX executable hello_world.exe
../../third-party/lib/libglog.a(libglog_la-utilities.o): In function `google::GetStackTrace(void**, int, int)':
utilities.cc:(.text+0x7a6): undefined reference to `_Ux86_64_getcontext'
utilities.cc:(.text+0x7bf): undefined reference to `_ULx86_64_init_local'
utilities.cc:(.text+0x818): undefined reference to `_ULx86_64_get_reg'
utilities.cc:(.text+0x877): undefined reference to `_ULx86_64_step'
collect2: error: ld returned 1 exit status
make[3]: *** [applications/demos/hello_world.exe] Error 1
make[2]: *** [applications/demos/CMakeFiles/demo-hello_world.dir/all] Error 2
make[1]: *** [applications/demos/CMakeFiles/demo-hello_world.dir/rule] Error 2
make: *** [demo-hello_world] Error 2

Proposed fix (c9bc0dd) adds the linking flag explicitly.

This commit adds libunwind explicitly to the linking command.
@bmyerz

bmyerz commented Mar 26, 2016

Copy link
Copy Markdown
Member Author

from travis-ci build
image
Probably don't make it required

@bmyerz

bmyerz commented Jun 1, 2016

Copy link
Copy Markdown
Member Author

Leaving a more explicit note here: when we enable frame pointers when libunwind is not found, we also need to enable them in our build of gperftools

@nelsonje

nelsonje commented Jun 1, 2016

Copy link
Copy Markdown
Member

I think the right thing to do here is redistribute the correct version of libunwind, perhaps with c++11 modifications. But I've had trouble getting libunwind+gperftools to work with Grappa in recent months, and I'm not going to have more time to debug it. You want to take a look sometime? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants