Public bug reported:

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)

** Affects: pcl (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug zesty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1694397

Title:
  CMake linking issue

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pcl/+bug/1694397/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to