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

But the last step has issues, #141

Open
yanyan-li opened this issue Jun 19, 2017 · 7 comments
Open

But the last step has issues, #141

yanyan-li opened this issue Jun 19, 2017 · 7 comments

Comments

@yanyan-li
Copy link

It's almost done. But the last step has issues now. Can somebody help? I have no ideas about it. Thanks.

[ 84%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/KeyFrameDatabase.cc.o
[ 89%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/Sim3Solver.cc.o
[ 94%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/Initializer.cc.o
[100%] Linking CXX executable ../bin/ORB_SLAM
CMakeFiles/ORB_SLAM.dir/src/main.cc.o: In function main': main.cc:(.text.startup+0xbc8): undefined reference to ros::init(int&, char**, std::string const&, unsigned int)'
main.cc:(.text.startup+0xccb): undefined reference to ros::package::getPath(std::string const&)' main.cc:(.text.startup+0xe5c): undefined reference to ros::package::getPath(std::string const&)'
main.cc:(.text.startup+0x13b4): undefined reference to ros::package::getPath(std::string const&)' main.cc:(.text.startup+0x193b): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::CreateInitialMap(cv::Mat&, cv::Mat&)': Tracking.cc:(.text+0x21e4): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
Tracking.cc:(.text+0x229f): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::Run()':
Tracking.cc:(.text+0x2946): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::GrabImage(boost::shared_ptr<sensor_msgs::Image_<std::allocator > const> const&)':
Tracking.cc:(.text+0x4589): undefined reference to cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)' Tracking.cc:(.text+0x5e11): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)': Tracking.cc:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x604): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/LoopClosing.cc.o: In function ORB_SLAM::LoopClosing::CorrectLoop()': LoopClosing.cc:(.text+0x2a47): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/FramePublisher.cc.o: In function ORB_SLAM::FramePublisher::FramePublisher()': FramePublisher.cc:(.text+0x1c3a): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
CMakeFiles/ORB_SLAM.dir/src/MapPublisher.cc.o: In function ORB_SLAM::MapPublisher::MapPublisher(ORB_SLAM::Map*)': MapPublisher.cc:(.text+0xb7e): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/ORB_SLAM.dir/build.make:1645: recipe for target '../bin/ORB_SLAM' failed
make[2]: *** [../bin/ORB_SLAM] Error 1
CMakeFiles/Makefile2:324: recipe for target 'CMakeFiles/ORB_SLAM.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

my OS is Ubuntu16.04. Thanks a lot.

@wangzhaoguang
Copy link

wangzhaoguang commented Jul 22, 2017

Actually I got this too !
The last step for compiling ORB-SLAM on Ubuntu 16.04 installed.
Any hints ?
cheers !!


CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o:in function ‘ORB_SLAM::Tracking::GrabImage(boost::shared_ptr<sensor_msgs::Image_<std::allocator > const> const&)’中:
Tracking.cc:(.text+0x494b):对‘cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator > const> const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’undefined reference.
CMakeFiles/ORB_SLAM.dir/src/FramePublisher.cc.o:in function ‘ORB_SLAM::FramePublisher::PublishFrame()’中:
FramePublisher.cc:(.text+0x24e5):对‘cv_bridge::CvImage::toImageMsg() const’ undefined reference.
collect2: error: ld returned 1 exit status
CMakeFiles/ORB_SLAM.dir/build.make:1567: recipe for target '../bin/ORB_SLAM' failed
make[2]: *** [../bin/ORB_SLAM] # Error 1
CMakeFiles/Makefile2:324: recipe for target 'CMakeFiles/ORB_SLAM.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2


@wangzhaoguang
Copy link

wangzhaoguang commented Jul 23, 2017

hello world,
for the building problem I encountered, I got through via:
see the attached pictures.

cheers.
2017-07-23 15-58-18
2017-07-23 16-00-18

@jtbon20
Copy link

jtbon20 commented Aug 1, 2017

@wangzhaoguang Is there anything else you changed? I deleted Opencv2 as well and it still didn't work

@wangzhaoguang
Copy link

No
i did not change other parts.

@jinchenglee
Copy link

Check your gcc version. I met similar problem in ROS nodes building. Gcc 4.9 has linking problem, but gcc 5.4 works fine.

@whyscience
Copy link

refer to this, solve it for ROS catkin build on Ubuntu 16.04, thanks.

@Debbieliang9
Copy link

Where shall we place the code? @wangzhaoguang Thanks!

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

6 participants