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

test_ceres_se3 compile error on os-x #86

Closed
radiohail opened this issue Apr 17, 2017 · 6 comments
Closed

test_ceres_se3 compile error on os-x #86

radiohail opened this issue Apr 17, 2017 · 6 comments

Comments

@radiohail
Copy link

radiohail commented Apr 17, 2017

Building CXX object test/ceres/CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o
cd /Users/xing/Documents/Work/Sophus/build/test/ceres && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -DGFLAGS_IS_A_DLL=0 -isystem /usr/local/include -I/usr/local/include/eigen3 -I/Users/xing/Documents/Work/Sophus  -Wall -Werror -Wextra -Wno-deprecated-register -std=c++11 -stdlib=libc++ -Wno-deprecated-register -O3   -std=gnu++11 -o CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o -c /Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp
In file included from /Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp:1:
In file included from /usr/local/include/ceres/ceres.h:37:
In file included from /usr/local/include/ceres/autodiff_cost_function.h:132:
In file included from /usr/local/include/ceres/internal/autodiff.h:145:
In file included from /usr/local/include/ceres/jet.h:165:
In file included from /usr/local/include/eigen3/Eigen/Core:412:
/usr/local/include/eigen3/Eigen/src/Core/IO.h:122:31: error: no member named 'digits10' in 'Eigen::NumTraits<ceres::Jet<double, 7> >'
   return NumTraits<Scalar>::digits10();
          ~~~~~~~~~~~~~~~~~~~^
/usr/local/include/eigen3/Eigen/src/Core/IO.h:155:63: note: in instantiation of member function
     'Eigen::internal::significant_decimals_impl<ceres::Jet<double, 7> >::run' requested here
     explicit_precision = significant_decimals_impl<Scalar>::run();
                                                             ^
/usr/local/include/eigen3/Eigen/src/Core/IO.h:220:20: note: in instantiation of function template specialization
     'Eigen::internal::print_matrix<Eigen::Matrix<ceres::Jet<double, 7>, 1, 4, 1, 1, 4> >' requested here
 return internal::print_matrix(s, m.eval(), EIGEN_DEFAULT_IO_FORMAT);
                  ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:57:12: note: in instantiation of function template specialization
     'Eigen::operator<<<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> > >' requested here
   stream << std::forward<T>(arg);
          ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:74:25: note: in instantiation of member function
     'Sophus::details::ArgToStream<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> > &&>::impl' requested here
     ArgToStream<T&&>::impl(stream, std::forward<T>(arg));
                       ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:88:3: note: in instantiation of function template specialization
     'Sophus::details::FormatStream<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> >>' requested here
 FormatStream(stream, text, std::forward<Args>(args)...);
 ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:123:25: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see
     all)
 std::cout << details::FormatString(description, std::forward<Args>(args)...)
                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h:175:12: note: in instantiation of function template specialization
     'TestCostFunctor::operator()<ceres::Jet<double, 7> >' requested here
   return functor(input[0],
          ^
/usr/local/include/ceres/internal/autodiff.h:282:68: note: in instantiation of member function
     'ceres::internal::VariadicEvaluate<TestCostFunctor, ceres::Jet<double, 7>, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Call' requested here
                         N0, N1, N2, N3, N4, N5, N6, N7, N8, N9>::Call(
                                                                  ^
/usr/local/include/ceres/autodiff_cost_function.h:211:53: note: in instantiation of member function 'ceres::internal::AutoDiff<TestCostFunctor,
     double, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Differentiate' requested here
          N0, N1, N2, N3, N4, N5, N6, N7, N8, N9>::Differentiate(
                                                   ^
/usr/local/include/ceres/autodiff_cost_function.h:172:12: note: in instantiation of member function
     'ceres::AutoDiffCostFunction<TestCostFunctor, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Evaluate' requested here
 explicit AutoDiffCostFunction(CostFunctor* functor)
          ^
/Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp:61:11: note: in instantiation of member function
     'ceres::AutoDiffCostFunction<TestCostFunctor, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::AutoDiffCostFunction' requested here
     new ceres::AutoDiffCostFunction<TestCostFunctor, Sophus::SE3d::DoF,
         ^
1 error generated.
make[2]: *** [test/ceres/CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o] Error 1
make[1]: *** [test/ceres/CMakeFiles/test_ceres_se3.dir/all] Error 2
make: *** [all] Error 2

Environment:
ceres: 1.12.0
Eigen: 3.3.3
OSX 10.12.4

@GilgameshD
Copy link

I have the same problem on my Mac, have you solved it?

@thesidjway
Copy link

I have the same issue on Ubuntu 14.04

@Glavnokoman
Copy link

Same here: arch linux, gcc 7.1 (or clang 4.0, same result), eigen 3.3.3, ceres 1.12.
Managed to install it with -DBUILD_TESTS=OFF but still....

@strasdat
Copy link
Owner

Adding ceres to TravisCI and potentially also AppVeyor has now a pretty high priority on my todo-list.

@strasdat
Copy link
Owner

strasdat commented Aug 8, 2017

The reason:
NumTraits<ceres::Jet<...>> needs the following member function

static inline int digits10() { return NumTraits<T>::digits10(); }

which was added in commit e5dceb3a on 2017-02-28.

@strasdat
Copy link
Owner

strasdat commented Aug 8, 2017

This is compiling fine on CI (#103). See scripts/install_osx_deps.sh for the details which dependencies are used.

@strasdat strasdat closed this as completed Aug 8, 2017
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

5 participants