CMake linking issue

Bug #1694397 reported by Juraj
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vtk6 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am trying to build an application which uses PCL on
Ubuntu 17.04 and I am getting CMake linker errors. Here's a minimal
working example:

CMakeLists:

cmake_minimum_required(VERSION 3.3)
project(example)

add_executable(${PROJECT_NAME} main.cpp)

# PCL
find_package(PCL REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC ${PCL_LIBRARIES})

main.cpp is just int main() { return 0; }.

CMake reports this:

CMake Warning at CMakeLists.txt:4 (add_executable):
  Cannot generate a safe runtime search path for target example because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libmpi.so] in /usr/lib may be hidden by files in:
      /usr/lib/x86_64-linux-gnu/openmpi/lib

  Some of these libraries may not be found correctly.

Make fails with:

*** No rule to make target '/usr/lib/libmpi.so', needed by 'example'.

I've found a hack-ish remedy for the problem: remove "/usr/lib/libmpi.so" from VTK_LIBRARIES in
/usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: libpcl-dev 1.8.0+dfsg1-4ubuntu4 [modified: usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake]
ProcVersionSignature: Ubuntu 4.10.0-21.23-generic 4.10.11
Uname: Linux 4.10.0-21-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
CurrentDesktop: Unity:Unity7
Date: Tue May 30 10:26:24 2017
InstallationDate: Installed on 2017-05-29 (0 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: pcl
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Juraj (ojura) wrote :
Revision history for this message
Jochen Sprickerhof (v-launchpad-jochen-sprickerhof-de) wrote :
affects: pcl (Ubuntu) → vtk6 (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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