ROS Lunar on Ubuntu 17.10, camera_info_manager build issue [closed]

asked 2018-02-23 10:27:49 -0600

221Bytes gravatar image

updated 2018-02-23 10:32:21 -0600

gvdhoorn gravatar image

Hello everybody ! I am trying to install ros lunar on my ubuntu 17.10 by building it from source. I want to do some AI for controlling a drone, but first I wanna try in a nice simulation. So I wanna use ros + gazebo. I am using this answer as a reference

https://answers.ros.org/question/2770...

Using Docker with this
dockerfile https://gist.github.com/gavanderhoorn... I could have the build done but it failed badly on my machine :

[ 50%] Built target camera_info_manager
[ 75%] Linking CXX executable /home/alex/Project/ros/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `check_url_substitution(ros::NodeHandle, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
unit_test.cpp:(.text+0xbf4): undefined reference to `testing::internal::PrintStringTo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::ostream*)'
unit_test.cpp:(.text+0xdf8): undefined reference to `testing::internal::PrintStringTo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::ostream*)'
unit_test.cpp:(.text+0xffa): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `CameraName_validNames_Test::TestBody()':
unit_test.cpp:(.text+0x1ac9): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
unit_test.cpp:(.text+0x1b61): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
unit_test.cpp:(.text+0x1bf9): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
unit_test.cpp:(.text+0x1c91): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
unit_test.cpp:(.text+0x1d29): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o:unit_test.cpp:(.text+0x1dc1): more undefined references to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)' follow
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `compare_calibration(sensor_msgs::CameraInfo_<std::allocator<void> > const&, sensor_msgs::CameraInfo_<std::allocator<void> > const&)':
unit_test.cpp:(.text+0x7964): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
unit_test.cpp:(.text+0x7a41): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
unit_test.cpp:(.text+0x7b6c): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by 221Bytes
close date 2018-02-25 16:01:59.700963

Comments

I could have the build done but it failed badly on my machine

are you saying that the Docker build succeeded, but building it on the host (so not using Docker) failed?

gvdhoorn gravatar image gvdhoorn  ( 2018-02-23 11:07:13 -0600 )edit

Exactly :) Docker worked as expected but on my machine I got the errors I posted above.

221Bytes gravatar image 221Bytes  ( 2018-02-23 11:12:22 -0600 )edit

Seeing the cxx11 mentioned makes me think of C++11/C++SomethingElse linking issues (but it's really just a guess). Is this the only linker error you run into? Have you upgraded the compiler on the host?

gvdhoorn gravatar image gvdhoorn  ( 2018-02-23 11:18:53 -0600 )edit

Yes that's the only one and I remember upgrading my compiler for compiling nvidia drivers.I am using gcc-7 and g++-7 and I just tried with gcc-5 and g++5 but noting different appears.

221Bytes gravatar image 221Bytes  ( 2018-02-23 11:29:58 -0600 )edit

Have you deleted the devel_isolated and the build_isolated after switching compilers? Otherwise it could be reusing objects compiled with the previous compiler which may not work.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-23 11:54:01 -0600 )edit

I am trying that now, which version of the compiler is recommended ?

221Bytes gravatar image 221Bytes  ( 2018-02-23 12:03:46 -0600 )edit

Just to test, I would try to use the same compiler as the Docker image contains.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-23 12:09:13 -0600 )edit

I tried with gcc5 and gcc4.8 (and the g++ equivalent) just more mistakes and earlier in the compilation. Furthermore, I checked the docker image for ubuntu17.10 and it's using gcc7 (the one I was using at first) I feel a bit lost now :/

221Bytes gravatar image 221Bytes  ( 2018-02-23 12:15:19 -0600 )edit