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

libgtsam_unstable.so: undefined reference to `gtsam::Point2::equals(gtsam::Point2 const&, double) const' #4

Open
ywwbehappy opened this issue Mar 13, 2024 · 1 comment

Comments

@ywwbehappy
Copy link

Hello author, thank you very much for opening source codes. We would like to express our sincere respect.

However, when compiling your code, I encountered the following issues:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Point2::equals(gtsam::Point2 const&, double) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot2::rotate(gtsam::Point2 const&, gtsam::OptionalJacobian<2, 1>, gtsam::OptionalJacobian<2, 2>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Ordering::ColamdConstrainedFirst(gtsam::VariableIndex const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, bool)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Point2::norm(gtsam::OptionalJacobian<1, 2>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::rpy() const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::GaussianFactorGraph::optimize(boost::function<std::pair<boost::shared_ptr<gtsam::GaussianConditional>, boost::shared_ptr<gtsam::GaussianFactor> > (gtsam::GaussianFactorGraph const&, gtsam::Ordering const&)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::rotate(gtsam::Point3 const&, gtsam::OptionalJacobian<3, 3>, gtsam::OptionalJacobian<3, 3>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::HessianFactor::HessianFactor(std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > const&, std::vector<Eigen::Matrix<double, -1, 1, 0, -1, 1>, std::allocator<Eigen::Matrix<double, -1, 1, 0, -1, 1> > > const&, double)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Ordering::ColamdConstrainedLast(gtsam::VariableIndex const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, bool)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::distance3(gtsam::Point3 const&, gtsam::Point3 const&, gtsam::OptionalJacobian<1, 3>, gtsam::OptionalJacobian<1, 3>)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot2::relativeBearing(gtsam::Point2 const&, gtsam::OptionalJacobian<1, 2>)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::DiscreteFactorGraph::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::VectorValues::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Point2::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::distance2(gtsam::Point2 const&, gtsam::Point2 const&, gtsam::OptionalJacobian<1, 2>, gtsam::OptionalJacobian<1, 2>)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::EliminateableFactorGraph<gtsam::DiscreteFactorGraph>::eliminateSequential(boost::optional<gtsam::Ordering::OrderingType>, boost::function<std::pair<boost::shared_ptr<gtsam::DiscreteConditional>, boost::shared_ptr<gtsam::DiscreteFactor> > (gtsam::DiscreteFactorGraph const&, gtsam::Ordering const&)> const&, boost::optional<gtsam::VariableIndex const&>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::xyz() const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Pose2::transformFrom(gtsam::Point2 const&, gtsam::OptionalJacobian<2, 3>, gtsam::OptionalJacobian<2, 2>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::JacobianFactor::updateHessian(std::vector<unsigned long, std::allocator<unsigned long> > const&, gtsam::SymmetricBlockMatrix*) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::ISAM2::update(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, std::vector<unsigned long, std::allocator<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)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::RzRyRx(double, double, double)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Point3::equals(gtsam::Point3 const&, double) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::NonlinearFactor::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Factor::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::fpEqual(double, double, double)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::DecisionTreeFactor::apply(gtsam::DecisionTreeFactor const&, boost::function<double (double const&, double const&)>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Values::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::operator*(gtsam::Point3 const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::BayesTree<gtsam::ISAM2Clique>::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::JacobianFactor::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::ISAM2::marginalizeLeaves(gtsam::FastList<unsigned long> const&, boost::optional<std::vector<unsigned long, std::allocator<unsigned long> >&>, boost::optional<std::vector<unsigned long, std::allocator<unsigned long> >&>)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::NoiseModelFactor::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (unsigned long)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Pose2::transformTo(gtsam::Point2 const&, gtsam::OptionalJacobian<2, 3>, gtsam::OptionalJacobian<2, 2>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::GaussianFactorGraph::optimize(gtsam::Ordering const&, boost::function<std::pair<boost::shared_ptr<gtsam::GaussianConditional>, boost::shared_ptr<gtsam::GaussianFactor> > (gtsam::GaussianFactorGraph const&, gtsam::Ordering const&)> const&) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::EliminateableFactorGraph<gtsam::GaussianFactorGraph>::eliminatePartialMultifrontal(std::vector<unsigned long, std::allocator<unsigned long> > const&, boost::function<std::pair<boost::shared_ptr<gtsam::GaussianConditional>, boost::shared_ptr<gtsam::GaussianFactor> > (gtsam::GaussianFactorGraph const&, gtsam::Ordering const&)> const&, boost::optional<gtsam::VariableIndex const&>) const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::Rot3::ypr() const'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgtsam_unstable.so: undefined reference to `gtsam::EliminateableFactorGraph<gtsam::DiscreteFactorGraph>::eliminateSequential(gtsam::Ordering const&, boost::function<std::pair<boost::shared_ptr<gtsam::DiscreteConditional>, boost::shared_ptr<gtsam::DiscreteFactor> > (gtsam::DiscreteFactorGraph const&, gtsam::Ordering const&)> const&, boost::optional<gtsam::VariableIndex const&>) const'
collect2: error: ld returned 1 exit status

Have you ever encountered this problem? Or do you have a solution to this error? Thank you very much!

@ywwbehappy
Copy link
Author

ubuntu20.04
gtsam4.2a8
eigen3.4.0

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

1 participant