Closed StiphyJay closed 5 years ago
I am not sure if you have properly installed the protobuf. I installed the Tensorflow 1.13 from source without having any issue with the same installation steps.
To make sure that you have the matching versions of the dependencies, you need to run the script provided by the source, i.e.,
bash tensorflow/contrib/makefile/download_dependencies.sh
You should see the folders (the required dependencies) in 'tensorflow/contrib/makefile/downloads'. Make sure that you install the 'protobuf' properly (read protobuf/src/README.md).
Since the compiler is complaining about the absence of the file 'google/protobuf/arena.h'. I would suggest you to go to '/usr/local/include/google/protobuf' directory and check if the 'arena.h' file is there.
Also, please go to 'CMakeModules/FindProtobuf.cmake' and make the following change: '/usr/local/include/google' -> '/usr/local/include'
if the previous steps are not working.
Let me know if the suggestions above help so that I can update the installation instructions accordingly.
I would always install the dependencies locally, i.e., cmake -DCMAKE_INSTALL_PREFIX=/local/path ..
to avoid conflict with other executables. Of course, you would then need to make sure that FindProtobuf.cmake is able to find the locally installed Protobuf.
hello, I have build tensorflow c++ according your work, the versions are tensorflow1.8, cuda8.0, cudnn6.0. I try to build this demo, but reminding me tensor.pb.h is generated by older protobuf version, which cause to error. I want to know should the version of protobuf be 2.6.13 ? will other alternatives cause to error?
Hello, about your problem, I suggest you should build protobuf in your document path : ~/tensorflow/tensorflow/contrib/makefile/, and then you can build the "download_dependencies.sh" by run "bash download_dependencies.sh" in comman line.
After that there will have a "download" document was generated. And then you can enter this document ,and enter the "protobuf" ducument to run "bash autogen.sh" in your comman line.
Next,you can install protobuf according to ~/tensorflow/tensorflow/contrib/makefile/downloads/protobuf/src/README.md These steps may be a little difficulty.
Good Luck to You.
- ----------------- 原始邮件 ------------------ 发件人: "GentlemanCheng"notifications@github.com; 发送时间: 2019年4月30日(星期二) 晚上9:52 收件人: "yan99033/monodepth-cpp"monodepth-cpp@noreply.github.com; 抄送: "一半阳光丶未央"601772137@qq.com; "Author"author@noreply.github.com; 主题: Re: [yan99033/monodepth-cpp] can't compile sucesefully,there is myquestion. (#4)
hello, I have build tensorflow c++ according your work, the versions are tensorflow1.8, cuda8.0, cudnn6.0. I try to build this demo, but reminding me tensor.pb.h is generated by older protobuf version, which cause to error. I want to know should the version of protobuf be 2.6.13 ? will other alternatives cause to error?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@StiphyJay Hey, thanks for the suggestion. I am considering updating the build instruction for easier compilation.
@GentlemanCheng As for the Protobuf version, indeed you would need the right version to make your code work. Specifically for Tensoflow 1.8, you can find the download link in tensorflow/workspace.bzl, which is this custom Protobuf version in com_google_protobuf_cc section. Sometimes they are using a very specific commit of the Protobuf version, which is not related to the ones that are publicly available. Normally the download_dependencies.sh
script will get you the right Protobuf version, but recently I was having the Protobuf installation issue with the compilation on NVidia Xavier (which was then resolved by going into the tensorflow/workspace.bzl
file to grab the download link)
@StiphyJay Thank you,I will try again with tensorflow1.6, cuda9.0, cudnn7, bazel 0.9.0.
@yan99033 Thank you, I have gotten the protobuf from the link you provided, but I'm not sure what I will do is right. I'm going to put the whole protobuf file into this directory : ~/tensorflow/tensorflow/contrib/makefile/downloads/ , and then compile it by these commands (I found in goole)under ~/tensorflow : mkdir /tmp/proto cd tensorflow/contrib/makefile/downloads/protobuf/ ./autogen.sh ./configure --prefix=/tmp/proto/ make make install Can it work? I build tensorflow for c++ first, and then build protobuf in my last trial. Looking forward to your reply! Thank you!
@GentlemanCheng The commands should work. But I think you shouldn't build the protobuf library in /tmp folder, because the files in this folder are cleared at every boot.
When I compile monodepth.cpp according to your instrution,I found that your tensorflow instrutions are different from tensorflow-cmake(official instrustion),which you copy files from ~/tensorflow/bazel-genfiles/tensorflow/core/ to ~/tensorflow/local/include/google/tensorflow/..,rather than /usr/local/include/google (official instructions),and I install Eigen 3.3.4 and Protobuf 2.6.1 in my /usr/local directory ,but when I compile the monodepth-cpp project ,i meet the error are following: fatal error: google/protobuf/arena.h: 没有那个文件或目录
Counld you give me some suggestions about this? Thank you vecy much!