Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libunwind symbols missing #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix libunwind symbols missing #275

wants to merge 1 commit into from

Conversation

bmyerz
Copy link
Member

@bmyerz bmyerz commented Mar 26, 2016

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
Copy link
Member Author

bmyerz commented Mar 26, 2016

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

@bmyerz
Copy link
Member Author

bmyerz commented Jun 1, 2016

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
Copy link
Member

nelsonje commented Jun 1, 2016

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