Closed DoctorXK closed 2 years ago
Hi there, thanks for your interest in our work. Seems that the isue is on building Voxblox, which is an off-the-shelf module we used. Can you try if you can build the standalone Voxblox?
Also for your reference, my protobuf version is 3.0.0
Dear author, thanks for your reply. It seems that the protobuf 3.0.0 is not compatible with python 3.7 which is the python version you require in Installation Guide.
As I use conda install libprotobuf==3.0.0
, the installation output is:
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- protobuf==3.0.0 -> python[version='2.7.*|3.4.*|3.5.*']
Your python: python=3.7
Is there any conflicts in your version?
Oh I see. So I was either building with conda env deactivated (where I have python 2.7 and protobuf 3.0.0) or in the conda env (with python 3.7 and protobuf 3.19.0). Sorry for the confusion.
Oh I see. So I was either building with conda env deactivated (where I have python 2.7 and protobuf 3.0.0) or in the conda env (with python 3.7 and protobuf 3.19.0). Sorry for the confusion.
Oh, I try with protobuf 3.19 and it says my protobuf version is too high:
______________________________________________________________________________________________________________________________________________________________
Errors << voxblox:make /opt/ros/melodic/logs/voxblox/build.make.034.log
In file included from /opt/ros/melodic/src/Interactive-Scene-Reconstruction/mapping/voxblox-plusplus/voxblox/voxblox/include/voxblox/core/block.h:9:0,
from /opt/ros/melodic/src/Interactive-Scene-Reconstruction/mapping/voxblox-plusplus/voxblox/voxblox/src/core/block.cc:1:
/opt/ros/melodic/build/voxblox/./Block.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^~~~~
/opt/ros/melodic/build/voxblox/./Block.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^~~~~
/opt/ros/melodic/build/voxblox/./Block.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^~~~~
In file included from /opt/ros/melodic/src/Interactive-Scene-Reconstruction/mapping/voxblox-plusplus/voxblox/voxblox/include/voxblox/core/layer.h:9:0,
from /opt/ros/melodic/src/Interactive-Scene-Reconstruction/mapping/voxblox-plusplus/voxblox/voxblox/include/voxblox/alignment/icp.h:49,
from /opt/ros/melodic/src/Interactive-Scene-Reconstruction/mapping/voxblox-plusplus/voxblox/voxblox/src/alignment/icp.cc:43:
/opt/ros/melodic/build/voxblox/./Block.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^~~~~
/opt/ros/melodic/build/voxblox/./Block.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^~~~~
/opt/ros/melodic/build/voxblox/./Block.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^~~~~
I think it is very weird( laugh cry ). Maybe I should first try to build the standalone Voxblox as you suggest?
Then I copy the libprotobuf google directory to voxblox directory by using
cp -r /miniconda/pkgs/libprotobuf-3.13.0.1-hd408876_0/include/google /opt/ros/melodic/build/voxblox
As you copied the header of protobuf (3.13) to your voxblox root directory, did you remove it after installing the latest version (3.19)?
Then I copy the libprotobuf google directory to voxblox directory by using
cp -r /miniconda/pkgs/libprotobuf-3.13.0.1-hd408876_0/include/google /opt/ros/melodic/build/voxblox
As you copied the header of protobuf (3.13) to your voxblox root directory, did you remove it after installing the latest version (3.19)?
Oh yes I did. I remove /build/voxblox/google
every time before I copy a different version into /build/voxblox/
directory. When I copy protobuf 3.17.0 I will get:
...
/opt/ros/melodic/devel/lib/libvoxblox_proto.so: undefined reference to google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/opt/ros/melodic/devel/lib/libvoxblox_proto.so: undefined reference to google::protobuf::internal::VarintParseSlow64(char const*, unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [/opt/ros/melodic/devel/lib/voxblox/tsdf_to_esdf] Error 1
make[1]: *** [CMakeFiles/tsdf_to_esdf.dir/all] Error 2
make: *** [all] Error 2
cd /opt/ros/melodic/build/voxblox; catkin build --get-env voxblox | catkin env -si /usr/bin/make --jobserver-fds=3,4 -j; cd -
Seems that there are a few related issues in the Voxblox repo, such as this. While
we used an outdated fork of Voxblox, you can still try using the new dependency protobuf_catkin
they provide.
OK, thanks @hmz-15 @TooSchoolForCool , I will try using the new dependency and see if it works. Sorry for didn't get back to this soon :)
Hi dear authors,
I add protobuf include path into the CPLUS_INCLUDE_PATH
in ~/.bashrc
,
and add add protobuf lib path into the LIBRARY_PATH
in ~/.bashrc
.
Retry building and finally get:
[build] Summary: All 21 packages succeeded!
[build] Ignored: 17 packages were skipped or are skiplisted.
[build] Warnings: 4 packages succeeded with warnings.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 4 minutes and 4.4 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
Seems that it complie successfully! :)
@DoctorXK ,which protobuf version you installed. I also tried to install protobuf_catkin
, when I recomplied, it showed same errors, libvoxblox_proto.so: undefined reference to google::protobuf::internal::***
@yinloonga 3.17.0. Maybe you can try add protobuf lib path into the LIBRARY_PATH and LD_LIBRARY_PATH in ~/.bashrc.
well, thank you! I just recompiled the protobuf_catkin package, but your idea is good, I followed your tips and added some Infos to ~/.zshrc
.
By the way, my protobuf version is different from yours. But the idea is same.
Dear author,
I am trying to build panoptic_mapping_pipeline by using
catkin build panoptic_mapping_pipeline -j2
,but encounter:
while the output of
protoc --version
islibprotoc 3.13.0
. Then I copy the libprotobuf google directory to voxblox directory by usingcp -r /miniconda/pkgs/libprotobuf-3.13.0.1-hd408876_0/include/google /opt/ros/melodic/build/voxblox
and build panoptic_mapping_pipeline again, then I face:
That says my protobuf version is too low, then I try with protobuf 3.16.0 also with the result of too low and try with protobuf 3.18.0 with the result of too high. Obviously there only remainds protobuf 3.17.0 to be chosen, so I try with protobuf 3.17.0 and it outputs a new error:
So I am confused about which version of protobuf should I use. Or is there any other reason that cause the problem?
Looking forward to your reply.