Ask Your Question
2

Building PCL on OSX 10.9

asked 2013-10-25 01:22:24 -0600

Artem gravatar image

After installing OSX 10.9, PCL does not build anymore. There were a few compilation and linking problems related to VTK 6.0, that I resolved somehow see this discussion. Now there is a compilation error

[ 21%] Building CXX object filters/CMakeFiles/pcl_filters.dir/src/extract_indices.cpp.o
In file included from /Users/user/Documents/temp/pcl/pcl/filters/src/extract_indices.cpp:41:
In file included from /Users/user/Documents/temp/pcl/pcl/filters/include/pcl/filters/impl/extract_indices.hpp:43:
In file included from /Users/user/Documents/temp/pcl/pcl/filters/include/pcl/filters/extract_indices.h:43:
In file included from /Users/user/Documents/temp/pcl/pcl/filters/include/pcl/filters/filter_indices.h:43:
In file included from /Users/user/Documents/temp/pcl/pcl/filters/include/pcl/filters/filter.h:43:
In file included from /Users/user/Documents/temp/pcl/pcl/common/include/pcl/pcl_base.h:45:
In file included from /Users/user/Documents/temp/pcl/pcl/common/include/pcl/pcl_macros.h:69:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:434:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:1795:32: error: cannot convert 'const pcl::Boundary' to
      'unsigned char' without a conversion operator
        _VSTD::memset(__first, (unsigned char)__value_, (size_t)(__n));
                               ^~~~~~~~~~~~~~~~~~~~~~~

Any ideas how to resolve this?

edit retag flag offensive close merge delete

Comments

I also tried to compile the latest version of https://github.com/kylelutz/pcl.git and with the vtk6-fixes branch, but then I get some eigen error ...

Hansg91 gravatar imageHansg91 ( 2013-10-26 00:31:24 -0600 )edit

The eigen issue has been solved here https://github.com/PointCloudLibrary/pcl/issues/283 Regarding the rest, I'm getting the same errors as yourself above after upgrading to Mavericks. V frustrating...

Ivano gravatar imageIvano ( 2013-10-26 04:04:55 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-10-26 05:03:19 -0600

Ivano gravatar image

By adding the two following lines in the file CMakeLists.txt

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")

under

string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)

I've managed to get PCL 1.7.1 built succesfully on OS 10.9. That should also work for the trunk.

It seems that these kind of issues boil down to the swap of defaults libstdc++ / libc++ in Xcode 5.0.1

edit flag offensive delete link more

Comments

Thanks Ivano! It did help to pass those errors. I got stuck with linking errors. Undefined symbols for architecture x86_64: "vtkObjectBase::PrintHeader(std::ostream&, vtkIndent)", referenced from: vtable for pcl::visualization::PointPickingCallback in point_picking_event.cpp.o vtable for pcl::visualization::PCLVisualizerInteractorStyle in interactor_style.cpp.o ...

Artem gravatar imageArtem ( 2013-10-26 12:01:56 -0600 )edit

What version of VTK did you install?

Artem gravatar imageArtem ( 2013-10-26 12:03:14 -0600 )edit

Adding -DBUILD_visualization=off allowed me successfuly built PCL. Did you have to turn visualisation off too?

Artem gravatar imageArtem ( 2013-10-26 12:20:57 -0600 )edit

Awesome. No, I didn't need the VTK I'm afraid. Anyway here (https://developer.nvidia.com/cuda-downloads) you can find the new CUDA library for OS X 10.9 rolled out from NVIDIA just last night.

Ivano gravatar imageIvano ( 2013-10-27 06:30:38 -0600 )edit

Just a small side question, did you manage to install qt? It doesnt compile for me.

Hansg91 gravatar imageHansg91 ( 2013-10-27 06:46:38 -0600 )edit

Nope, here is a discussion on this issue https://github.com/mxcl/homebrew/issues/21000

Artem gravatar imageArtem ( 2013-10-27 08:42:26 -0600 )edit

I managed to compile Qt, using the patches from here: https://codereview.qt-project.org/#change,69325

Hansg91 gravatar imageHansg91 ( 2013-10-28 09:23:44 -0600 )edit

Cool. Thanks!

Ivano gravatar imageIvano ( 2013-10-28 21:35:40 -0600 )edit
0

answered 2014-11-19 17:59:55 -0600

pgorczak gravatar image

I could get the latest version to install on OS X Yosemite with brew install pcl --HEAD

Some more discussion in a related question.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2013-10-25 01:22:24 -0600

Seen: 2,056 times

Last updated: Nov 19 '14