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

undefined symbol: _ZN6google8protobuf8internal13empty_string_E #7

Open
bingosxs opened this issue Jun 28, 2017 · 2 comments
Open

undefined symbol: _ZN6google8protobuf8internal13empty_string_E #7

bingosxs opened this issue Jun 28, 2017 · 2 comments

Comments

@bingosxs
Copy link

bingosxs commented Jun 28, 2017

I try to use the bap-pintrace.
After following the instructions from this git, I run into this problem:

export LD_LIBRARY_PATH=/home/canicula/local/lib/ ; pin -injection child -t obj-intel64/gentrace.so -o exec.frames -logall_before 1 -- /bin/ls
E: Unable to load /home/canicula/work/gentool/bap-pintraces/obj-intel64/gentrace.so: /home/canicula/work/gentool/bap-pintraces/obj-intel64/gentrace.so: undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameB5cxx11Ev


The demangled symobl is "google::protobuf::Message::GetTypeNameabi:cxx11 const
"
it seems that this is a compiler issue.
I'm using g++-4.9 from Ubuntu 16.04 amd64 version.
4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The google protobuf is compiled using g++-4.9 as well.

Any way to solve this issue?

@bingosxs
Copy link
Author

Using the default protobuf from ubuntu 16.04 will produce the following errors:

E: Unable to load /home/canicula/work/gentool/bap-pintraces/obj-intel64/gentrace.so: /home/canicula/work/gentool/bap-pintraces/obj-intel64/gentrace.so: undefined symbol: _ZN6google8protobuf8internal13empty_string_E

This time the g++ compiler is g++4.4.

But g++4.4 fails to compile the protobuf library from github

@ivg
Copy link
Member

ivg commented Jun 28, 2017

The symptoms show that your code was compiled with one version of ф library, and is dynamically linked with another. If you're using the precompiled binaries, then it might be the problem, as they were compiled on Trusty (14.04), for a specific version of protobufs/libc++/etc. Yeah, the DLL hell as it is. Probably, the easiest solution would be to build everything from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants