Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Build Error #9

Open
munkarkin96 opened this issue Apr 22, 2017 · 5 comments
Open

Build Error #9

munkarkin96 opened this issue Apr 22, 2017 · 5 comments

Comments

@munkarkin96
Copy link

OS: Ubuntu 14.04.5 LTS on Odroid XU4
OpenCV version 3.1.0

Error message:

/home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' /home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::String::allocate(unsigned int)'
/home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::String::deallocate()' /home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::findHomography(cv::InputArray const&, cv::InputArray const&, int, double, cv::OutputArray const&, int, double)'
/home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' collect2: error: ld returned 1 exit status make[2]: *** [/home/odroid/catkin_ws/devel/lib/aprilslam/detector_node] Error 1 make[1]: *** [aprilslam/aprilslam/CMakeFiles/detector_node.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::line(cv::InputOutputArray const&, cv::Point, cv::Point
, cv::Scalar
const&, int, int, int)'
/home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::String::allocate(unsigned int)' /home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::String::deallocate()'
/home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::findHomography(cv::_InputArray const&, cv::_InputArray const&, int, double, cv::_OutputArray const&, int, double)' /home/odroid/catkin_ws/devel/lib/libapriltag_mit.so: undefined reference to cv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar, int, int, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/odroid/catkin_ws/devel/lib/aprilslam/mapper_node] Error 1
make[1]: *** [aprilslam/aprilslam/CMakeFiles/mapper_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

Please advice, thanks.

@mhkabir
Copy link
Member

mhkabir commented Apr 22, 2017

Looks like we need updates for the OpenCV 3 API. Please send in a pull request if you fix it. Thanks!

@suljaxm
Copy link

suljaxm commented Oct 17, 2017

OS: Ubuntu 16.04 LTS
OpenCV version 3.2.0
My build is error too. The Error message:
[ 30%] Building CXX object gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o
In file included from /usr/include/boost/serialization/set.hpp:26:0,
from /home/yjx/3rdparty/gtsam-3.2.1/gtsam/base/FastSet.h:30,
from /home/yjx/3rdparty/gtsam-3.2.1/gtsam/inference/Ordering.h:24,
from /home/yjx/3rdparty/gtsam-3.2.1/gtsam/inference/Ordering.cpp:23:
/usr/include/boost/serialization/detail/stack_constructor.hpp: In constructor ‘boost::serialization::detail::stack_construct<Archive, T>::stack_construct(Archive&, unsigned int)’:
/usr/include/boost/serialization/detail/stack_constructor.hpp:54:9: error: ‘load_construct_data_adl’ is not a member of ‘boost::serialization’
boost::serialization::load_construct_data_adl(
^
gtsam/CMakeFiles/gtsam.dir/build.make:974: recipe for target 'gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o' failed
make[2]: *** [gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o] Error 1
CMakeFiles/Makefile2:719: recipe for target 'gtsam/CMakeFiles/gtsam.dir/all' failed
make[1]: *** [gtsam/CMakeFiles/gtsam.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Please advice, thanks. orz

@yiyeli2020
Copy link

OS: Ubuntu 16.04 LTS
OpenCV version 3.1.1
My build is error too. The Error message:
[ 28%] Building CXX object gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o
In file included from /usr/include/boost/serialization/set.hpp:26:0,
from /home/liyiye/deps/gtsam-3.2.1/gtsam/base/FastSet.h:30,
from /home/liyiye/deps/gtsam-3.2.1/gtsam/inference/Ordering.h:24,
from /home/liyiye/deps/gtsam-3.2.1/gtsam/inference/Ordering.cpp:23:
/usr/include/boost/serialization/detail/stack_constructor.hpp: In constructor ‘boost::serialization::detail::stack_construct<Archive, T>::stack_construct(Archive&, unsigned int)’:
/usr/include/boost/serialization/detail/stack_constructor.hpp:54:9: error: ‘load_construct_data_adl’ is not a member of ‘boost::serialization’
boost::serialization::load_construct_data_adl(
^
gtsam/CMakeFiles/gtsam.dir/build.make:926: recipe for target 'gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o' failed
make[2]: *** [gtsam/CMakeFiles/gtsam.dir/inference/Ordering.cpp.o] Error 1
CMakeFiles/Makefile2:719: recipe for target 'gtsam/CMakeFiles/gtsam.dir/all' failed
make[1]: *** [gtsam/CMakeFiles/gtsam.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Please advice, thanks a lot!

@StiphyJay
Copy link

OS: Ubuntu 16.04.5 LTS on Odroid XU4
OpenCV version 3.2.0

Error message:
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp: In constructor ‘aprilslam::Mapper::Mapper(double, int)’:
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:17:73: error: no matching function for call to ‘gtsam::noiseModel::Diagonal::Sigmas(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’
(Vector(6) << Vector3::Constant(0.20), Vector3::Constant(0.1)))),
^
In file included from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:24:0,
from /usr/local/include/gtsam/nonlinear/NonlinearFactorGraph.h:25,
from /usr/local/include/gtsam/nonlinear/ISAM2.h:22,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/include/aprilslam/mapper.h:6,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:1:
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: candidate: static gtsam::noiseModel::Diagonal::shared_ptr gtsam::noiseModel::Diagonal::Sigmas(const Vector&, bool)
static shared_ptr Sigmas(const Vector& sigmas, bool smart = true);
^
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:19:74: error: no matching function for call to ‘gtsam::noiseModel::Diagonal::Sigmas(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’
(Vector(6) << Vector3::Constant(0.10), Vector3::Constant(0.05)))) {}
^
In file included from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:24:0,
from /usr/local/include/gtsam/nonlinear/NonlinearFactorGraph.h:25,
from /usr/local/include/gtsam/nonlinear/ISAM2.h:22,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/include/aprilslam/mapper.h:6,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:1:
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: candidate: static gtsam::noiseModel::Diagonal::shared_ptr gtsam::noiseModel::Diagonal::Sigmas(const Vector&, bool)
static shared_ptr Sigmas(const Vector& sigmas, bool smart = true);
^
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’
aprilslam/aprilslam/CMakeFiles/aprilslam.dir/build.make:62: recipe for target 'aprilslam/aprilslam/CMakeFiles/aprilslam.dir/src/mapper/mapper.cpp.o' failed
make[2]: *** [aprilslam/aprilslam/CMakeFiles/aprilslam.dir/src/mapper/mapper.cpp.o] Error 1
CMakeFiles/Makefile2:596: recipe for target 'aprilslam/aprilslam/CMakeFiles/aprilslam.dir/all' failed
make[1]: *** [aprilslam/aprilslam/CMakeFiles/aprilslam.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Please advice, thanks.

@nudtxiong
Copy link

OS: Ubuntu 16.04.5 LTS on Odroid XU4
OpenCV version 3.2.0

Error message:
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp: In constructor ‘aprilslam::Mapper::Mapper(double, int)’:
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:17:73: error: no matching function for call to ‘gtsam::noiseModel::Diagonal::Sigmas(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’
(Vector(6) << Vector3::Constant(0.20), Vector3::Constant(0.1)))),
^
In file included from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:24:0,
from /usr/local/include/gtsam/nonlinear/NonlinearFactorGraph.h:25,
from /usr/local/include/gtsam/nonlinear/ISAM2.h:22,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/include/aprilslam/mapper.h:6,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:1:
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: candidate: static gtsam::noiseModel::Diagonal::shared_ptr gtsam::noiseModel::Diagonal::Sigmas(const Vector&, bool)
static shared_ptr Sigmas(const Vector& sigmas, bool smart = true);
^
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’
/home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:19:74: error: no matching function for call to ‘gtsam::noiseModel::Diagonal::Sigmas(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’
(Vector(6) << Vector3::Constant(0.10), Vector3::Constant(0.05)))) {}
^
In file included from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:24:0,
from /usr/local/include/gtsam/nonlinear/NonlinearFactorGraph.h:25,
from /usr/local/include/gtsam/nonlinear/ISAM2.h:22,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/include/aprilslam/mapper.h:6,
from /home/sifan/catkin_ws/src/aprilslam/aprilslam/src/mapper/mapper.cpp:1:
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: candidate: static gtsam::noiseModel::Diagonal::shared_ptr gtsam::noiseModel::Diagonal::Sigmas(const Vector&, bool)
static shared_ptr Sigmas(const Vector& sigmas, bool smart = true);
^
/usr/local/include/gtsam/linear/NoiseModel.h:297:25: note: no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’
aprilslam/aprilslam/CMakeFiles/aprilslam.dir/build.make:62: recipe for target 'aprilslam/aprilslam/CMakeFiles/aprilslam.dir/src/mapper/mapper.cpp.o' failed
make[2]: *** [aprilslam/aprilslam/CMakeFiles/aprilslam.dir/src/mapper/mapper.cpp.o] Error 1
CMakeFiles/Makefile2:596: recipe for target 'aprilslam/aprilslam/CMakeFiles/aprilslam.dir/all' failed
make[1]: *** [aprilslam/aprilslam/CMakeFiles/aprilslam.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Please advice, thanks.

revise mapper.cpp

/Mapper::Mapper(double relinearize_thresh, int relinearize_skip)
: init_(false),
params_(ISAM2GaussNewtonParams(), relinearize_thresh, relinearize_skip),
isam2_(params_),
tag_noise_(noiseModel::Diagonal::Sigmas(
(Vector(6) << Vector3::Constant(0.20), Vector3::Constant(0.1)))),
small_noise_(noiseModel::Diagonal::Sigmas(
(Vector(6) << Vector3::Constant(0.10), Vector3::Constant(0.05)))){
}
/

Mapper::Mapper(double relinearize_thresh, int relinearize_skip)
: init_(false),
params_(ISAM2GaussNewtonParams(), relinearize_thresh, relinearize_skip),
isam2_(params_){
Vector tag_noise_vector(6);
tag_noise_vector << 0.2,0.2,0.2,0.1,0.1,0.1;
Vector small_noise_vector(6);
small_noise_vector << 0.1,0.1,0.1,0.05,0.05,0.05;
tag_noise_=noiseModel::Diagonal::Sigmas(tag_noise_vector);
small_noise_=noiseModel::Diagonal::Sigmas(small_noise_vector);
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants