在Ubuntu 16.04上编译PCL 1.7,CMake中的错误生成了Makefile [英] Compiling PCL 1.7 on Ubuntu 16.04 , errors in CMake generated Makefile

查看:3331
本文介绍了在Ubuntu 16.04上编译PCL 1.7,CMake中的错误生成了Makefile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 16.04上运行PCL 1.7(点云库,而不是其他pcl).我最终希望将其用于C ++,但是现在我只是在尝试使示例工作.我正在使用Ubuntu(GNU 5.3.1)和Cmake版本3.5.2附带的默认编译器.我一直遵循PCL网站上的指示(此处

I'm trying to get PCL 1.7 (The point cloud library, not the other pcl) working on Ubuntu 16.04. I eventually hope to use for C++ stuff, but right now I'm just trying to get the examples working. I'm using the default compilers that came with Ubuntu (GNU 5.3.1), and Cmake version 3.5.2. I've been following the directions on PCL's website (here and here), but am currently stuck at the point where I use the 'make' command after letting Cmake build the things it wants to build. This is the error I get

[ 50%] Building CXX object CMakeFiles/pcd_write.dir/pcd_write.cpp.o
<command-line>:0:15: warning: missing whitespace after the macro name
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by 'pcd_write'.  Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pcd_write.dir/all' failed
make[1]: *** [CMakeFiles/pcd_write.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

当我正在构建事物时,Cmake也会警告我,这些都在这里.他们不会阻止它运行,但是可能是相关的.

Cmake also gives me warnings when I'm building things, and those are here. They don't stop it from running, but they might be relevant.

-- Found OpenNI2: /usr/lib/libOpenNI2.so  
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   " /usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
    but not all the files it references.

另外,如果相关的话,当它向我发出有关VTK的类似警告时,我做了一件可能很愚蠢的事情.告诉我/user/bin/vtk已重命名或其他名称,确实如此.此版本的VTK称为vtk6.我试图在makefile文件中查找并更改它,以便Cmake知道要查找vtk6,但是我找不到它,所以我进入了垃圾箱并制作了一个名为vtk的vtk6副本,然后它停止了给我一个警告.

Also, in case it's relevant, I did a potentially stupid thing earlier when it was giving me similar warnings about VTK. It was telling me that /user/bin/vtk was renamed or something, and it was. This version of VTK called itself vtk6. I tried to root around in the makefiles to find that and change it so Cmake would know to look for vtk6, but I couldn't find it anywhere, so I went into the bin and made a copy of vtk6 named vtk, and it stopped giving me a warning.

我正在使用的其他相关版本的东西是eigen3 3.2.92,boost 1.58.0,flan 1.8.4,vtk6和libopenni2 2.2.0.3版本

Other relevant versions of stuff I'm using are eigen3 3.2.92, boost 1.58.0, flan 1.8.4, vtk6, and libopenni2 version 2.2.0.3

再次,不确定其中有多少实际上是重要的,但是比过于模糊的IMO更好,不要过于具体.

Again, not sure how much of this is actually important, but better to be too specific than too vague IMO.

推荐答案

此错误仍在16.04中,但是有一种解决方法.

This bug is still in 16.04, but there is a workaround.

  1. sudo apt install libproj-dev

将以下行添加到您的CMakeLists.txt文件:
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

add the following line to your CMakeLists.txt file:
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

第一个提供了必需的libproj.so,第二个修复了与不存在(且不必要)的libvtkproj4链接时的错误.

The first provides the necessary libproj.so, and the second fixes errors when linking against a nonexistent (and unnecessary) libvtkproj4.

关于不存在的引用文件的其他错误似乎是无害的(或者尽管存在相同的错误,但至少我的项目可以编译).

The other errors about referenced files not existing appear to be harmless (or at least my project compiles despite having the same errors).

有关更多信息,请参见:
https://bugs.launchpad.net/ubuntu/+source/pcl/+ bug/1573174
https://bugs.launchpad.net/ubuntu/+source/vtk6/+ bug/1573234

for more information, see:
https://bugs.launchpad.net/ubuntu/+source/pcl/+bug/1573174
https://bugs.launchpad.net/ubuntu/+source/vtk6/+bug/1573234

这篇关于在Ubuntu 16.04上编译PCL 1.7,CMake中的错误生成了Makefile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆