unable to link: cannot find libvtkproj4

Bug #1573234 reported by Jackie Kay
82
This bug affects 14 people
Affects Status Importance Assigned to Milestone
pcl (Debian)
Fix Released
Unknown
pcl (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Kyle Fazzari
vtk6 (Debian)
Fix Released
Unknown
vtk6 (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Kyle Fazzari

Bug Description

[Impact]

 * Any code that links to libraries provided by libpcl1.7 (which depends on vtk6) fails to link because it cannot find vtkproj4 (see https://github.com/PointCloudLibrary/pcl/issues/1594 for example)

 * This has been fixed in Debian, but in a way that breaks ABI

 * See this change through all the way by adding libproj-dev as a dependency to libvtk6-dev, and rebuild pcl such that it uses the system libproj instead of the vtk-vendored libproj

 * IMPORTANT: This fix is a two-patch fix, one for vtk6 (adding the missing dependency) and one for pcl (a no-change rebuild using the earlier patch for vtk6). As a result, they cannot be uploaded into -proposed at the same time. vtk6 must happen first, and pcl only once vtk6 has been built.

[Test Case]

 * apt install libvtk6-dev libpcl-dev
 * git clone https://github.com/kyrofa/pcl-sru-test.git
 * cd pcl-sru-test
 * cmake .
 * make

* You'll first note that it fails to build because it needs libproj-dev installed. Apply the first patch (to vtk) in this SRU, rebuild and install that version of vtk.

* Build again, and you'll note that it fails to link to vtkproj4. This is the libproj that was vendored by vtk, but should not be used at all in Xenial (it's actually building against the system libproj). This is fixed by the second patch (to pcl) in this SRU, a no-change rebuild that causes the cmake config to be regenerated to properly link to the system libproj instead of the vtk-vendored libproj. Rebuild and install that version of pcl.

 * Finally, the build should succeed.

[Where problems could occur]

 * This patch doesn't change ABI or API, but does add a dependency

 * Problems could potentially occur if clients worked around this issue by hacking their projects to link to vtkproj, but known users (ROS) have vendored Debian's fix into their repos as opposed to working around the bug, thus regressions seem unlikely

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vtk6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Luke (luke-bloy) wrote :

While not a solution to the bug, as a stopgap you can remove the attempt to link to vtkproj4 from your project by removing it from the libraries you are linking too.

in your cmakelists.txt you can add

list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

if you are using PCL, or presumably if you are using VTK directly you could add

list(REMOVE_ITEM VTK_LIBRARIES "vtkproj4")

this has allowed me to build simple PCL tutorials etc and presumably would also work with larger projects.

Revision history for this message
Jackie Kay (jacquelinekay1) wrote :

indeed, that's the solution we decided on:

https://github.com/ros-perception/perception_pcl/pull/121/files

Revision history for this message
Hunter Laux (jolting) wrote :

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819741#19

This should be fixed in Yakkety. Can we propose this for Xenial?

Revision history for this message
Hunter Laux (jolting) wrote :

I confirmed that my Yakkety build is fine.

This is also affecting the pcl_perception ROS guys in kinetic.

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Please propose an SRU for Xenial.

Changed in vtk6 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Felix Ruess (flixr) wrote :

So can someone with appropriate rights please propose an SRU for xenial?

Kyle Fazzari (kyrofa)
Changed in vtk6 (Ubuntu Xenial):
status: New → Confirmed
Kyle Fazzari (kyrofa)
Changed in vtk6 (Ubuntu Xenial):
assignee: nobody → Kyle Fazzari (kyrofa)
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Here's a patch that fixes this issue in Xenial

Kyle Fazzari (kyrofa)
description: updated
Kyle Fazzari (kyrofa)
description: updated
Kyle Fazzari (kyrofa)
description: updated
Mathew Hodson (mhodson)
Changed in vtk6 (Ubuntu):
importance: Undecided → Medium
Changed in vtk6 (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Here's a better, less risky patch for vtk6. It requires a no-change rebuild of pcl though in order to properly work.

Changed in pcl (Ubuntu Xenial):
status: New → Confirmed
assignee: nobody → Kyle Fazzari (kyrofa)
importance: Undecided → Medium
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Here's the patch required for pcl (no-change rebuild). It must happen only after vtk6 has been built with the above patch.

Kyle Fazzari (kyrofa)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

So the vtk6 change adds a new dependency, which makes pcl build with the system libproj. While switching pcl to the system libproj may be considered a significant change, nothing much actually uses pcl. The only reverse depends is ros-perception, which is the software this bug is attempting to fix in the first place, so I believe changing this is fine.

ACK on the debdiffs. I've uploaded vtk6 for processing by the SRU team.

Once it has been released, we can do the pcl no-change rebuild.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

My vtk6 upload changes the version string to 6.2.0+dfsg1-10ubuntu0.1 which is more appropriate.

Changed in vtk6 (Ubuntu Xenial):
status: Confirmed → In Progress
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Thank you, Marc!

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Jackie, or anyone else affected,

Accepted vtk6 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/vtk6/6.2.0+dfsg1-10ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in vtk6 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Since vtk6 is finished building in -proposed, I have now uploaded the pcl package which needs a no-change rebuild against vtk6. Please accept it into -proposed as well. Thanks!

Kyle Fazzari (kyrofa)
description: updated
Steve Langasek (vorlon)
description: updated
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Jackie, or anyone else affected,

Accepted pcl into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pcl/1.7.2-14build1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pcl (Ubuntu Xenial):
status: Confirmed → Fix Committed
Mathew Hodson (mhodson)
Changed in pcl (Ubuntu):
status: New → Fix Released
importance: Undecided → Medium
Revision history for this message
Mathew Hodson (mhodson) wrote :

The new build for Xenial would probably fix bug #1704459 as well.

Kyle Fazzari (kyrofa)
description: updated
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Tested this using both the basic test case above using https://github.com/kyrofa/pcl-sru-test as well as the much-more-involved https://github.com/ros-perception/perception_pcl .

Using version 6.2.0+dfsg1-10build1 of libvtk6-dev and version 1.7.2-14build1 of libpcl-dev, both the basic test case as well as perception_pcl fail attempting to link to the system libproj. The error from the latter looks like:

    $ make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by '/home/ubuntu/ws/devel_isolated/pcl_ros/lib/libpcl_ros_surface.so'. Stop.

When I install version 6.2.0+dfsg1-10ubuntu0.1 of libvtk6-dev and version 1.7.2-14build1.1 of libpcl-dev from xenial-proposed, libvtk6-dev also installs libproj-dev and both projects successfully link and build. Marking verification done.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Note that armhf is not building. It already wasn't in the Xenial archive actually due to this bug, but now that this bug is fixed it still isn't building due to this Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798408 . I'll SRU a fix for that separately.

Changed in vtk6 (Debian):
status: Unknown → Fix Released
Changed in pcl (Debian):
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pcl - 1.7.2-14build1.1

---------------
pcl (1.7.2-14build1.1) xenial; urgency=medium

  * No-change rebuild to properly link to vtk6 and libproj (LP: #1573234)

 -- Kyle Fazzari <email address hidden> Tue, 17 Nov 2020 19:40:15 -0800

Changed in pcl (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vtk6 - 6.2.0+dfsg1-10ubuntu0.1

---------------
vtk6 (6.2.0+dfsg1-10ubuntu0.1) xenial; urgency=medium

  * Add libproj-dev as a dependency (LP: #1573234)

 -- Kyle Fazzari <email address hidden> Tue, 17 Nov 2020 19:30:16 -0800

Changed in vtk6 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for pcl has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.