0
$\begingroup$

Rosanswers logo

I'm trying to re-install ROS in order to get a clean configuration to solve some other issues, and the build is failing when it gets to the 'pcl' package. It seems to just repeat this error:

In file included from /home/abouchard/ros_catkin_ws/src/pcl/common/include/pcl/common/vector_average.h:40:0,
                 from /home/abouchard/ros_catkin_ws/src/pcl/common/test/test_vector_average.cpp:42:
/home/abouchard/ros_catkin_ws/src/pcl/common/include/pcl/common/eigen.h: In function ‘void pcl::computeRoots(const Matrix&, Roots&)’:
/home/abouchard/ros_catkin_ws/src/pcl/common/include/pcl/common/eigen.h:168:30: error: ‘sqrt’ is not a member of ‘Eigen::internal’

The specific line numbers and such vary, of course, but they all have to do with a call to a sqrt function, and the namespace is either Eigen or pcl. I've Googled the error to little avail, and I am loathe to change the code much since I'm assuming there was some reason to call out a sqrt function other than the one in the 'math' library.

I found the documentation for the 'internal' namespace in Eigen, and it doesn't appear to have a sqrt function. However, looking at the file causing the issue (eigen.h), it seems to make some custom declarations of the sqrt function, but just for the pcl namespace.


Originally posted by teddybouch on ROS Answers with karma: 320 on 2013-09-03

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In eigen.h: -replace all instances of Eigen::internal::sqrt with pcl::sqrt -replace all instances of Eigen::sin/cos with sin/cos

This allows it to compile successfully, but I haven't tested thoroughly to see whether it affects functionality. A co-worker of mine ran into the same problem and used std::sqrt instead of pcl::sqrt, and his compiles as well.


Originally posted by teddybouch with karma: 320 on 2013-09-04

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by teddybouch on 2013-09-20:
Until I find that either solution creates a problem, I am going to flag this as a solution.

Comment by mz on 2015-06-15:
Looks like Eigen did remove Eigen::internal::sqrt() and was okay with using std::sqrt() http://eigen.tuxfamily.org/bz/show_bug.cgi?id=264 and Eigen::internal::sin and cos as well http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2012/11/msg00002.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.