【问题标题】:Installing GPUOCELOT under OSX Lion 10.7在 OS X Lion 10.7 下安装 GPU OCELOT
【发布时间】:2012-07-19 13:47:07
【问题描述】:

我是 stackoverflow 的新手。我的问题是关于 gpuocelet。有人在用吗?它是否适用于 unix(我使用的是带有 os x 10.7 的 macbook air)操作系统?我尝试了多种方式来安装它,但没有成功。我按照这些说明正确安装了 macports 所需的所有软件包http://code.google.com/p/gpuocelot/downloads/detail?name=Ocelot_Installation_manual2.pdf 特别是我通过 macports 安装了 boost 1.50,但是在 gpuocelot 文件夹中运行 ./configure 时出现的错误是:

MacBook-Air-di-Manfredo:downloads manfredo$ cd ocelot-2.0.969/
MacBook-Air-di-Manfredo:ocelot-2.0.969 manfredo$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for main in -lboost_system-mt... no
configure: error: "libboost_system required"
MacBook-Air-di-Manfredo:ocelot-2.0.969 manfredo$

我的路径是

        PATH=/Users/manfredo/downloads/boost_1_42_0/stage/lib:/Users/manfredo/downloads/boost_1_42_0/libs:/Users/manfredo/downloads/boost_1_42_0/libs:/Users/manfredo/downloads/boost_1_42_0/boost/system:/Users/manfredo/downloads/boost_1_42_0/boost:/opt/local/bin:/opt/local/sbin:/opt/local/lib:/usr/local/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

欢迎任何帮助,谢谢。

【问题讨论】:

  • 您是在 /Users/manfredo/downloads/boost_1_42_0/stage/lib 还是在 macports 中使用 Boost - 这不应该在您的路径中,而是在 INCLUDE 和 LIB 环境变量中
  • 谢谢马克,你的回答很有用。我删除了boost的下载文件夹,只使用了macports版本。我在终端 MacBook-Air-di-Manfredo:~ manfredo$ CPLUS_INCLUDE_PATH=/opt/local/include/boost MacBook-Air-di-Manfredo:~ manfredo$ export CPLUS_INCLUDE_PATH MacBook-Air-di-Manfredo 中添加了以下行: ~ manfredo$ LIBRARY_PATH=/opt/local/lib MacBook-Air-di-Manfredo:~ manfredo$ export LIBRARY_PATH 现在找到了 libboost 但它仍然给我一个错误:检查 -lrt 中的 clock_gettime ... 没有配置:错误:“需要librt”

标签: boost cuda emulation gpu


【解决方案1】:

看起来你已经尝试在你的主目录中安装另一个版本的 Boost,因为你已经把它放在你的路径上,而且 Boost 也没有在路径上,但标题应该在 INCLUDE 环境变量中,并且库在lib 变量。

对于 macport,它们分别是 /opt/local/include 和 /opt/local/lib。

例如来自variables that control the build的Cmake

CMAKE_INCLUDE_CURRENT_DIR=/opt/local/include
CMAKE_LIBRARY_PATH_FLAG=/opt/local/lib

【讨论】:

  • 我认为现在 boost 库已正确链接。报告是:检查是否可以安全地定义 EXTENSIONS... 是 检查 -lboost_system-mt 中的 main... 是 检查 -lboost_filesystem-mt 中的 main... 是 检查 main在 -lboost_wserialization-mt... 是检查 main 在 -lboost_serialization-mt... 是 检查 main 在 -lboost_thread-mt... 是 检查 glewInit 在 -lGLEW... 是 检查 clock_gettime 在 -lrt。 .. no configure: error: "librt required" 我找不到关于这个 -librt 库的任何有用信息,你怎么看?谢谢
  • librt 是 Posix 实时库,但不是在 OSX 上,它的所有功能都在主 C 库中,因此您需要编辑 makefile 以将其删除。在stackoverflow.com/questions/1505402/… 上查看我的回答
  • 这篇文章 (groups.google.com/forum/?fromgroups#!topic/gpuocelot/…) 在我看来对于理解在 mac osx 上安装 gpuocelot 的过程很重要,特别是最后一行:“我很快就会得到一个 Linux 机器,所以我放弃了。”可能是最好的办法......
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-01-09
  • 2011-12-04
  • 2011-10-27
  • 2013-09-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多