udacity / CarND-Capstone

MIT License
189 stars 1.53k forks source link

Please add gcc requirement for native build #105

Closed jinchenglee closed 3 years ago

jinchenglee commented 6 years ago

I'm using Ubuntu 16.04 LTS. Native ROS kinetic install.

gcc4.9 doesn't work for the project build, catkin_make will complain:

[ 92%] Linking CXX executable /work/git_repo/CarND-Capstone/ros/devel/lib/waypoint_follower/pure_pursuit CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o: In function void ros::Publisher::publish<geometry_msgs::TwistStamped_<std::allocator<void> > >(geometry_msgs::TwistStamped_<std::allocator<void> > const&) const': /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:112: undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:112: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o:/opt/ros/kinetic/include/ros/publisher.h:112: more undefined references to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' follow CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o: In functionmain': /work/git_repo/CarND-Capstone/ros/src/waypoint_follower/src/pure_pursuit.cpp:41: undefined reference to ros::init(int&, char**, std::string const&, unsigned int)' /work/git_repo/CarND-Capstone/ros/src/waypoint_follower/src/pure_pursuit.cpp:43: undefined reference toros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less, std::allocator<std::pair<std::string const, std::string> > > const&)' ...

Switching to gcc5.4.1, works fine. Got clue from comments here: https://answers.ros.org/question/234322/linker-error-on-ros-kinetic-ubuntu-1604/

UAnjali commented 3 years ago

Hi @jinchenglee, Though we are a little late to respond, we encourage such user-specific issues to be raised on the Knowledge hub, so that our experienced mentors can chime in and new students can also learn from the discussion thread. Thank you