解决困难的编译问题 [英] Solving a difficult compilation issue

查看:169
本文介绍了解决困难的编译问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,

首先,我有一台运行Mavericks的Mac,并且尝试将PCL(点云库)构建为ROS的一部分.

First up, I have a mac running Mavericks, and I am attempting to build PCL (Point Cloud Library) as part of ROS.

这是失败的命令:

cd /Users/X/ros_catkin_ws/build_isolated/pcl_ros && /Users/X/ros_catkin_ws/install_isolated/env.sh cmake -vd /Users/X/ros_catkin_ws/src/perception_pcl/pcl_ros -DCATKIN_DEVEL_PREFIX=/Users/X/ros_catkin_ws/devel_isolated/pcl_ros -DCMAKE_INSTALL_PREFIX=/Users/X/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release 

使用:

CMake Error at /usr/local/share/pcl-1.8/PCLConfig.cmake:47 (message):
  simulation is required but glew was not found
Call Stack (most recent call first):
  /usr/local/share/pcl-1.8/PCLConfig.cmake:500 (pcl_report_not_found)
  /usr/local/share/pcl-1.8/PCLConfig.cmake:663 (find_external_library)
  CMakeLists.txt:8 (find_package)

现在,我已经尽力调试了.在网上查找时,我注意到发生这种情况的原因是在Mavericks中不再存在GLEW.framework https://github.com/PointCloudLibrary/pcl/issues/492

Now, I have done what I can to debug this. Looking up online, I notice this is happening due to the fact that in Mavericks, there is no longer the GLEW.framework https://github.com/PointCloudLibrary/pcl/issues/492

因此,我是通过brew安装的,但是仍然遇到相同的问题.现在,我在想,也许cmake找不到它,所以我创建了自己的cmake项目,并尝试添加find_package(glew).似乎在这里找到了这个包:

Hence, I installed it via brew, and yet I still get the same issue. Now, I'm thinking, perhaps cmake cannot find it, so I created my own cmake project, and attempted to add find_package(glew). It seems to have found the package here:

-- Found GLEW: /usr/local/include  

因此,我在$ PATH变量中包含了/usr/local/include.再一次,它似乎因相同的错误而失败.我有点迷失在这里,并且不确定如何继续. 我正在推测,在上面的命令中,似乎env.sh似乎以某种方式更改了环境变量,使得它找不到毛病.

Hence, I included /usr/local/include in my $PATH variable. Yet once again, it seems to fail with the same error. I am kind of at a lost here, and am not sure how to continue. I am speculating that in the command above, it seems that somehow the env.sh there seems to change the environmental variables such that it can't find glew.

有什么想法吗?

更荒谬.我创建了一个CMake文件,并包含了find_package(PCL).它完美地工作. WTF?它甚至说发现了毛病

Found Glew: -framework GLEW;-framework Cocoa

它如何在我的Cmake文件中起作用,但在他们的文件中却不起作用?是什么原因造成的

How come it works in my Cmake file, but not in theirs? What might cause this

推荐答案

标兵.我去了pcl_ros文件夹,并且glew include目录指向Glew.Framework,从OSX 10.8开始不推荐使用!

Bastards. I went to the pcl_ros folder, and the glew include directory was pointing to Glew.Framework, which is deprecated as of OSX 10.8!

卑鄙小牛!我只是将其指向了正确的包含目录,对我来说是:

Scumbag Mavericks! I simply pointed it to the correct glew include directory, which for me is:

/usr/local/Cellar/glew/1.11.0/include/GL

/usr/local/Cellar/glew/1.11.0/include/GL

这篇关于解决困难的编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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