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

What Version of Protobuf are we using? (Apple Silicon, native source code install) #561

Closed
woensug-choi opened this issue Jun 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@woensug-choi
Copy link

woensug-choi commented Jun 18, 2024

Environment

  • OS Version: MacOS Sonoma, Applesilicon
  • Latest ROS2 Source Code building

Description

  • Expected behavior: Compile success
  • Actual behavior:

Steps to reproduce

  • Mac Sonoma with Jazzy ROS2 (source code) and Gazebo Garden (using brew, of course with gz-msg, gz-transport etc along with it with brew)
  • I've tried with protobuf@3 of brew, which is 3.20.3 according to protoc --version

Output

In file included from /Users/woensug/ros_gz_ws/src/ros_gz_for_mac/ros_gz_sim/test/test_create.cpp:17:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/entity_factory.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/entity_factory.pb.h:32:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/light.pb.h:12:
/opt/homebrew/include/gz/msgs10/gz/msgs/details/light.pb.h:16:2: error: "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ gencode is built with an incompatible version of"
 ^
/opt/homebrew/include/gz/msgs10/gz/msgs/details/light.pb.h:17:2: error: "Protobuf C++ headers/runtime. See"
#error "Protobuf C++ headers/runtime. See"
 ^
/opt/homebrew/include/gz/msgs10/gz/msgs/details/light.pb.h:18:2: error: "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
 ^
In file included from /Users/woensug/ros_gz_ws/src/ros_gz_for_mac/ros_gz_sim/test/test_create.cpp:17:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/entity_factory.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/entity_factory.pb.h:32:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/light.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/light.pb.h:33:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/pose.pb.h:12:
/opt/homebrew/include/gz/msgs10/gz/msgs/details/pose.pb.h:16:2: error: "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ gencode is built with an incompatible version of"
 ^
/opt/homebrew/include/gz/msgs10/gz/msgs/details/pose.pb.h:17:2: error: "Protobuf C++ headers/runtime. See"
#error "Protobuf C++ headers/runtime. See"
 ^
/opt/homebrew/include/gz/msgs10/gz/msgs/details/pose.pb.h:18:2: error: "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
 ^
In file included from /Users/woensug/ros_gz_ws/src/ros_gz_for_mac/ros_gz_sim/test/test_create.cpp:17:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/entity_factory.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/entity_factory.pb.h:32:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/light.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/light.pb.h:33:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/pose.pb.h:12:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/details/pose.pb.h:31:
In file included from /opt/homebrew/include/gz/msgs10/gz/msgs/vector3d.pb.h:12:
/opt/homebrew/include/gz/msgs10/gz/msgs/details/vector3d.pb.h:16:2: error: "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ gencode is built with an incompatible version of"
 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [CMakeFiles/test_create.dir/build.make:76: CMakeFiles/test_create.dir/test/test_create.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:381: CMakeFiles/test_create.dir/all] Error 2
20 errors generated.
gmake[2]: *** [CMakeFiles/create.dir/build.make:76: CMakeFiles/create.dir/src/create.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:248: CMakeFiles/create.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< ros_gz_sim [9.45s, exited with code 2]
Aborted  <<< ros_gz_interfaces [14.6s] 
@woensug-choi woensug-choi added the bug Something isn't working label Jun 18, 2024
@woensug-choi woensug-choi changed the title What Version of Protobuf are we using? What Version of Protobuf are we using? (Apple Silicon, native source code install) Jun 18, 2024
@woensug-choi
Copy link
Author

Never mind. I bypassed the problem by source compiling the Gazebo Harmonic and use the packages being compiled in the way.

https://github.com/IOES-Lab/ros_gz_for_mac

@github-project-automation github-project-automation bot moved this from Inbox to Done in Core development Jun 18, 2024
@azeey
Copy link
Contributor

azeey commented Jun 18, 2024

We don't pin the protobuf version in the homebrew formula (see https://github.com/osrf/homebrew-simulation/blob/5f50a0c8a72624157fd77357f8803a4b229636b1/Formula/gz-msgs10.rb#L23), but it might be that a new protobuf was released after we built the bottle. The bottles were rebuilt yesterday, so maybe you need to reinstall. Building Gazebo from source like you've done would also work.

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
Archived in project
Development

No branches or pull requests

2 participants