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

libpcl_keypoints version mismatch #296

Open
samanfahandej opened this issue Jun 7, 2019 · 14 comments · May be fixed by #388
Open

libpcl_keypoints version mismatch #296

samanfahandej opened this issue Jun 7, 2019 · 14 comments · May be fixed by #388

Comments

@samanfahandej
Copy link

I have pcl 1.8.1 on ubuntu 18.04, and python-pcl version is 0.3.0a1. I'm using Pycharm, but it throws this error on the first line of import pcl:
libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory

I can find libpcl_keypoints.so.1.8 file here: /usr/lib/x86_64-linux-gnu/libpcl_keypoints.so.1.8.1, but somehow the binding is not linked to 1.8 version, which I don't know why. I ran ldconfig and restart but it didn't help. Any idea?
Thanks.

@SalemBorhanYoussef
Copy link

i have the same issue. is there any solution?

@ghost
Copy link

ghost commented Jun 12, 2019

Same issue. I did not find any solution through google or stackoverflow

@DmitrySavchuk
Copy link

DmitrySavchuk commented Jun 18, 2019

I have the same issue. Probably, it may be connected with some recent renews, that is the cause of this out of sync. Until it will be fixed, is there any way to install a specific old version of python-pcl or libpcl-dev?

I used:
Cython - 0.29.6
NumPy - 1.16.4
pcl - 1.8.1
python-pcl - 0.3.0a1

On:
Ubuntu 18.04

@yanqd0
Copy link

yanqd0 commented Jun 25, 2019

The current prebuilt wheel package (0.3.0a1) only works on Ubuntu 16, where the pcl is 1.7.2.

@DmitrySavchuk
Copy link

DmitrySavchuk commented Jun 25, 2019

@yanqd0 thanks for your reply. Do you know any configuration available for Ubuntu 18.04? And maybe 0.3.0a1 will work with pcl 1.7.2 on Ubuntu 18.04?

@yanqd0
Copy link

yanqd0 commented Jun 26, 2019

The simplest way is to use a Ubuntu 16.04 Docker image on 18.04.

If you want to run in the host, install the pcl 1.7.2 from source may be working. But it is not good. The official libpcl-dev is 1.8.1 on Ubuntu 18.04.

With the libpcl-dev 1.8.1, there will be a link error when building python-pcl with libvtk6-dev, which is a dependency of libpcl-dev. libvtk7-dev is required. But it seems to be incompatible with libvtk6-dev and its dependent libpcl-dev.

You may need to adjust the link version of libvtk from 7 to 6. I have tried this below, but not working.

git diff
diff --git a/setup.py b/setup.py
index d26ca8b..2f1f8cc 100644
--- a/setup.py
+++ b/setup.py
@@ -723,7 +723,7 @@ else:
             vtk_library_dir = os.path.join('/usr/lib')
         elif pcl_version == '-1.8':
             # pcl 1.8.0/1?(Ubuntu 18.04)(melodic)
-            vtk_version = '7.0'
+            vtk_version = '6.3'
             # pcl 1.8.1?
             # vtk_version = '8.0'
             vtk_include_dir = os.path.join('/usr/include/vtk-' + vtk_version)

The link error:

$ x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/pcl/_pcl_180.o build/temp.linux-x86_64-3.6/pcl/minipcl.o build/temp.linux-x86_64-3.6/pcl/ProjectInliers.o -L/usr/lib/x86_64-linux-gnu/ -lvtkalglib-6.3 -lvtkChartsCore-6.3 -lvtkCommonColor-6.3 -lvtkCommonComputationalGeometry-6.3 -lvtkCommonCore-6.3 -lvtkCommonDataModel-6.3 -lvtkCommonExecutionModel-6.3 -lvtkCommonMath-6.3 -lvtkCommonMisc-6.3 -lvtkCommonSystem-6.3 -lvtkCommonTransforms-6.3 -lvtkDICOMParser-6.3 -lvtkDomainsChemistry-6.3 -lvtkexoIIc-6.3 -lvtkexpat-6.3 -lvtkFiltersAMR-6.3 -lvtkFiltersCore-6.3 -lvtkFiltersExtraction-6.3 -lvtkFiltersFlowPaths-6.3 -lvtkFiltersGeneral-6.3 -lvtkFiltersGeneric-6.3 -lvtkFiltersGeometry-6.3 -lvtkFiltersHybrid-6.3 -lvtkFiltersHyperTree-6.3 -lvtkFiltersImaging-6.3 -lvtkFiltersModeling-6.3 -lvtkFiltersParallel-6.3 -lvtkFiltersParallelImaging-6.3 -lvtkFiltersProgrammable-6.3 -lvtkFiltersSelection-6.3 -lvtkFiltersSMP-6.3 -lvtkFiltersSources-6.3 -lvtkFiltersStatistics-6.3 -lvtkFiltersTexture-6.3 -lvtkFiltersVerdict-6.3 -lvtkfreetype-6.3 -lvtkGeovisCore-6.3 -lvtkgl2ps-6.3 -lvtkhdf5-6.3 -lvtkhdf5_hl-6.3 -lvtkImagingColor-6.3 -lvtkImagingCore-6.3 -lvtkImagingFourier-6.3 -lvtkImagingGeneral-6.3 -lvtkImagingHybrid-6.3 -lvtkImagingMath-6.3 -lvtkImagingMorphological-6.3 -lvtkImagingSources-6.3 -lvtkImagingStatistics-6.3 -lvtkImagingStencil-6.3 -lvtkInfovisCore-6.3 -lvtkInfovisLayout-6.3 -lvtkInteractionImage-6.3 -lvtkInteractionStyle-6.3 -lvtkInteractionWidgets-6.3 -lvtkIOAMR-6.3 -lvtkIOCore-6.3 -lvtkIOEnSight-6.3 -lvtkIOExodus-6.3 -lvtkIOExport-6.3 -lvtkIOGeometry-6.3 -lvtkIOImage-6.3 -lvtkIOImport-6.3 -lvtkIOInfovis-6.3 -lvtkIOLegacy-6.3 -lvtkIOLSDyna-6.3 -lvtkIOMINC-6.3 -lvtkIOMovie-6.3 -lvtkIONetCDF-6.3 -lvtkIOParallel-6.3 -lvtkIOParallelXML-6.3 -lvtkIOPLY-6.3 -lvtkIOSQL-6.3 -lvtkIOVideo-6.3 -lvtkIOXML-6.3 -lvtkIOXMLParser-6.3 -lvtkjpeg-6.3 -lvtkjsoncpp-6.3 -lvtklibxml2-6.3 -lvtkmetaio-6.3 -lvtkNetCDF-6.3 -lvtkNetCDF_cxx-6.3 -lvtkoggtheora-6.3 -lvtkParallelCore-6.3 -lvtkpng-6.3 -lvtkproj4-6.3 -lvtkRenderingAnnotation-6.3 -lvtkRenderingContext2D-6.3 -lvtkRenderingContextOpenGL-6.3 -lvtkRenderingCore-6.3 -lvtkRenderingFreeType-6.3 -lvtkRenderingGL2PS-6.3 -lvtkRenderingImage-6.3 -lvtkRenderingLabel-6.3 -lvtkRenderingLIC-6.3 -lvtkRenderingLOD-6.3 -lvtkRenderingOpenGL-6.3 -lvtkRenderingVolume-6.3 -lvtkRenderingVolumeOpenGL-6.3 -lvtksqlite-6.3 -lvtksys-6.3 -lvtktiff-6.3 -lvtkverdict-6.3 -lvtkViewsContext2D-6.3 -lvtkViewsCore-6.3 -lvtkViewsInfovis-6.3 -lvtkzlib-6.3 -lpcl_keypoints -lpcl_outofcore -lpcl_people -lpcl_recognition -lpcl_registration -lpcl_segmentation -lpcl_features -lpcl_ml -lpcl_stereo -lpcl_surface -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_visualization -lpcl_io -lOpenNI -lOpenNI2 -lpcl_search -lpcl_kdtree -lflann -lflann_cpp -lpcl_octree -lpcl_common -o build/lib.linux-x86_64-3.6/pcl/_pcl.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lvtkexpat-6.3
/usr/bin/ld: cannot find -lvtkfreetype-6.3
/usr/bin/ld: cannot find -lvtkgl2ps-6.3
/usr/bin/ld: cannot find -lvtkhdf5-6.3
/usr/bin/ld: cannot find -lvtkhdf5_hl-6.3
/usr/bin/ld: cannot find -lvtkjpeg-6.3
/usr/bin/ld: cannot find -lvtkjsoncpp-6.3
/usr/bin/ld: cannot find -lvtklibxml2-6.3
/usr/bin/ld: cannot find -lvtkNetCDF-6.3
/usr/bin/ld: cannot find -lvtkNetCDF_cxx-6.3
/usr/bin/ld: cannot find -lvtkoggtheora-6.3
/usr/bin/ld: cannot find -lvtkpng-6.3
/usr/bin/ld: cannot find -lvtkproj4-6.3
/usr/bin/ld: cannot find -lvtksqlite-6.3
/usr/bin/ld: cannot find -lvtktiff-6.3
/usr/bin/ld: cannot find -lvtkzlib-6.3
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1

No matter for libvtk6-dev_6.3.0+dfsg1-11build1_amd64.deb or libvtk7-dev_7.1.1+dfsg1-2_amd64.deb, there is no such thing like libvtkexpat-6.3.so.

After I delete this in setup.py:

    elif vtk_version == '6.3':
        vtklibreleases = [...]

the wheel python_pcl-0.3.0rc1-cp36-cp36m-linux_x86_64.whl is built successfully, and works for some basic functions I have tried, on my Ubuntu 18.04 host.

@DmitrySavchuk
Copy link

@yanqd0 thanks for your advice! I have created a virtual machine with Ubuntu 16.04 and just installed all via apt and pip. For now, all works fine. So your solution with Docker image may resolve all my problems.
Hope that support for Ubuntu 18.04 and pcl 1.8.x will be soon.
I will investigate some configurations for Ubuntu 18.04 too and will notify here about results, if it will useful for someone.

@nickolai-voyage
Copy link

nickolai-voyage commented Sep 23, 2019

@yanqd0 Thanks for the tip. Both changing vtk_version to 6.3 and also making sure that vtklibreleases was empty allowed me to create something which let me use the subset of pcl that I'm using.

I ran into similar issues of not being able to find libvtkexpat-6.3 either on my machine or in any of the packages available.

I also tried compiling pcl 1.7 from source on my machine, but ran into some compiler errors and decided to give up there before going further.

@rcroset
Copy link

rcroset commented Apr 3, 2020

Hi,
Any progress on that issue ? Several months later I still got the same problem, and unfortunately docker is not a suitable option for me.
Thanks

@kvnptl
Copy link

kvnptl commented Apr 23, 2020

Hi,
Any progress on that issue ? Several months later I still got the same problem, and unfortunately docker is not a suitable option for me.
Thanks

same here, I am still looking for some solution.

I am using:
Ubuntu 18.04
Python 3.6.9

@the-faboratory
Copy link

the-faboratory commented May 24, 2020

I ran similar commands to yanqd0 and could successfully run several of the example scripts, after I moved source .pcd files to the examples directory. Environment:
Ubuntu 18.04
libpcl-dev 1.8.1
cython 0.25.2
numpy 1.18.4
python 3.6.9
vtk 6.3 (I think this was implicitly installed during installation of libpcl-dev 1.8.1)

After changing the lines as yanqd0

-            vtk_version = '7.0'
+            vtk_version = '6.3'

and commenting the

elif vtk_version == '6.3':
        vtklibreleases = [...]

I used the commands from the README, and

python3 simple_visualize 

can render a 3D view of the point cloud of pcd files that I put in the examples directory. Success!

Edit 2020-5-25: Still working great, I tried some segmentation and integration with an Intel RealSense, so I'm considering this solved. However, I have no clue what the vtk includes were for, I'm sure there are some functions that rely upon them.

@Xingyu-Lin
Copy link

Xingyu-Lin commented Feb 8, 2021

I followed the solutions posted by @yanqd0 , @the-faboratory and @Jovian-Dsouza, but that did not solve the problem. While the build is complete, when importing pcl, it throws out the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>bimanual
  File "/home/xingyu/venv_dl/lib/python3.6/site-packages/python_pcl-0.3.0rc1-py3.6-linux-x86_64.egg/pcl/__init__.py", line 2, in <module>                                                                                                
    from ._pcl import *                                                                                                                                                                                                                  
ImportError: /home/xingyu/venv_dl/lib/python3.6/site-packages/python_pcl-0.3.0rc1-py3.6-linux-x86_64.egg/pcl/_pcl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK3pcl6search6SearchINS_12PointXYZRGBAEE7getNameEv 

My environemnt is:
Ubuntu 18.04
libpcl-dev 1.8.1
cython 0.25.2
numpy 1.18.4
python 3.6.9
vtk 6.3

Can anyone suggest any debugging steps from here?

@Jovian-Dsouza
Copy link

Jovian-Dsouza commented Feb 8, 2021

I followed the solutions posted by @yanqd0 , @the-faboratory and @Jovian-Dsouza, but that did not solve the problem. While the build is complete, when importing pcl, it throws out the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>bimanual
  File "/home/xingyu/venv_dl/lib/python3.6/site-packages/python_pcl-0.3.0rc1-py3.6-linux-x86_64.egg/pcl/__init__.py", line 2, in <module>                                                                                                
    from ._pcl import *                                                                                                                                                                                                                  
ImportError: /home/xingyu/venv_dl/lib/python3.6/site-packages/python_pcl-0.3.0rc1-py3.6-linux-x86_64.egg/pcl/_pcl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK3pcl6search6SearchINS_12PointXYZRGBAEE7getNameEv 

My environemnt is:
Ubuntu 18.04
libpcl-dev 1.8.1
cython 0.25.2
numpy 1.18.4
python 3.6.9
vtk 6.3

Can anyone suggest any debugging steps from here?

You may need to lower numpy version to 1.16.6

sudo pip uninstall numpy
pip install numpy==1.16.6

@Xingyu-Lin
Copy link

Thanks! You just save my day!

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

Successfully merging a pull request may close this issue.