Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Issue in building rmf_demo_ws #40

Closed
prashantking opened this issue Mar 19, 2020 · 9 comments
Closed

Issue in building rmf_demo_ws #40

prashantking opened this issue Mar 19, 2020 · 9 comments

Comments

@prashantking
Copy link

I faced two errors while buidling the rmf_demo_ws with colcon build

  1. /usr/include/ignition/msgs1/ignition/msgs/color.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
  2. /usr/include/ignition/msgs1/ignition/msgs/world_modify.pb.h:274:93: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::GetNoArena(const string*) const’
    return world_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());

what needs to be done to solve it ? For detailed error info i am attaching logs.
log.txt

@aaronchongth
Copy link
Collaborator

This is probably due to an already existing installation of protobuf and its compiler, it looks like this might be a similar issue to this, https://answers.gazebosim.org//question/20101/protobuf-version-error-on-ubuntu-1804-and-gazebo9/

Could you provide some information about your system installation of protobuf?

dpkg -l | grep gazebo9
dpkg -l | grep protobuf

@prashantking
Copy link
Author

prashantking commented Mar 19, 2020

attaching two log files with the outputs of above commands
gazebo9_info.txt
protobuf_info.txt

dpkg -l | grep gazebo9

ii  gazebo9                   9.12.0-1~bionic                                  amd64        Open Source Robotics Simulator
ii  gazebo9-common            9.12.0-1~bionic                                  all          Open Source Robotics Simulator - Shared files
ii  gazebo9-dbg               9.12.0-1~bionic                                  amd64        Open Source Robotics Simulator - Debugging Symbols
ii  gazebo9-doc               9.12.0-1~bionic                                  all          Open Source Robotics Simulator - Documentation
ii  gazebo9-plugin-base       9.12.0-1~bionic                                  amd64        Open Source Robotics Simulator - base plug-ins
ii  libgazebo9:amd64          9.12.0-1~bionic                                  amd64        Open Source Robotics Simulator - shared library
ii  libgazebo9-dev:amd64      9.12.0-1~bionic                                  amd64        Open Source Robotics Simulator - Development Files
dpkg -l | grep protobuf

ii  libprotobuf-dev:amd64          3.0.0-9.1ubuntu1                    amd64        protocol buffers C++ library (development files)
ii  libprotobuf-lite10:amd64       3.0.0-9.1ubuntu1                    amd64        protocol buffers C++ library (lite version)
ii  libprotobuf10:amd64            3.0.0-9.1ubuntu1                    amd64        protocol buffers C++ library
ii  protobuf-compiler              3.0.0-9.1ubuntu1                    amd64        compiler for protocol buffer definition files
ii  python3-protobuf               3.0.0-9.1ubuntu1                    amd64        Python 3 bindings for protocol buffers

@aaronchongth
Copy link
Collaborator

that looks alright to me. did your system already have an installation of gazebo9? or was it installed using the rosdep step mentioned in the documentation?

@prashantking
Copy link
Author

I have a default gazebo installation from

sudo apt-get install ros-melodic-desktop-full

other than this i tried google cartographer which shows protobuf from source as 3.4.0.

$ export PATH=/usr/local/bin:$PATH
$ protoc --version
libprotoc 3.4.0

can this create any issue ?

@aaronchongth
Copy link
Collaborator

looks like you found the problem, it is also referenced in this issue in the past too.

looks like this might be what you need, https://stackoverflow.com/questions/35896335/how-can-i-uninstall-protobuf-3-0-0

@prashantking
Copy link
Author

rmf_demo needs 3.4.0 version or 3.0.0 version of protoc. ?
since cartographer needs 3.4.0 and default is 3.0.0 which one i should remove ?

@Yadunund
Copy link
Member

This is an issue that has come up before #21. Gazebo9 requires protobuf 3.0.0 while cartographer installs 3.4.0. Could you try removing 3.4.0 and confirm if that resolves the issue?

@cnboonhan
Copy link
Contributor

cnboonhan commented Mar 20, 2020

Hi, just sneaking in this link which might help.

it is for protobuf 3.0.0 but it hopefully works for removing protobuf 3.4.0, which is what we want

https://stackoverflow.com/questions/35896335/how-can-i-uninstall-protobuf-3-0-0

We should change the protobuf version in that thread to 3.4.0.

@prashantking
Copy link
Author

hi, its working now i tried few of the approaches and it worked with this:
go to build directory of protobuf 3.4.0
and then run this command

$ cd build
$ sudo cat install_manifest.txt | sudo xargs rm

and after this when you compile rmf_demo it works fine.
although i doubt that cartographer is going to work after this but that can be solved by building protbuf3.4.0 locally in a workspace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants