Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

c++ - nvcc on mac osx 10.9 unsupported option

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...