Closed hyx007 closed 6 years ago
Interesting! Could you run the demonstration once you have everything built before doing any modifications? And once you have it built, does rebuilding with catkin build before doing any further modifications produce the same error? I am wondering why that would result in a GTSAM related error though. We are using catkin_tools as they are convenient and simple to setup and use.
Hi, @rdube ,thanks for reply,I have tried compile segmatch on another computer ubuntu16.04, after modified the codes,it works ok.Maybe there's some plobem about my ubuntu system. Thanks a lot!
Hi, I'm using ubuntu16.04 kinetic, I had compiled this package successfully,but when I modified the code that I'm sure it is right, for example, actually, I just add
LOG(WARNING) << "predicted_matches size:"<<predicted_matches.size()<<".";
to segmatch_worker.cpp 125 line, then I run catkin build in the terminal, I got the error:Errors << laser_mapper:make /home/nv/test_ws/logs/laser_mapper/build.make.007.log /home/nv/test_ws/devel/lib/liblaser_slam.so: undefined reference to
gtsam::Marginals::Marginals(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, gtsam::Marginals::Factorization, boost::optional<gtsam::Ordering const&>)' /home/nv/test_ws/devel/lib/liblaser_slam.so: undefined reference togtsam::ISAM2::update(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, gtsam::FastVector<unsigned long> const&, boost::optional<gtsam::FastMap<unsigned long, int> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, bool)' collect2: error: ld returned 1 exit status make[2]: *** [/home/nv/test_ws/devel/lib/laser_mapper/laser_mapper_node] Error 1 make[1]: *** [CMakeFiles/laser_mapper_node.dir/all] Error 2 make: *** [all] Error 2 cd /home/nv/test_ws/build/laser_mapper; catkin build --get-env laser_mapper | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - ........................................................................................................................... Failed << laser_mapper:make [ Exited with code 2 ] Failed <<< laser_mapper [ 5.3 seconds ] [build] Summary: 30 of 31 packages succeeded. [build] Ignored: 2 packages were skipped or are blacklisted. [build] Warnings: 3 packages succeeded with warnings. [build] Abandoned: None. [build] Failed: 1 packages failed. [build] Runtime: 9.8 seconds total.
And I have tried to remove the code that added by myself, this error still exists. But when I delete the .catkin_tools, logs, devel, build ,floder the runcatkin config --merge-devel
andcatkin build
, It can be compiled successfully, but it really would take too long time, almost several hours. I'm new to catkin build, do you have any suggestion about this problem? By the way, why do you choose catkin build not catkin_make?