Ask Your Question

PCL Compiling error on Mac OSX with clang

asked 2013-01-31 03:51:48 -0500

Hansg91 gravatar image

updated 2013-01-31 03:53:16 -0500


So I am trying to eliminate my Ubuntu VM by installing ROS on my Mac OSX directly. I am following the Homebrew tutorial for the installation. After solving several hickups I am now stuck when it tries to compile PCL.

It appears the script uses the clang compiler because there were some unsolvable errors with the g++ compiler (?), however using clang gives me the following error :

/Users/hansgaiser/ros_catkin_ws/src/pcl/common/include/pcl/common/point_operators.h:79:5: error: overloaded 'operator*' must have at least one parameter of class or enumeration type
    operator* (const PointT& p, const float& scalar)

(ps. I got different errors with PCL before, they are resolved now, according to some other questions by applying the last 3 patches from here and some patch for ply_parser.h from here)

This error seems to be similar to something I found at the PCL forum here. Their fix appears to be to compile using g++. If I try to compile everything with g++ however, I get an error for rosconsole, which appears to be a known error.

I tried searching for a solution here and on the PCL forums, but I could not find anything.

What to do next?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-31 11:54:52 -0500

WilliamWoodall gravatar image

In the past PCL built with g++ on 10.7 in groovy, it is known that PCL 1.6 does not build with clang, PCL 1.7 (trunk) does build with clang, but that version did not make it into Groovy.

You can try replacing the version of PCL bundled with ros with a newer version of PCL and dependent packages like pcl_ros might still work.

The rosconsole bug you mentioned is only a problem when using clang or the llvm g++. Either way you should build PCL with a specific compiler, but not blanket the rest of ROS with that compiler necessarily.

edit flag offensive delete link more


Thank you, I got it to work now by replacing the PCL shipped with ROS by the PCL from their trunk. I had to make some minor changes, like apply those patches to the cmake and some #if wasn't compiling, but other than that it works now :)

Hansg91 gravatar image Hansg91  ( 2013-02-02 01:00:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-31 03:51:48 -0500

Seen: 450 times

Last updated: Jan 31 '13