Linking error with protobuf 3.7 while building gazebo 7 on ubuntu 16.04

asked 2019-07-03 07:37:18 -0600

Rishabh6900 gravatar image

I am trying to install gazebo 7 from source on ubuntu 16.04 and while compiling it gives error regarding “undefined reference” to 'google::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream*, char)'

Specifically speaking i get the following error:-

CMakeFiles/gazebomsgs_out.dir/generator/GazeboGenerator.cc.o: In function google::protobuf::compiler::cpp::GazeboGenerator::~GazeboGenerator()': /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:38: undefined reference togoogle::protobuf::compiler::CodeGenerator::~CodeGenerator()' CMakeFiles/gazebomsgs_out.dir/generator/GazeboGenerator.cc.o: In function google::protobuf::compiler::cpp::GazeboGenerator::Generate(google::protobuf::FileDescriptor const, std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::compiler::GeneratorContext, std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >) const': /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:55: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:55: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:65: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:65: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:76: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:76: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:89: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:89: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:106: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:106: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:123: undefined reference togoogle::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream, char)' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:123: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:55: undefined reference togoogle::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:65: undefined reference to google::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:76: undefined reference togoogle::protobuf::io::Printer::~Printer()' /home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:89: undefined reference to google::protobuf::io::Printer::~Printer()' CMakeFiles/gazebomsgs_out.dir/generator/GazeboGenerator.cc.o:/home/deadmanlogan/i_am_from_source/gazebo_7/gazebo/msgs/generator/GazeboGenerator.cc:106: more undefined references togoogle::protobuf::io::Printer::~Printer()' follow CMakeFiles/gazebomsgs_out.dir/generator/GazeboGenerator.cc.o: In function google::protobuf::compiler::CodeGenerator::CodeGenerator()': /usr/local/include/google/protobuf/compiler/code_generator.h:68: undefined reference tovtable for google::protobuf::compiler::CodeGenerator' CMakeFiles/gazebomsgs_out.dir/generator/GazeboGenerator.cc.o: In function google::protobuf::io::Printer::PrintInternal(std::map ... (more)

edit retag flag offensive close merge delete