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

Build errors with Ubuntu 16.04, Cmake 3.9 and boost 1.67 #212

Closed
Kaju-Bubanja opened this issue Aug 16, 2018 · 7 comments
Closed

Build errors with Ubuntu 16.04, Cmake 3.9 and boost 1.67 #212

Kaju-Bubanja opened this issue Aug 16, 2018 · 7 comments

Comments

@Kaju-Bubanja
Copy link
Contributor

I'm trying to build kalibr using catkin build, but I get following error:

/kalibr/aslam_cv/aslam_time/include/aslam/implementation/Duration.hpp: In instantiation of ‘boost::posix_time::time_duration aslam::DurationBase<T>::toBoost() const [with T = aslam::Duration]’:
/kalibr/aslam_cv/aslam_time/src/duration.cpp:36:16:   required from here
/kalibr/aslam_cv/aslam_time/include/aslam/implementation/Duration.hpp:168:27: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000l>::subsecond_duration(double)’
   return bt::seconds(sec) + bt::microseconds(nsec / 1000.0);

I'm kinda confused by the error message because the function exists, but I guess it is typed with different input types? I think the easiest way to resolve is to change my boost, cmake, gcc version to match the version that was tested with kalibr and that is known to build.

@NikolausDemmel
Copy link
Contributor

I had this error the other day compiling some ros time libraries on mac. I think it should be nsec / 1000 (to not convert to double).

@Kaju-Bubanja
Copy link
Contributor Author

Thanks for the hint, looking at the code some more this was also my guess. Do you have any idea why this builds for some people and not for others? I guess it's a different compiler version? Or another version of something in the toolchain. I would like to know the cause so I can just switch whatever version it is that is wrong on my pc, because I don't feel like going around fixing all these small little things, because after fixing this I got the following error and I suppose there are more to come:

/kalibr/aslam_optimizer/aslam_backend_expressions/src/MatrixTransformation.cpp:20:62: error: no 
match for ‘operator==’ (operand types are ‘Eigen::internal::enable_if<true, 
Eigen::IndexedView<Eigen::Matrix<double, 3, 3>, Eigen::internal::SingleRange, double> >::type {aka 
Eigen::IndexedView<Eigen::Matrix<double, 3, 3>, Eigen::internal::SingleRange, double>}’ and ‘int’)
       if (_UpdatePattern(i%3,floor(static_cast<double>(i/3)))==1){

@NikolausDemmel
Copy link
Contributor

No, unfortunately not. I didn't really look into it yet. I just noticed suddenly this issue on Mac (clang) for a project that includes some ROS libraries that must have been compiling on various platforms for a long time. Specifically that code was in an ifdef about boost having nanosecond resolution, so maybe something changed there...

@NikolausDemmel
Copy link
Contributor

btw the first error seems to be caused by a change in boost: mikepurvis/ros-install-osx#116 (comment)

@Kaju-Bubanja
Copy link
Contributor Author

Thank you for the lead, I will try to build it with 1.63 later and see if that fixes the issues.

@ffurrer
Copy link
Contributor

ffurrer commented Aug 16, 2018

Yup, some other people fixed the same issue by changing types from double to long:
https://gitlab.com/orcus/orcus/merge_requests/29/diffs

Would be nice if you could open a PR with these fixes, if you succeed :).

@Kaju-Bubanja
Copy link
Contributor Author

Could fix the issue, PR is here: #213

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

3 participants