Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetAllocatedNoArena’; did you mean ‘SetAllocated’? #12548 #3319

Open
kenloumixx opened this issue Apr 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@kenloumixx
Copy link

What version of protobuf and what language are you using?
Version: main/v3.6.0/v3.5.0 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem)
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
C++
What operating system (Linux, Windows, ...) and version?
Linux ubuntu 18.04
What runtime / compiler are you using (e.g., python version or gcc version)
gcc
What did you do?
Steps to reproduce the behavior:

  1. I tried to install gazebo11 with curl -sSL http://get.gazebosim.org | sh
  2. I checked the protoc --version and the terminal output is libprotoc 3.19.4
  3. See error

What did you expect to see
no error
What did you see instead?

/usr/include/gazebo-11/gazebo/msgs/wrench_stamped.pb.h: In member function ‘google::protobuf::UnknownFieldSet* gazebo::msgs::WrenchStamped::mutable_unknown_fields()’:
/usr/include/gazebo-11/gazebo/msgs/wrench_stamped.pb.h:71:54: error: no matching function for call to ‘google::protobuf::internal::InternalMetadata::mutable_unknown_fields()’
   71 |     return _internal_metadata_.mutable_unknown_fields();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h: In member function ‘void gazebo::msgs::WorldModify::set_cloned_uri(const char*, size_t)’:
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h:357:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetNoArena’; did you mean ‘DestroyNoArena’?
  357 |   cloned_uri_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      |               ^~~~~~~~~~
      |               DestroyNoArena
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h: In member function ‘std::string* gazebo::msgs::WorldModify::mutable_cloned_uri()’:
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h:364:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘MutableNoArena’
  364 |   return cloned_uri_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      |                      ^~~~~~~~~~~~~~
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h: In member function ‘std::string* gazebo::msgs::WorldModify::release_cloned_uri()’:
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h:369:22: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ReleaseNoArena’; did you mean ‘ReleaseNonDefault’?
  369 |   return cloned_uri_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      |                      ^~~~~~~~~~~~~~
      |                      ReleaseNonDefault
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h: In member function ‘void gazebo::msgs::WorldModify::set_allocated_cloned_uri(std::string*)’:
/usr/include/gazebo-11/gazebo/msgs/world_modify.pb.h:377:15: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘SetAllocatedNoArena’; did you mean ‘SetAllocated’?
  377 |   cloned_uri_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), cloned_uri);
      |               ^~~~~~~~~~~~~~~~~~~
      |               SetAllocated

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment
I am building gazebo11 in arm64

@kenloumixx kenloumixx added the bug Something isn't working label Apr 25, 2023
@mjcarroll
Copy link
Contributor

The supported version of protobuf is version 3.0.0 in Ubuntu Bionic: https://packages.ubuntu.com/bionic/libprotobuf10

Your chosen version 3.19.x is probably far enough ahead of that that APIs no longer match. The source will need to be updated to use these newer APIs.

As gazebo classic doesn't support anything newer than jammy (with proto version 3.12.4), we don't have any intention of doing these updates.

I would suggest rolling back your proto version to something supported, or make the the changes necessary.

@bmaxdk
Copy link

bmaxdk commented Aug 12, 2023

I had same issue before. Hope this helps

[Troubleshooting]

If gazebo is not launching, try:

$ source /usr/share/gazebo/setup.sh

In .world if you have duplicated name appeared, it may cause open the gazebo. Make sure change duplicated name.

Troubleshooting protocol buffer

Issue appeared when protoc version is not supported to current turtlebot_gazebo setup.First need to check protocol buffer version:

$ protoc --version

if protoc version is higher, try libprotoc 3.6.1:

Download protobuf-cpp-3.6.1.tar.gz in Protocol Buffers v3.6.1

$ tar -xzf protobuf-cpp-3.6.1.tar.gz
$ cd protobuf-3.6.1
# Install Dependencies for prtobuf
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
$ ./autogen.sh

# Compile and install:
$ ./configure
$ make
$ sudo make install
# Update the Shared Libarary Cache:
$ sudo ldconfig

# Varify protoc version
$ protoc --version

Gazebo Installation

Check current Gazebo Version:

$ gazebo --version
Gazebo multi-robot simulator, version 11.13.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Install Gazebo:

Install Gazebo from source on Ubuntu

$ sudo apt-get install gazebo11 libgazebo11-dev

# Locate the Gazebo Config Files.
# Try:
$ sudo find / -name gazebo-config.cmake
$ colcon build --cmake-args -Dgazebo_DIR=/usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake

# Source Gazebo Setup Script
$ sudo find / -name setup.sh | grep gazebo
$ source /path from above/setup.sh

# If you see multiple Gazebo Script such as:
#/usr/share/gazebo-11/setup.sh
#/usr/share/gazebo/setup.sh
# Try gazebo in /usr/share/

# Install gazebo_ros_pkgs for ROS2 foxy/humble
$ sudo apt-get install ros-foxy-gazebo-ros-pkgs
$ source /opt/ros/foxy/setup.bash
$ colcon build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants