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

[gazebo_ros] Compilation error in test/test_gazebo_ros_init #1361

Closed
goekce opened this issue Mar 6, 2022 · 3 comments
Closed

[gazebo_ros] Compilation error in test/test_gazebo_ros_init #1361

goekce opened this issue Mar 6, 2022 · 3 comments

Comments

@goekce
Copy link

goekce commented Mar 6, 2022

During compilation of gazebo_ros in a chroot for building I get the following error. I do not get the error when I compile on my development environment.

Could this be related to a missing dependency like ament_cmake_gtest? I compile using colcon.

...
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o: in function `GazeboRosInitTest_Commands_Test::~GazeboRosInitTest_Commands_Test()':                                                                              
test_gazebo_ros_init.cpp:(.text._ZN31GazeboRosInitTest_Commands_TestD2Ev[_ZN31GazeboRosInitTest_Commands_TestD5Ev]+0x10): undefined reference to `gazebo::ServerFixture::~ServerFixture()'                                                   
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o: in function `GazeboRosInitTest_Commands_Test::~GazeboRosInitTest_Commands_Test()':                                                                              
test_gazebo_ros_init.cpp:(.text._ZN31GazeboRosInitTest_Commands_TestD0Ev[_ZN31GazeboRosInitTest_Commands_TestD5Ev]+0x14): undefined reference to `gazebo::ServerFixture::~ServerFixture()'                                                   
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o: in function `testing::internal::TestFactoryImpl<GazeboRosInitTest_Commands_Test>::CreateTest()':                                                                
test_gazebo_ros_init.cpp:(.text._ZN7testing8internal15TestFactoryImplI31GazeboRosInitTest_Commands_TestE10CreateTestEv[_ZN7testing8internal15TestFactoryImplI31GazeboRosInitTest_Commands_TestE10CreateTestEv]+0x1e): undefined reference to `gazebo::ServerFixture::ServerFixture()'                                                                                                                                                                                                     
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTI17GazeboRosInitTest[_ZTI17GazeboRosInitTest]+0x10): undefined reference to `typeinfo for gazebo::ServerFixture'                                
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x28): undefined reference to `gazebo::ServerFixture::TearDown()'                                 
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x40): undefined reference to `gazebo::ServerFixture::Unload()'                                   
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x48): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'                                                                                                                                                                                            
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x50): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'                                                                                                                                                                                      
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x58): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'                                                                                                                                   
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV17GazeboRosInitTest[_ZTV17GazeboRosInitTest]+0x60): undefined reference to `gazebo::ServerFixture::LoadArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'                                                                                                                                                                                        
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x28): undefined reference to `gazebo::ServerFixture::TearDown()'     
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x40): undefined reference to `gazebo::ServerFixture::Unload()'       /usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x48): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'                                                                                                                                                                
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x50): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'                                                                                                                                                          
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x58): undefined reference to `gazebo::ServerFixture::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'                                                                                                       
/usr/bin/ld: CMakeFiles/test_gazebo_ros_init.dir/test_gazebo_ros_init.cpp.o:(.data.rel.ro._ZTV31GazeboRosInitTest_Commands_Test[_ZTV31GazeboRosInitTest_Commands_Test]+0x60): undefined reference to `gazebo::ServerFixture::LoadArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'                                                                                                                                                            
collect2: error: ld returned 1 exit status                                                                                                                                                                                                   make[2]: *** [test/CMakeFiles/test_gazebo_ros_init.dir/build.make:210: test/test_gazebo_ros_init] Error 1                                                                                                                                    make[1]: *** [CMakeFiles/Makefile2:650: test/CMakeFiles/test_gazebo_ros_init.dir/all] Error 2
...
@FallenDeity
Copy link

Did you find a solution for this?

@goekce
Copy link
Author

goekce commented Oct 8, 2023

Not really. Currently I use Ubuntu Docker image with precompiled packages on my non-Ubuntu host.

@goekce
Copy link
Author

goekce commented Oct 8, 2023

Given that this issue did not catch significant attention, I would like to close this issue to leave space for more important issues.

@goekce goekce closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants