Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link error: cannot find vtkproj4 #1594

Closed
jacquelinekay opened this issue Apr 21, 2016 · 5 comments
Closed

Link error: cannot find vtkproj4 #1594

jacquelinekay opened this issue Apr 21, 2016 · 5 comments

Comments

@jacquelinekay
Copy link

jacquelinekay commented Apr 21, 2016

Greetings,

We are trying to get the pcl/ros packages building in Xenial for the upcoming ROS Kinetic release.

We discovered some link errors building the existing code in Xenial using the libpcl1.7 binary: ros-perception/perception_pcl#119

/usr/bin/ld: cannot find -lvtkproj4

I reproduced the errors with a minimal CMake-only example (no dependencies besides pcl 1.7).

Source: https://gist.github.com/jacquelinekay/de36ff4a398793913e7e96064c893e1b
CMakeLists.txt: https://gist.github.com/jacquelinekay/3158868ccdb044920b31acfdb065b6b6

It appears that when PCLConfig.cmake is generated, the find_vtk function sets VTK_LIBRARIES to a hardcoded list of libraries that includes lvtkproj4, which doesn't exist:
https://github.com/PointCloudLibrary/pcl/blob/master/PCLConfig.cmake.in#L468-Lundefined

(As a side note, there is also a problem where vtk6 cannot locate libproj.so. I needed to manually install libproj-dev to pull in the dynamic library name that vtk was expecting. I will ticket this separately for VTK.)

@jacquelinekay jacquelinekay changed the title Link error: cannot find libproj4 Link error: cannot find vtkproj4 Apr 21, 2016
@jspricke
Copy link
Member

HI Jackie,

that's a bug in vtk6: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819741. You can ask the Ubuntu maintainers to import the new version from Debian unstable.

Cheers Jochen

@swiss-knight
Copy link

Hi,
as mention above by @hobu I encountered this /usr/bin/ld: cannot find -lvtkproj4 error several times while compiling PDAL with PCL support.

I installed PCL libraries from the official Xenial repositories.

The "macro(find_vtk)" in the file /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake is slightly different from the one mentioned by @jacquelinekay.
Here is this macro part in mine : http://pastebin.com/raw/r5JV02tL (I have separated the lib names by new lines for more readability).

I'm using Ubuntu 16.04 kernel 4.4.0-28-generic.

Is there something I can do to fix this ?
Thanks.

@hobu
Copy link

hobu commented Mar 3, 2017

For those trying to get PDAL to work, this is dirty hackery, but it should allow things to link without being too disruptive (no touching cmake configs)

ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/libvtkproj4.so

@fernandojunior
Copy link

To fix the following error when execute cmake in Ubuntu 16.04:

-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:

Install python-vtk6 and create a link:

ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so

ykhedar pushed a commit to laxnpander/OpenREALM that referenced this issue May 28, 2020
ykhedar pushed a commit to laxnpander/OpenREALM that referenced this issue May 28, 2020
Another try to solve the link problem:
PointCloudLibrary/pcl#1594
kyrofa added a commit to kyrofa/pcl-sru-test that referenced this issue Nov 20, 2020
Borrowed from PointCloudLibrary/pcl#1594

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kmushegi
Copy link

kmushegi commented Dec 8, 2020

If you're working with ROS the symlink that worked for me is below! thanks to @fernandojunior for the initial pointer.

ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0

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

No branches or pull requests

6 participants