stanford-futuredata / noscope

Accelerating network inference over video
http://dawn.cs.stanford.edu/2017/06/22/noscope/
436 stars 122 forks source link

/usr/local/lib/libopencv_core.so.3.2:error adding symbols:DSO missing from command line #15

Open zzzzzz0407 opened 7 years ago

zzzzzz0407 commented 7 years ago

when i use the command bazel build -c opt --copt=-mavx2 --config=cuda noscope and everything is fine but i meet this issue image and then i use the command bazel build -c opt --copt=-mavx2 --config=cuda noscope -lopencv_core and have no command,i don not know how ti fix it when i use the command ./configure i decide not to build TensorFlow with OpenCL support,i do not know if it matters.

ddkang commented 7 years ago

You do not need OpenCL.

It seems you have OpenCV 3.2 and 2.4 installed. It looks like they conflict. You'll need to either make OpenCV 3.2 the default or uninstall 2.4. I'll need to know more about your system to advise further.

zzzzzz0407 commented 7 years ago

Thank you very much and i have solve the issue but i meet with another ,mm,sorry to disturb you again , when i bazel build -c opt --copt=-mavx2 --config=cuda noscope the new issue appears:Target //tensorflow/noscope:noscope up-to-date: bazel-bin/tensorflow/noscope/noscope so i follow the command,then it shows me the following: [libprotobuf FATAL external/protobuf/src/google/protobuf/stubs/common.cc:78] This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.2.0). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/build/mir-ui6vjS/mir-0.26 .3+16.04.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".) If you do not have a new version,i would like to compile the problem myself ,but I am a rooike in this filed and i do not know how to compile it myself ?Can you help me? Thanks!

ddkang commented 7 years ago

Unfortunately I don't know how to share bazel built binaries. Please send a feature request for the TensorFlow for non-bazel builds.

In terms of your error, it seems that you have a libprotobuf mismatch (similar to the OpenCV one). I would check to make sure your libprotobuf-dev and libprotobuf (the library) match. Similarly, I would try to upgrade both to 3.2.0.

zzzzzz0407 commented 7 years ago

I can’t understand the sentence of "Please send a feature request for the TensorFlow for non-bazel builds" The thing i can only tell you is that my libprotobuf is libprotobuf.so.9.0.1 And I download my TensorFlow from https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl Maybe it doesn't matter. And if you upgrade you code to 3.2.0, please tell me ,thank you very much!You are enthusiasm and your work is great!

ddkang commented 7 years ago

If TensorFlow provides a way to build without requiring bazel, I can more easily ship builds. As is, I'm stuck with bazel's limitations.

As far as I can tell, the libprotobuf issue is with your configuration. I believe the NoScope build simply links against what is provided. So, my current hypothesis is you have two conflicting installs of libprotobuf. Check out this thread for a similar issue: https://github.com/BVLC/caffe/issues/3046#issuecomment-256001120

zzzzzz0407 commented 7 years ago

I have download and install the version 2.6.1 of the Protocol Buffer in my own path, and add its path to the ~/.bashrc, but when I ues the command of bazel build -c opt --copt=-mavx2 --config=cuda noscope, it appears the same issue that tells me my version is 3.2.0 , so I want to know how to use the 2,6,1 version in my own path rather than the default version?Thank you very much!

ddkang commented 7 years ago

Please try installing version 3.2.0 instead.

muyue1238 commented 6 years ago

@zHanami I've counted the same problem. As far as I can tell, bazel has downloaded another version of protobuf in .cache/bazel/, which lead to the problem you counted. I find no solution yet, what about you? My situation is that my libcaffe.so was compiled with protobuf-2.6.1, and it seems that tensorflow can't be compiled that way, which is quiet annoying.

viralbthakar commented 6 years ago

@zHanami How did you solve the first problem you mentioned? The one with "libopencv_core.so.3.4: error adding symbols: DSO missing from command line" error. Can you please provide detail steps to make opencv 3.4 the default opencv.