-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
This file was generated by an older version of protoc #625
Comments
This error message should appear when the protobuf compiler version during build time and the protobuf library version during runtime differ. Since, in your case, Gazebo requires protobuf library version 3.4.1, it will be easiest to uninstall all other versions, and fully clean and re-build cartographer(_ros). |
Thanks for the answer. |
The least intrusive solution does not require any changes to system packages.
|
Thanks! It can be the solution. |
Guys? |
I edited @l1va 's script https://gist.github.com/kdaun/51b7d19bbcd5e0798c8415cd093078fb to install Cartographer with a local protobuf install. |
You are right, when cartographer_ros is installed with catkin_make_isolated, it makes perfect sense to install protobuf in ./install_isolated. |
https://github.com/SafeDroneWare/protobuf_catkin provides a catkin integration for protobuf 3.4. I will check on the integration in the Cartographer workspace. |
So I already installed protobuf3 using the install script in the repo (https://github.com/googlecartographer/cartographer/blob/master/scripts/install_proto3.sh) before realizing this would cause the same issue as @l1va found. Could you provide instructions of how to uninstall the system version properly before using the new catkin installer gist? something like ninja uninstall? EDIT:
|
I have the same problem. How do you remove system-wide 3.4.1? I followed your instructions but now my error turns into: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC |
After removing the manually built version, you should reinstall protobuf using your system package manager, instead of rebuilding it again yourself. E.g. |
Is a detailed step-by-step start-to-finish resolution to this issue available? I have tried using kdaun's script https://gist.github.com/kdaun/51b7d19bbcd5e0798c8415cd093078fb but I am still getting this error and am unable to compile cartographer while Protobuf2.6.1 is installed, despite protobuf3.4.1 being in my workspace from the above script. Instructions on what to change would be greatly appreciated! |
The script doesn't work for me either. I also tried to install the protobuf 3.5.1 with a different prefix and then prepend this location to my PATH and LD_LIBRARY_PATH variables. It didn't work either. Cmake variables are pointing to the correct locations, I printed them in the CMakeLists.txt. message("protobuf found: ${PROTOBUF_FOUND}") message("protoc: ${PROTOBUF_PROTOC_LIBRARY}") |
Firstly - to return broken 2.6:
And how to install localy. I do it like that : And after installing cartographer you have to use next command to build after changes in your project:
|
Did anyone figure out a way to use google_cartographer_ros and Gazebo together. I tried kdaun's script but it didn't work for me - fails during I then tried to build I uninstalled Gazebo binaries, installed system protobuf 3, and installed Gazebo from source. However the Gazebo build breaks when I do this. edit: |
@josephcoombe Try Ubuntu 18.04 :-) |
I have worked with @kdaun to improve the installation of a current protobuf3 when installing with ROS. I have compiled some instructions on how to have cartographer and voxblox (which uses the system protobuf) in the same workspace. This is the relevant additon to the CMakeLists.txt. Maybe this would be worth including into the upstream makefile (only for catkin builds, of course)? |
i am confused by the problem ,in my project with protobuf of 2.6.1. After making the so file, when i use it ,there will be such errors:error: if I in the source file, by #if 0 ,to stop version detection,it will be ok. But,i know it is not a good way to solve it. And if if i use the newer version of protobuf, it also the same erro. |
Hello, Is there a script or example for cartographer (without ros) installation. I have installed protobuf 3.4.1 in a manually specified path. And I modify the CMakelist.txt of cartographer according to the answear.
But when
Could you please provide some advice? |
Is this still an issue with newer Ubuntu releases? Because on Ubuntu 18 & 20 there is no need to install a custom Protobuf version for Cartographer, it works totally fine with the protobuf version from the official package archives (installed via apt or rosdep). This is also what is used in the CI Docker script now (change). |
I have updated the compilation instructions. Now it should work fine if you follow the instructions on a clean Ubuntu / ROS: https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html |
For future reference, in case of having to remove cartographer's older system wide protoc/protobuf install, one could check out gazebosim/gazebo-classic#2496 |
Hi!
Running Ubuntu 16.04 and Gazebo7. All works ok but then i installed cartographer-ros.
It installs protoc 3.4.1. Cartographer is built successfully, but my project failed with :
I understand that problem not in cartographer, but i believe you can help. Does cartographer can be build with older protoc? How to remove new and install old protoc? Or maybe any other ways i should check? How to work simultaneously with gazebo and cartographer if they require different protocs?
I tried to install gazebo from source to build it with new protoc, but it failed too.
Many thanks!
The text was updated successfully, but these errors were encountered: