KumarRobotics / flea3

ROS driver for flea3/grasshopper3 camera
21 stars 34 forks source link

cannot build #13

Closed lbxxdi closed 7 years ago

lbxxdi commented 7 years ago

i run catkin_make and have this error

Linking CXX executable /home/hgr/catkin_ws/devel/lib/flea3/flea3_async_trigger
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error const&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `vtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::numpunct<char> const& std::use_facet<std::__cxx11::numpunct<char> >(std::locale const&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::out_of_range::out_of_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long, char)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned long) const@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::logic_error::logic_error(std::logic_error const&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@GLIBCXX_3.4.21'
/home/hgr/catkin_ws/src/flea3/flycapture/lib/libflycapture.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
versatran01 commented 7 years ago

Try this maybe

https://github.com/BVLC/caffe/issues/4949

KonstantineMushegian-TRI commented 7 years ago

I ran into the same issue, set the following in CMakeLists.txt in flea3 package add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) but still running into the same errors.

This only happens on one system, building with no issues on the other ones. The only obvious difference seems to be the gcc version:

Builds fine gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Does NOT build gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4

Anyone, run into a similar or same issue?