undefined reference to log4cxx

asked 2017-11-06 13:49:21 -0600

RDaneelOlivaw gravatar image

updated 2017-11-06 13:50:48 -0600

Hi ,

I'm compiling ROS source of indigo, with clang3.9 , libc++ and c++11. I compile perfectly until I get to the rosoutpackage. I get this errors:

/home/ubuntu/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.so: undefined reference to `log4cxx::spi::LocationInfo::getMethodName() const'
/home/ubuntu/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.so: undefined reference to `log4cxx::Logger::getLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/home/ubuntu/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.so: undefined reference to `log4cxx::File::File(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/home/ubuntu/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.so: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, log4cxx::spi::LocationInfo const&) const'
/home/ubuntu/ros_catkin_ws/install_isolated/lib/librosconsole_log4cxx.so: undefined reference to `log4cxx::AppenderSkeleton::setOption(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have checked that the library is installed and the simbols are inside. The thing is the library log4cxxseems to be compiled for stdlibc++.

Does anyone have any clue on how to fix this? Is there any susbstitute for log4cxx compatible with libc++?

Thanks a lot in advance

edit retag flag offensive close merge delete