Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

error when import pcl #50

Open
panjia1983 opened this issue Sep 27, 2014 · 11 comments
Open

error when import pcl #50

panjia1983 opened this issue Sep 27, 2014 · 11 comments
Labels

Comments

@panjia1983
Copy link

I installed the python-pcl, but when I import that, I have the following error:
/usr/local/lib/python2.7/dist-packages/pcl/_pcl.so: undefined symbol: _ZN3pcl7PCLBaseINS_8PointXYZEE10setIndicesERKN5boost10shared_ptrISt6vectorIiSaIiEEEE

I am on ubuntu 12.04, python 2.7, pcl 1.7

@nzjrs
Copy link
Contributor

nzjrs commented Sep 28, 2014

More information needed.

What vesion of cython?
How did you install pcl?
What version of python-pcl?
Did you build this in a virtualenv?

@larsmans
Copy link
Contributor

Not a venv, judging from the /usr/local. What does

ldd /usr/local/lib/python2.7/dist-packages/pcl/_pcl.so | grep libpcl

report?

@rickarmstrong
Copy link

Same issue here, Mint 17, Python 2.7, pcl 1.7, as soon as I say import pcl I get

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pcl/init.py", line 2, in
from ._pcl import *
ImportError: /usr/local/lib/python2.7/dist-packages/pcl/_pcl.so: undefined symbol: _ZN3pcl6search6KdTreeINS_8PointXYZEEC1Eb

Also, if I do 'import pcl' from within ipython, I get the same error, but with slightly more information:

ImportError Traceback (most recent call last)
in ()
----> 1 import pcl

/usr/local/lib/python2.7/dist-packages/pcl/init.py in ()
1 # XXX do a more specific import!
----> 2 from ._pcl import *
3
4 import sys
5

ImportError: /usr/local/lib/python2.7/dist-packages/pcl/_pcl.so: undefined symbol: _ZN3pcl6search6KdTreeINS_8PointXYZEEC1Eb

What vesion of cython?
0.21.1

How did you install pcl?
sudo apt-get install libpcl-all
This got me libpcl-1.7-all

What version of python-pcl?
Don't know how to check. Installed it just the other day.

Did you build this in a virtualenv?
No.

What does this report? ldd /usr/local/lib/python2.7/dist-packages/pcl/_pcl.so | grep libpcl
libpcl_io.so.1.7 => /usr/lib/libpcl_io.so.1.7 (0x00007f282fc8a000)
libpcl_segmentation.so.1.7 => /usr/lib/libpcl_segmentation.so.1.7 (0x00007f282f0fe000)
libpcl_features.so.1.7 => /usr/lib/libpcl_features.so.1.7 (0x00007f282d600000)
libpcl_filters.so.1.7 => /usr/lib/libpcl_filters.so.1.7 (0x00007f282cd21000)
libpcl_surface.so.1.7 => /usr/lib/libpcl_surface.so.1.7 (0x00007f282c6fd000)
libpcl_search.so.1.7 => /usr/lib/libpcl_search.so.1.7 (0x00007f282c352000)
libpcl_kdtree.so.1.7 => /usr/lib/libpcl_kdtree.so.1.7 (0x00007f282c02b000)
libpcl_octree.so.1.7 => /usr/lib/libpcl_octree.so.1.7 (0x00007f282bc3d000)
libpcl_common.so.1.7 => /usr/lib/libpcl_common.so.1.7 (0x00007f282b989000)
libpcl_io_ply.so.1.7 => /usr/lib/libpcl_io_ply.so.1.7 (0x00007f282a1e9000)
libpcl_sample_consensus.so.1.7 => /usr/lib/libpcl_sample_consensus.so.1.7 (0x00007f2826f52000)

@rickarmstrong
Copy link

Did the following, and appears to solve the problem:
sudo python setup.py clean
sudo make clean
sudo make all
sudo python setup.py install

Probably not the right thing to do, but worked. Could probably use a little blurb at http://strawlab.github.io/python-pcl/index.html that explains how to properly install python-pcl.

Thanks for creating this package, btw.

@gismo141
Copy link

@rickarmstrong Your last post helped me a lot to get the installation done - just started using Python with PCL and I was totally confused on how to install it. Maybe this should be made more clear in the readme.rst of this project.

@nzjrs
Copy link
Contributor

nzjrs commented May 20, 2015

Never sudo pip install

@gismo141
Copy link

@nzjrs What a chance that I didn't used 'sudo' for any command 👍

@julienr
Copy link

julienr commented Dec 10, 2015

I ran into the same problem, but on OSX. The issue was due to the fact that pcl was compiled with clang++/libc++ (the clang standard library) but python-pcl was picking clang++/libstdc++ (the GNU C++ standard library).

Compiling python-pcl with the following solved the problem

CPPFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" make all

@mikeroberts3000
Copy link

I just encountered this issue too. As suggested by @julienr, I needed to do:

CPPFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" make all

And I also needed to do:

CPPFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" python setup.py install

@q5390498
Copy link

q5390498 commented Jun 2, 2018

hello, I got the same problem on ubuntu, What should I do on Ubuntu? @mikeroberts3000 @julienr

@julienr
Copy link

julienr commented Jun 2, 2018

@q5390498 I'm sorry but I can't help you on this. Haven't used python-pcl for a while.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants