xbpeng / DeepTerrainRL

terrain-adaptive locomotion skills using deep reinforcement learning
GNU Lesser General Public License v3.0
432 stars 129 forks source link

on ubuntu, caffe.pb.h generated by an older version of protoc #8

Closed jonygli closed 7 years ago

jonygli commented 8 years ago
  1. git clone https://github.com/xbpeng/DeepTerrainRL.git
  2. downloaded external(https://github.com/xbpeng/DeepTerrainRL/releases/download/v1.0/TerrainRL-external-Linux.tar.gz) and extract it into DeepTerrainRL
  3. premake4 gmake
  4. make, with this error
xbpeng commented 8 years ago

the pb.* files are likely out of date. Make sure to merge the caffe changes in caffe_mods/ then rebuild the pb.* files.

jonygli commented 8 years ago
  1. after merging caffe_mods/, rebuild caffe, pb.* is regenerated but it has other errors
  2. anyway, go back to DeepTerrainRL and make, it reported hdf5.h not exists, then, I renamed 4rdparty to 3rdparty, it still has other errors

so, it seems it even can't compile and build on ubuntu...

xbpeng commented 8 years ago

It should build on ubuntu, what errors are you getting?

Neo-X commented 8 years ago

I use this software on Ubuntu exclusively. You can build it on Ubuntu. Can you be more specific about your errors?

jonygli commented 8 years ago

I mainly work on windows, sorry if i missed something. I retried it by the following steps:

  1. ubuntu 16, cd(change dir to home)
  2. ~$ git clone https://github.com/xbpeng/DeepTerrainRL.git
  3. downloaded external(https://github.com/xbpeng/DeepTerrainRL/releases/download/v1.0/TerrainRL-external-Linux.tar.gz) and extract it into DeepTerrainRL
  4. replace ~/DeepTerrainRL/external/caffe/src/caffe/proto/caffe.proto with ~/DeepTerrainRL/caffe_mods/caffe.proto
  5. replace ~/DeepTerrainRL/external/caffe/src/caffe/layers/memory_data_layer.cpp with ~/DeepTerrainRL/caffe_mods/memory_data_layer.cpp
  6. replace ~/DeepTerrainRL/external/caffe/include/caffe/layers/memory_data_layer.hpp with ~/DeepTerrainRL/caffe_mods/memory_data_layer.hpp
  7. ~/DeepTerrainRL$ premake4 gmake
  8. ~/DeepTerrainRL/external/caffe$ make src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory I suppose this make will cause it regenerate pb.h. If I didn't make caffe, dirrectly make DeepTerrainRL, it will report "caffe.pb.h generated by an older version of protoc "
  9. ~/DeepTerrainRL$ make external/caffe/include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory

then, I checked it in the extracted 'external', it is '4rdparty'! while in the premake4.lua, it is 3rdparty! I renamed it to 3rdparty, make again with the following: ~/DeepTerrainRL$ make external/3rdparty/include/unistd.h:10:16: fatal error: io.h: No such file or directory

it seems the provided 'external' is not the latest?

xbpeng commented 8 years ago

You might need to be a bit careful with the caffe changes, just replacing the files might cause problems since they are probably a bit out of date (especially caffe.proto). You should instead merge the changes with the latest version in caffe. The relevant changes are mostly related to memory_data_layer.

Neo-X commented 8 years ago

re: external/3rdparty/include/unistd.h:10:16: fatal error: io.h: No such file or directory

I seem to have this file on my system from some other library I installed.

It seems that for hdf5 you should no be using the files in the include folder. You should install these libraries using apt-get as instructed in the readme. Most of the 3rdPartyLibraries are not used on Linxus in the folder. THey are installed.

jonygli commented 8 years ago
  1. I didn't mention that I indeed had installed hdf5. I have hdf5.h at /usr/include/hdf5/mpich, /usr/include/hdf5/openmpi, /usr/include/hdf5/serial
  2. I modifed premake4.lua accordingly by adding /usr/include/hdf5/serial in the includedir
  3. make again and it reported link error with "can't find -lGL", etc.
  4. I indeed apt-get installed libgl1-mesa-dev, etc.
xbpeng commented 8 years ago

any luck figuring out that error?

jonygli commented 8 years ago

not yet, I guess premake4.lua needs some update.

xiaoiker commented 7 years ago

Do you make this successfully? where is the MakeFile files?

jonygli commented 7 years ago

no, I haven't made it successfully. premake4 can generate makefile.

xiaoiker commented 7 years ago

@jonygli I almost meet the same questions you met, I don't know how to do, do you have any suggestion?