strawlab / python-pcl

Python bindings to the pointcloud library (pcl)
http://strawlab.github.com/python-pcl/
Other
2k stars 701 forks source link

"import pcl" causes "Symbol not found: __ZN3pcl11ConcaveHullINS_11PointXYZRGBEE21performReconstructionERSt6vectorINS_8VerticesESaIS4_EE" error on macOS 10.12.5 #119

Open mikeroberts3000 opened 7 years ago

mikeroberts3000 commented 7 years ago

Hello there,

I'm trying to install python-pcl on macOS 10.12.5. I've successfully installed PCL 1.8.1 using Brew with the following command, brew install pcl. I can confirm that PCL has been installed successfully, by using the command brew info pcl, which prints the following output:

pcl: stable 1.8.1 (bottled), HEAD
Library for 2D/3D image and point cloud processing
http://www.pointclouds.org/
/usr/local/Cellar/pcl/1.8.1 (1,140 files, 138.1MB) *
  Poured from bottle on 2017-08-30 at 18:44:26
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pcl.rb
==> Dependencies
Build: cmake ✔, pkg-config ✔
Required: boost ✔, cminpack ✔, eigen ✔, flann ✔, glew ✔, libusb ✔, qhull ✔, vtk ✔
Optional: homebrew/science/openni ✘, homebrew/science/openni2 ✘
==> Options
--with-openni
    Build with openni support
--with-openni2
    Build with openni2 support
--HEAD
    Install HEAD version

I then apply the fix suggested at https://github.com/strawlab/python-pcl/issues/97, removing "pcl_2d" from the pkgconfig/pcl_features-1.8.pc file installed by Brew.

I then build (the latest master branch on GitHub) python-pcl using make, followed by python setup.py install. I'm including the full build output from make and python setup.py install at the bottom of this post in case it's relevant. At this point, I should be able to import pcl from within Python. But when I attempt to do this, I get the following error:

Mikes-MacBook-Pro:python-pcl mike$ python
Enthought Canopy Python 2.7.11 | 64-bit | (default, Jun 11 2016, 03:41:56) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pcl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pcl/__init__.py", line 2, in <module>
    from ._pcl import *
ImportError: dlopen(pcl/_pcl.so, 2): Symbol not found: __ZN3pcl11ConcaveHullINS_11PointXYZRGBEE21performReconstructionERSt6vectorINS_8VerticesESaIS4_EE
  Referenced from: pcl/_pcl.so
  Expected in: flat namespace
 in pcl/_pcl.so

I'm aware that building the python-pcl bindings to target PCL 1.8.1 is not an officially supported scenario. But it's not possible to get older versions of PCL using Brew. It would be ideal if python-pcl worked out of the box with the default version of PCL available on Brew. For anyone reading this, does anything jump out at you as an easy fix?

Full build output when building python-pcl using make:

Mikes-MacBook-Pro:python-pcl mike$ make
python setup.py build_ext --inplace
running build_ext
skipping 'pcl/_pcl_180.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
creating build
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/pcl
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/_pcl_180.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/_pcl_180.o
In file included from pcl/_pcl_180.cpp:526:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: 
      "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
In file included from pcl/_pcl_180.cpp:634:
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/keypoints/uniform_sampling.h:44:2: warning: 
      UniformSampling is not a Keypoint anymore, use <pcl/filters/uniform_sampling.h> instead.
      [-W#warnings]
#warning UniformSampling is not a Keypoint anymore, use <pcl/filters/uniform_sampling.h> instead.
 ^
pcl/_pcl_180.cpp:46441:26: warning: 'ConditionalRemoval' is deprecated:
      ConditionalRemoval(ConditionBasePtr condition, bool extract_removed_indices = false) is
      deprecated, please use the setCondition (ConditionBasePtr condition) function instead.
      [-Wdeprecated-declarations]
  __pyx_v_self->me = new __pyx_t_3pcl_11pcl_filters_ConditionalRemoval_t(((__pyx_t_3pcl_11...
                         ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/filters/conditional_removal.h:632:7: note: 
      'ConditionalRemoval' has been explicitly marked deprecated here
      ConditionalRemoval (ConditionBasePtr condition, bool extract_removed_indices = false) :
      ^
pcl/_pcl_180.cpp:46441:141: warning: implicit conversion of NULL constant to 'bool'
      [-Wnull-conversion]
  ...__pyx_t_3pcl_11pcl_filters_ConditionalRemoval_t(((__pyx_t_3pcl_11pcl_filters_ConditionBasePtr_t)__pyx_v_cond->me), NULL);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                    ^~~~
                                                                                                                        false
pcl/_pcl_180.cpp:48717:16: warning: 'setInputCloud' is deprecated:
      [pcl::registration::GeneralizedIterativeClosestPoint::setInputCloud] setInputCloud is
      deprecated. Please use setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_gicp.setInputCloud(__pyx_v_source->thisptr_shared);
               ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/gicp.h:129:7: note: 'setInputCloud'
      has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49322:15: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_icp.setInputCloud(__pyx_v_source->thisptr_shared);
              ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49871:18: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_icp_nl.setInputCloud(__pyx_v_source->thisptr_shared);
                 ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60507:46: warning: 'setInputCloud' is deprecated:
      [pcl::registration::GeneralizedIterativeClosestPoint::setInputCloud] setInputCloud is
      deprecated. Please use setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cGeneralizedIterativeClosestPoint->setInputCloud(((boost::shared_ptr<pcl::PointC...
                                             ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/gicp.h:129:7: note: 'setInputCloud'
      has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60607:44: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cIterativeClosestPointNonLinear->setInputCloud(((boost::shared_ptr<pcl::PointClo...
                                           ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60707:35: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cIterativeClosestPoint->setInputCloud(((boost::shared_ptr<pcl::PointCloud<struc...
                                  ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49917:12: warning: unused function
      '__pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_1__cinit__' [-Wunused-function]
static int __pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_1__cinit__(PyObject *__pyx_v_self, ...
           ^
pcl/_pcl_180.cpp:50007:12: warning: unused function
      '__pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_3__cinit__' [-Wunused-function]
static int __pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_3__cinit__(PyObject *__pyx_v_self, ...
           ^
12 warnings generated.
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/minipcl.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/minipcl.o
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/ProjectInliers.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/ProjectInliers.o
g++ -bundle -undefined dynamic_lookup -g -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/pcl/_pcl_180.o build/temp.macosx-10.6-x86_64-2.7/pcl/minipcl.o build/temp.macosx-10.6-x86_64-2.7/pcl/ProjectInliers.o -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/lib -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/Cellar/flann/1.9.1_3/lib -L/usr/local/Cellar/pcl/1.8.1/lib -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_2d -lpcl_ml -lpcl_surface -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_visualization -lpcl_io -lpcl_search -lpcl_kdtree -lflann -lflann_cpp -lpcl_octree -lpcl_common -o /Users/mike/Code/GitHub/python-pcl/pcl/_pcl.so -lboost_system
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
cythoning pcl/pcl_grabber_180.pyx to pcl/pcl_grabber_180.cpp
building 'pcl.pcl_grabber' extension
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/pcl_grabber_180.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/pcl_grabber_180.o
In file included from pcl/pcl_grabber_180.cpp:449:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: 
      "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
1 warning generated.
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/grabber_callback.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/grabber_callback.o
g++ -bundle -undefined dynamic_lookup -g -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/pcl/pcl_grabber_180.o build/temp.macosx-10.6-x86_64-2.7/pcl/grabber_callback.o -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/lib -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/Cellar/flann/1.9.1_3/lib -L/usr/local/Cellar/pcl/1.8.1/lib -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_2d -lpcl_ml -lpcl_surface -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_visualization -lpcl_io -lpcl_search -lpcl_kdtree -lflann -lflann_cpp -lpcl_octree -lpcl_common -o /Users/mike/Code/GitHub/python-pcl/pcl/pcl_grabber.so -lboost_system
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
python setup.py build_ext --inplace
running build_ext
skipping 'pcl/_pcl_180.cpp' Cython extension (up-to-date)
skipping 'pcl/pcl_grabber_180.cpp' Cython extension (up-to-date)

Full build output, building python-pcl using python setup.py install.

Mikes-MacBook-Pro:python-pcl mike$ python setup.py install
running install
running bdist_egg
running egg_info
creating python_pcl.egg-info
writing requirements to python_pcl.egg-info/requires.txt
writing python_pcl.egg-info/PKG-INFO
writing top-level names to python_pcl.egg-info/top_level.txt
writing dependency_links to python_pcl.egg-info/dependency_links.txt
writing manifest file 'python_pcl.egg-info/SOURCES.txt'
reading manifest file 'python_pcl.egg-info/SOURCES.txt'
writing manifest file 'python_pcl.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg
running install_lib
running build_py
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/pcl
copying pcl/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pcl
running build_ext
skipping 'pcl/_pcl_180.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/_pcl_180.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/_pcl_180.o
In file included from pcl/_pcl_180.cpp:526:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: 
      "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
In file included from pcl/_pcl_180.cpp:634:
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/keypoints/uniform_sampling.h:44:2: warning: 
      UniformSampling is not a Keypoint anymore, use <pcl/filters/uniform_sampling.h> instead.
      [-W#warnings]
#warning UniformSampling is not a Keypoint anymore, use <pcl/filters/uniform_sampling.h> instead.
 ^
pcl/_pcl_180.cpp:46441:26: warning: 'ConditionalRemoval' is deprecated:
      ConditionalRemoval(ConditionBasePtr condition, bool extract_removed_indices = false) is
      deprecated, please use the setCondition (ConditionBasePtr condition) function instead.
      [-Wdeprecated-declarations]
  __pyx_v_self->me = new __pyx_t_3pcl_11pcl_filters_ConditionalRemoval_t(((__pyx_t_3pcl_11...
                         ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/filters/conditional_removal.h:632:7: note: 
      'ConditionalRemoval' has been explicitly marked deprecated here
      ConditionalRemoval (ConditionBasePtr condition, bool extract_removed_indices = false) :
      ^
pcl/_pcl_180.cpp:46441:141: warning: implicit conversion of NULL constant to 'bool'
      [-Wnull-conversion]
  ...__pyx_t_3pcl_11pcl_filters_ConditionalRemoval_t(((__pyx_t_3pcl_11pcl_filters_ConditionBasePtr_t)__pyx_v_cond->me), NULL);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                    ^~~~
                                                                                                                        false
pcl/_pcl_180.cpp:48717:16: warning: 'setInputCloud' is deprecated:
      [pcl::registration::GeneralizedIterativeClosestPoint::setInputCloud] setInputCloud is
      deprecated. Please use setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_gicp.setInputCloud(__pyx_v_source->thisptr_shared);
               ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/gicp.h:129:7: note: 'setInputCloud'
      has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49322:15: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_icp.setInputCloud(__pyx_v_source->thisptr_shared);
              ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49871:18: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_icp_nl.setInputCloud(__pyx_v_source->thisptr_shared);
                 ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60507:46: warning: 'setInputCloud' is deprecated:
      [pcl::registration::GeneralizedIterativeClosestPoint::setInputCloud] setInputCloud is
      deprecated. Please use setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cGeneralizedIterativeClosestPoint->setInputCloud(((boost::shared_ptr<pcl::PointC...
                                             ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/gicp.h:129:7: note: 'setInputCloud'
      has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60607:44: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cIterativeClosestPointNonLinear->setInputCloud(((boost::shared_ptr<pcl::PointClo...
                                           ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:60707:35: warning: 'setInputCloud' is deprecated:
      [pcl::registration::Registration::setInputCloud] setInputCloud is deprecated. Please use
      setInputSource instead. [-Wdeprecated-declarations]
  __pyx_v_cIterativeClosestPoint->setInputCloud(((boost::shared_ptr<pcl::PointCloud<struc...
                                  ^
/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8/pcl/registration/registration.h:183:7: note: 
      'setInputCloud' has been explicitly marked deprecated here
      setInputCloud (const PointCloudSourceConstPtr &cloud);
      ^
pcl/_pcl_180.cpp:49917:12: warning: unused function
      '__pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_1__cinit__' [-Wunused-function]
static int __pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_1__cinit__(PyObject *__pyx_v_self, ...
           ^
pcl/_pcl_180.cpp:50007:12: warning: unused function
      '__pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_3__cinit__' [-Wunused-function]
static int __pyx_pw_3pcl_4_pcl_21RandomSampleConsensus_3__cinit__(PyObject *__pyx_v_self, ...
           ^
12 warnings generated.
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/minipcl.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/minipcl.o
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/ProjectInliers.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/ProjectInliers.o
g++ -bundle -undefined dynamic_lookup -g -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/pcl/_pcl_180.o build/temp.macosx-10.6-x86_64-2.7/pcl/minipcl.o build/temp.macosx-10.6-x86_64-2.7/pcl/ProjectInliers.o -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/lib -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/Cellar/flann/1.9.1_3/lib -L/usr/local/Cellar/pcl/1.8.1/lib -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_2d -lpcl_ml -lpcl_surface -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_visualization -lpcl_io -lpcl_search -lpcl_kdtree -lflann -lflann_cpp -lpcl_octree -lpcl_common -o build/lib.macosx-10.6-x86_64-2.7/pcl/_pcl.so -lboost_system
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
skipping 'pcl/pcl_grabber_180.cpp' Cython extension (up-to-date)
building 'pcl.pcl_grabber' extension
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/pcl_grabber_180.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/pcl_grabber_180.o
In file included from pcl/pcl_grabber_180.cpp:449:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: 
      "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
1 warning generated.
gcc -fno-strict-aliasing -fno-common -dynamic -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/include/pcl-1.8 -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/flann/1.9.1_3/include -I/usr/local/Cellar/pcl/1.8.1/include/pcl-1.8 -I/usr/local/Cellar/eigen/3.3.4/include/eigen3 -I/usr/include/ni -I/Applications/Canopy.app/appdata/canopy-1.7.4.3348.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pcl/grabber_callback.cpp -o build/temp.macosx-10.6-x86_64-2.7/pcl/grabber_callback.o
g++ -bundle -undefined dynamic_lookup -g -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/pcl/pcl_grabber_180.o build/temp.macosx-10.6-x86_64-2.7/pcl/grabber_callback.o -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/lib -L/usr/local/Cellar/pcl/1.8.1/lib -L/usr/local/Cellar/flann/1.9.1_3/lib -L/usr/local/Cellar/pcl/1.8.1/lib -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_2d -lpcl_ml -lpcl_surface -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_visualization -lpcl_io -lpcl_search -lpcl_kdtree -lflann -lflann_cpp -lpcl_octree -lpcl_common -o build/lib.macosx-10.6-x86_64-2.7/pcl/pcl_grabber.so -lboost_system
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
creating build/bdist.macosx-10.6-x86_64
creating build/bdist.macosx-10.6-x86_64/egg
creating build/bdist.macosx-10.6-x86_64/egg/pcl
copying build/lib.macosx-10.6-x86_64-2.7/pcl/__init__.py -> build/bdist.macosx-10.6-x86_64/egg/pcl
copying build/lib.macosx-10.6-x86_64-2.7/pcl/_pcl.so -> build/bdist.macosx-10.6-x86_64/egg/pcl
copying build/lib.macosx-10.6-x86_64-2.7/pcl/pcl_grabber.so -> build/bdist.macosx-10.6-x86_64/egg/pcl
byte-compiling build/bdist.macosx-10.6-x86_64/egg/pcl/__init__.py to __init__.pyc
creating stub loader for pcl/_pcl.so
creating stub loader for pcl/pcl_grabber.so
byte-compiling build/bdist.macosx-10.6-x86_64/egg/pcl/_pcl.py to _pcl.pyc
byte-compiling build/bdist.macosx-10.6-x86_64/egg/pcl/pcl_grabber.py to pcl_grabber.pyc
creating build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/PKG-INFO -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/not-zip-safe -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/requires.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying python_pcl.egg-info/top_level.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
writing build/bdist.macosx-10.6-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg' and adding 'build/bdist.macosx-10.6-x86_64/egg' to it
removing 'build/bdist.macosx-10.6-x86_64/egg' (and everything under it)
Processing python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg
removing '/Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg' (and everything under it)
creating /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg
Extracting python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg to /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
python-pcl 0.2 is already the active version in easy-install.pth

Installed /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/python_pcl-0.2-py2.7-macosx-10.6-x86_64.egg
Processing dependencies for python-pcl==0.2
Searching for Cython==0.25.2
Best match: Cython 0.25.2
Adding Cython 0.25.2 to easy-install.pth file
Installing cython script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin
Installing cygdb script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin
Installing cythonize script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin

Using /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
Searching for numpy==1.11.3
Best match: numpy 1.11.3
Adding numpy 1.11.3 to easy-install.pth file
Installing f2py script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin

Using /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
Searching for nose==1.3.7
Best match: nose 1.3.7
Adding nose 1.3.7 to easy-install.pth file
Installing nosetests script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin
Installing nosetests-2.7 script to /Users/mike/Library/Enthought/Canopy_64bit/User/bin

Using /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
Searching for filelock==2.0.11
Best match: filelock 2.0.11
Processing filelock-2.0.11-py2.7.egg
filelock 2.0.11 is already the active version in easy-install.pth

Using /Users/mike/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/filelock-2.0.11-py2.7.egg
Finished processing dependencies for python-pcl==0.2
mikeroberts3000 commented 7 years ago

I have confirmed that that this same error persists when building (the latest master on GitHub) python-pcl against PCL 1.8 and 1.7.2. I built PCL 1.8 and 1.7.2 from source, and I get the same error when attempting to build python-pcl. So I think this is an issue with the latest master branch of python-pcl.

Sirokujira commented 7 years ago

It is unknown whether it is the cause or not, May I ask you to raise the version of gcc compiler once? (Since it is possible that libraries may be affected by running OSX gcc default of 4.2)

mikeroberts3000 commented 7 years ago

I ended up finding an astonishing workaround for this issue.

When I run python setup.py install, the setup script prints out a few gcc and g++ commands (see above). If you can believe it, the workaround for this problem was to take each gcc and g++ command, copy it to the command line, and run it manually. And then to run python setup.py install again. Running the setup script again will not call gcc or g++, but will copy the relevant files to the Python site-packages folder.

So, the build environment is somehow different when invoking gcc and g++ from setup.py, as opposed to invoking gcc and g++ manually from the command line.

There are several open issues where other people have similar errors (https://github.com/strawlab/python-pcl/issues/63, https://github.com/strawlab/python-pcl/issues/101, https://github.com/strawlab/python-pcl/issues/119), so I don't think this issue is due to a local build configuration problem on my machine.

bednarikjan commented 6 years ago

I have the same issue but the workaround as suggested by mikeroberts3000 does not work for me, the same issue persists. Any new update on this issue or any idea how this can be solved?

system: Mac OS 10.13.1 python: 3.5.2 (anaconda) cython: 0.25.2 pcl: 1.8.1 (current version from python-pcl github)

bednarikjan commented 6 years ago

I made it work. What helped in my case was what was suggested in #50, i.e. to force build python-pcl using libc++ rather then libstdc++ since the pcl itself was built using libc++.

mttgdd commented 3 years ago

@bednarikjan's comment was useful for me - I commented out the extra compile args in setup.py that referenced c++11