nvcc on mac osx 10.9不支持的选项 [英] nvcc on mac osx 10.9 unsupported option

查看:1136
本文介绍了nvcc on mac osx 10.9不支持的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试编译任何.cu文件,包括一个简单的Hello World我收到此错误在命令行:

  Agustin $ nvcc -o hello_world hello_world.cu 
clang:错误:不支持的选项'-dumpspecs'
clang:错误:无输入文件

我正在运行OSX Mavericks 10.9



这是Cuda版本:

  nvcc:NVIDIA(R)Cuda编译器驱动程序
版权所有(c)2005-2013 NVIDIA Corporation
Built on Wed_Jul_10_11:16:01_PDT_2013
Cuda编译工具,版本5.5,V5.5.0

文件如下:

  nvcc -o hello_world hello_world.cu -ccbin / usr / bin / clang 



我收到以下错误


/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/_config(191):
error:identifier
_char16_tis undefined



/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../ lib / c ++ / v1 / _ config(192):
错误:标识符
_char32_t未定义



/Applications/Xcode.app/Contents/Developer /Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config(303):
错误:需要一个标识符



应用程序/ Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / bin /../ lib / c ++ / v1 / __ config(303):
错误:inline说明符只允许函数声明



/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../ lib / c ++ / v1 / __ config(304):
错误:期望的表达式



/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../ lib / c ++ / v1 / __config(305):
error:expected a;



.............. 更多类似错误的打印输出



解决方案

尝试更新到新版本的cuda工具包,最近刚刚为OSX 10.9 这里发布。



请务必遵守说明



您可能也对我的回答感兴趣此处


When I try to compile any .cu file including a simple Hello World I get this error on the command line:

Agustin$ nvcc -o hello_world hello_world.cu
clang: error: unsupported option '-dumpspecs'
clang: error: no input files

I'm running OSX Mavericks 10.9

Here is the Cuda version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_10_11:16:01_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0

Also reading on the internet, if I excecuted the file like so:

nvcc -o hello_world hello_world.cu  -ccbin /usr/bin/clang 

I get the following error

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/_config(191): error: identifier "_char16_t" is undefined

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/_config(192): error: identifier "_char32_t" is undefined

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config(303): error: expected an identifier

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config(303): error: inline specifier allowed on function declarations only

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config(304): error: expected an expression

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config(305): error: expected a ";"

.............. And many more lines of similar error printouts

解决方案

Try updating to the new version of the cuda toolkit that was posted just recently for OSX 10.9 here.

Be sure to follow the instructions.

You may also be interested in my answer here.

这篇关于nvcc on mac osx 10.9不支持的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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