-
Notifications
You must be signed in to change notification settings - Fork 168
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: _ZNK6google8protobuf7Message11GetTypeNameEv", g++-4.9 #45
Comments
Gist of build and output here: https://gist.github.com/hughperkins/da764a09b37a84e67684 Edit: protobuf version:
|
Oh... looks like since protobuf is a c++ library, needs gcc-5 to build it, on ubuntu 15.10. (Different from the cuda libraries, which needs 4.9 to build, since cuda toolkit doesnt work with gcc-5).
=> works ok |
Hi, I'm having the same issue even with gcc-5.4.0. Any ideas? It's the exact same issue. https://gist.github.com/jayanthkoushik/6b90eaad95ced5b7d0aa0762b34d60bf. |
Ah, I think I see the problem. It sets the runtime path to $ORIGIN/../lib. But protobuf isn't there. Is there any way to change this? |
@jayanthkoushik were you able to solve this? My error message is exactly the same as yours. I'd think the linking would work correctly, since this is what I get when I do an "ldd" on libloadcaffe:
libprotobuf has the correct path, but still "luajit -l loadcaffe" fails exactly like it fails for you... any help would be appreciated! |
@andrefaraujo No, I was not :-( |
@jayanthkoushik I was able to fix this by installing the most recent protobuf library (I cloned to a local directory from github here). I followed these instructions, except that I installed it to my home folder instead of to the default location. This is done by using the prefix option when issuing the configure command:
After building this new protobuf version, you can actually see that the "_ZNK6google8protobuf7Message11GetTypeNameB5cxx11Ev" symbol is there!
In the CMakeLists.txt for the loadcaffe package, make sure to add the following lines (of course, change the path accordingly):
Then, in the loadcaffe path, run:
and then it works :) hopefully this works for you too... |
I think the issue is caused by a mismatch between the g++ version used to build the protobuf library, and that used to build loadcaffe. Installing the latest version of protobuf, as per @andrefaraujo , my guess is, solves the issue, becuase the library is being rebuilt with the same version of g++ as loadcaffe? It's not certain, but I feel it could be a hypothesis worth double-checking perhaps? |
I had this issue. I generally use Anaconda virtual environments to isolate packages/installs, but got lazy and for convenience had caffe, and then later tensorflow installed in a py27 venv. The problem is multiply-present "protobuf" installs; in my case, via pip and conda. On my Arch Linux system I needed the pip-installed protobuf ("pip install protobuf") for my caffe install,
but tensoflow (installed via "conda install -c conda-forge tensorflow") installed the following:
Go ahead and remove all those protobuf versions
then delete and reinstall caffe:
I am again able to import caffe in my py27 venv, without the "undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameEv..." error. I just then went ahead and reinstalled tensorflow,
with the caveat that on on subsequent caffe or tensorflow updates I may need to repeat this process; due to this mess:
Meh ! :-/ But I can import my packages, again:
|
Same happened here on Gentoo system with gcc 6.2.0, I just reinstalled latest version -> dev-libs/protobuf-3.1.0::gentoo And now the error dissapeared. |
sudo $(which luarocks) install loadcaffe |
We can install loadcaffe from the original source code, by
if you have some problems as @andrefaraujo mentioned, you have to build libprotobuf from its source code, set
|
Share my solution first. These two commands solved my problem.
Hi, I checked the logs of
Running luarocks without sudo include So check the logs and make sure nothing weird happens. Besides, there might be some methods in lua to find which protobuf I am using, right? Does anyone knows the answer? |
Tried all the methods mentioned above, does not work for me. :( |
Installed as follows, on ubuntu 15.10:
Test as follows:
What I expect to happen:
What actually happens:
The text was updated successfully, but these errors were encountered: