NVCC does not support Apple Clang version 8.x #1384

Closed
mlloreda opened this Issue Apr 14, 2016 · 37 comments

Comments

Projects
None yet
@mlloreda
Member

mlloreda commented Apr 14, 2016

Error message: nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported

Steps to fix:

  1. Log in to https://developer.apple.com/downloads/
  2. Download Xcode CLT (Command Line Tools) 7.3
  3. Install CLT
  4. Run sudo xcode-select --switch /Library/Developer/CommandLineTools
  5. Verify that clang has been downgraded via clang --version

Source: http://stackoverflow.com/a/36590330/701646

Edit: Update to 7.3 and fail at 8.0

@shehzan10

This comment has been minimized.

Show comment
Hide comment
@shehzan10

shehzan10 May 27, 2016

Member

This issue does not affect CUDA >= 8.0

Member

shehzan10 commented May 27, 2016

This issue does not affect CUDA >= 8.0

@samedling

This comment has been minimized.

Show comment
Hide comment
@samedling

samedling Sep 28, 2016

First of all, CUDA 8.0 isn't widely available yet as it hasn't been officially released. Second, even CUDA 8 doesn't work with the current version of the Apple LLVM (version 8.0.0). It produces the following error message:
nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported

First of all, CUDA 8.0 isn't widely available yet as it hasn't been officially released. Second, even CUDA 8 doesn't work with the current version of the Apple LLVM (version 8.0.0). It produces the following error message:
nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported

@gmachiraju

This comment has been minimized.

Show comment
Hide comment
@gmachiraju

gmachiraju Sep 28, 2016

^Running into the same error message, @samedling

^Running into the same error message, @samedling

@shehzan10

This comment has been minimized.

Show comment
Hide comment
@shehzan10

shehzan10 Sep 28, 2016

Member

Thanks for your feedback. Unfortunately, this is an issue for CUDA to handle rather than ArrayFire. We are just a consumer on this front. That's why we have marked it as a known issue.

CUDA 8 has been release as of today. However, as far as I can see, there is no download available for OSX.

Member

shehzan10 commented Sep 28, 2016

Thanks for your feedback. Unfortunately, this is an issue for CUDA to handle rather than ArrayFire. We are just a consumer on this front. That's why we have marked it as a known issue.

CUDA 8 has been release as of today. However, as far as I can see, there is no download available for OSX.

@shehzan10 shehzan10 added the OSX label Oct 12, 2016

@shehzan10

This comment has been minimized.

Show comment
Hide comment
@shehzan10

shehzan10 Oct 12, 2016

Member

CUDA 8 for OSX has been released and supports clang version 7.3.
It however does NOT support XCode 8/Clang 8.

Editing this issue to reflect that.

Member

shehzan10 commented Oct 12, 2016

CUDA 8 for OSX has been released and supports clang version 7.3.
It however does NOT support XCode 8/Clang 8.

Editing this issue to reflect that.

@shehzan10 shehzan10 changed the title from NVCC does not support Apple Clang version 7.3 to NVCC does not support Apple Clang version 8.x Oct 12, 2016

@henrythung

This comment has been minimized.

Show comment
Hide comment
@henrythung

henrythung Oct 25, 2016

Downloaded CLT from https://developer.apple.com/download/more/.
another issue occurred:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Downloaded CLT from https://developer.apple.com/download/more/.
another issue occurred:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

@mlloreda

This comment has been minimized.

Show comment
Hide comment
Member

mlloreda commented Oct 26, 2016

@nnop nnop referenced this issue in nnop/notes Nov 20, 2016

Open

build Caffe on macOS #26

@Sitin

This comment has been minimized.

Show comment
Hide comment
@Sitin

Sitin Nov 23, 2016

I have CUDA 8.0.46, OS X 10.12 and Xcode 8.1 but still have the same issue.

Sitin commented Nov 23, 2016

I have CUDA 8.0.46, OS X 10.12 and Xcode 8.1 but still have the same issue.

@adam-erickson

This comment has been minimized.

Show comment
Hide comment
@adam-erickson

adam-erickson Nov 27, 2016

To switch Xcode CLT back to 8.1 run this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

adam-erickson commented Nov 27, 2016

To switch Xcode CLT back to 8.1 run this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

@pavanky

This comment has been minimized.

Show comment
Hide comment
@pavanky

pavanky Nov 28, 2016

Member

@Sitin the issue description says you need to downgrade to 7.3 for CUDA to work.

Member

pavanky commented Nov 28, 2016

@Sitin the issue description says you need to downgrade to 7.3 for CUDA to work.

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda Dec 8, 2016

Member

Great news - CUDA 8.0.55 now supports Xcode 8!

Those of you who downgraded to CLT 7.3 need to upgrade to CLT 8.x, otherwise building the CUDA backend will fail due to a missing <string.h>.

Member

mlloreda commented Dec 8, 2016

Great news - CUDA 8.0.55 now supports Xcode 8!

Those of you who downgraded to CLT 7.3 need to upgrade to CLT 8.x, otherwise building the CUDA backend will fail due to a missing <string.h>.

@mlloreda mlloreda closed this Dec 8, 2016

@kylemcdonald kylemcdonald referenced this issue in davisking/dlib Feb 13, 2017

Closed

Cannot build with CUDA/cuDNN on OSX #289

@pluskid pluskid referenced this issue in apache/incubator-mxnet Mar 17, 2017

Closed

Upgrade DMLC-Core and OSX Travis build #5459

@joseph-zhong

This comment has been minimized.

Show comment
Hide comment
@joseph-zhong

joseph-zhong Apr 4, 2017

I now get

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported

Through clang --version I see the following

Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I have Xcode and CLT both installed and am not sure what to do?

I now get

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported

Through clang --version I see the following

Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I have Xcode and CLT both installed and am not sure what to do?

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda Apr 4, 2017

Member

@joseph-zhong, it looks like you're using Xcode 8.3, which CUDA (v8.0.61) does not yet support. :(

Downgrading to CLT 8.2 should work.

For reference:

  1. Log in to https://developer.apple.com/downloads/
  2. Download Xcode CLT (Command Line Tools) 8.2
  3. Install CLT
  4. Run sudo xcode-select --switch /Library/Developer/CommandLineTools
  5. Verify that clang has been downgraded via clang --version
Member

mlloreda commented Apr 4, 2017

@joseph-zhong, it looks like you're using Xcode 8.3, which CUDA (v8.0.61) does not yet support. :(

Downgrading to CLT 8.2 should work.

For reference:

  1. Log in to https://developer.apple.com/downloads/
  2. Download Xcode CLT (Command Line Tools) 8.2
  3. Install CLT
  4. Run sudo xcode-select --switch /Library/Developer/CommandLineTools
  5. Verify that clang has been downgraded via clang --version

@mlloreda mlloreda reopened this Apr 4, 2017

@HiCraigChen

This comment has been minimized.

Show comment
Hide comment
@HiCraigChen

HiCraigChen Apr 4, 2017

Thanks a lot, @mlloreda
I have the same problem when I install tensorflow GPU version

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported

I did your method step by step and it worked !

Thanks a lot, @mlloreda
I have the same problem when I install tensorflow GPU version

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported

I did your method step by step and it worked !

@kwccoin

This comment has been minimized.

Show comment
Hide comment
@kwccoin

kwccoin Apr 15, 2017

work for both Mac Pro and MacBook Pro until 10.12 as long as using switch above and not the latest clang version (7.x and 8.2 both ok)

80100 can work with some nvcc programs

I used "80100" and nvcc work for some of my other programs.

... but not sample

`

...
nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported
...

`

install CLT 8.2 it is sort of ok with message about "command line tools instance"

I google and see this discussion and thanks the hint to switch to CLT 8.2. It is sort of ok with warning message about "command line tools instance"

Need to use "sudo make" to compile sample code:

`
...
$ sudo make
Password:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
expr: syntax error

/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin g++ -I../../common/inc  -m64  -Xcompiler -arch -Xcompiler x86_64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o deviceQuery.o -c deviceQuery.cpp

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin g++   -m64  -Xcompiler -arch -Xcompiler x86_64  -Xlinker -rpath -Xlinker /Developer/NVIDIA/CUDA-8.0/lib  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o deviceQuery deviceQuery.o 

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

mkdir -p ../../bin/x86_64/darwin/release

cp deviceQuery ../../bin/x86_64/darwin/release

$ ./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)
...

`

kwccoin commented Apr 15, 2017

work for both Mac Pro and MacBook Pro until 10.12 as long as using switch above and not the latest clang version (7.x and 8.2 both ok)

80100 can work with some nvcc programs

I used "80100" and nvcc work for some of my other programs.

... but not sample

`

...
nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported
...

`

install CLT 8.2 it is sort of ok with message about "command line tools instance"

I google and see this discussion and thanks the hint to switch to CLT 8.2. It is sort of ok with warning message about "command line tools instance"

Need to use "sudo make" to compile sample code:

`
...
$ sudo make
Password:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
expr: syntax error

/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin g++ -I../../common/inc  -m64  -Xcompiler -arch -Xcompiler x86_64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o deviceQuery.o -c deviceQuery.cpp

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin g++   -m64  -Xcompiler -arch -Xcompiler x86_64  -Xlinker -rpath -Xlinker /Developer/NVIDIA/CUDA-8.0/lib  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o deviceQuery deviceQuery.o 

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

mkdir -p ../../bin/x86_64/darwin/release

cp deviceQuery ../../bin/x86_64/darwin/release

$ ./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)
...

`

@Isachenko

This comment has been minimized.

Show comment
Hide comment
@Isachenko

Isachenko Apr 26, 2017

Hi have the same problem, have tried @mlloreda solution.
But after I switched to version 8.2 I got error message
"nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X."
after running make command.
Looks like it try to run gcc instead of clang now. Don't know what to do.

Hi have the same problem, have tried @mlloreda solution.
But after I switched to version 8.2 I got error message
"nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X."
after running make command.
Looks like it try to run gcc instead of clang now. Don't know what to do.

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda Apr 26, 2017

Member

@Isachenko have CC or CXX been set on your system?

Member

mlloreda commented Apr 26, 2017

@Isachenko have CC or CXX been set on your system?

@Isachenko

This comment has been minimized.

Show comment
Hide comment
@Isachenko

Isachenko Apr 26, 2017

@mlloreda no, both this variables are empty, if I understand you right.

@mlloreda no, both this variables are empty, if I understand you right.

@NataliaDiaz

This comment has been minimized.

Show comment
Hide comment
@NataliaDiaz

NataliaDiaz Apr 28, 2017

I still get the same error when following the downgrading steps (in the last step installing Torch ./install.sh):

`
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o

make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o

make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.
`

I still get the same error when following the downgrading steps (in the last step installing Torch ./install.sh):

`
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o

make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
nvcc fatal : The version ('80100') of the host compiler ('Apple clang') is not supported
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
Error generating
/Users/natalia/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o

make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.
`

@pavanky

This comment has been minimized.

Show comment
Hide comment
@pavanky

pavanky Apr 28, 2017

Member

@NataliaDiaz What is the version of CUDA you have ?

Member

pavanky commented Apr 28, 2017

@NataliaDiaz What is the version of CUDA you have ?

@NataliaDiaz

This comment has been minimized.

Show comment
Hide comment
@NataliaDiaz

NataliaDiaz Apr 28, 2017

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep_18_22:16:08_CDT_2016
Cuda compilation tools, release 8.0, V8.0.46

on OS X Sierra

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep_18_22:16:08_CDT_2016
Cuda compilation tools, release 8.0, V8.0.46

on OS X Sierra

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda Apr 28, 2017

Member

@NataliaDiaz what does clang --version return?

Member

mlloreda commented Apr 28, 2017

@NataliaDiaz what does clang --version return?

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda Apr 28, 2017

Member

@Isachenko next step would be to check your symlinks. Make sure that you are pointing to clang and not gcc.

Member

mlloreda commented Apr 28, 2017

@Isachenko next step would be to check your symlinks. Make sure that you are pointing to clang and not gcc.

@pavanky

This comment has been minimized.

Show comment
Hide comment
@pavanky

pavanky Apr 29, 2017

Member

@NataliaDiaz you need v8.0.61, please check the nvidia website and download the right version.

Member

pavanky commented Apr 29, 2017

@NataliaDiaz you need v8.0.61, please check the nvidia website and download the right version.

@NataliaDiaz

This comment has been minimized.

Show comment
Hide comment
@NataliaDiaz

NataliaDiaz Apr 29, 2017

My clang version is Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

My clang version is Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda May 1, 2017

Member

@NataliaDiaz you have two options:

  1. Update to the latest CUDA (v8.0.61) or
  2. Downgrade to CLT 7.3
Member

mlloreda commented May 1, 2017

@NataliaDiaz you have two options:

  1. Update to the latest CUDA (v8.0.61) or
  2. Downgrade to CLT 7.3
@guillochon

This comment has been minimized.

Show comment
Hide comment
@guillochon

guillochon May 1, 2017

@mlloreda I logged into the the Apple Developer page but your direct link to XCT 8.2 redirects me to https://developer.apple.com/unauthorized/. Instead people should visit https://developer.apple.com/download/more/ and search the list there for XCT 8.2.

@mlloreda I logged into the the Apple Developer page but your direct link to XCT 8.2 redirects me to https://developer.apple.com/unauthorized/. Instead people should visit https://developer.apple.com/download/more/ and search the list there for XCT 8.2.

@mlloreda

This comment has been minimized.

Show comment
Hide comment
@mlloreda

mlloreda May 1, 2017

Member

@guillochon interesting - the link still works for me after logging in but thanks for the heads up!

Member

mlloreda commented May 1, 2017

@guillochon interesting - the link still works for me after logging in but thanks for the heads up!

@NataliaDiaz

This comment has been minimized.

Show comment
Hide comment
@NataliaDiaz

NataliaDiaz May 2, 2017

@vchuravy vchuravy referenced this issue in JuliaArchive/CUDArt.jl May 8, 2017

Merged

Work around Mac OSX missing nvidia-smi #86

@derwentx

This comment has been minimized.

Show comment
Hide comment
@derwentx

derwentx May 22, 2017

To anyone stuck on this. Even though you might change the xcode version with xcode-select, and your clang version might say it's an older version, for some reason the compiler that ends up being used is still the latest version of XCode. Renaming the latest version of xcode.app to xcode_<new_version>.app after installing the older version to xcode_<old_version>.app fixed this for me.

Other things to try:
If you see this message somewhere in the failed compile
Automatic GPU detection failed. Building for common architectures.
re-install CUDA toolkit AFTER changing XCode versions and restarting your computer:

derwentx commented May 22, 2017

To anyone stuck on this. Even though you might change the xcode version with xcode-select, and your clang version might say it's an older version, for some reason the compiler that ends up being used is still the latest version of XCode. Renaming the latest version of xcode.app to xcode_<new_version>.app after installing the older version to xcode_<old_version>.app fixed this for me.

Other things to try:
If you see this message somewhere in the failed compile
Automatic GPU detection failed. Building for common architectures.
re-install CUDA toolkit AFTER changing XCode versions and restarting your computer:

@adib

This comment has been minimized.

Show comment
Hide comment
@adib

adib Jun 11, 2017

I'm stuck. Both Xcode and CUDA are at their latest release versions.

Xcode 8.3.3

clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix

CUDA Driver version: 8.0.83

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o

adib commented Jun 11, 2017

I'm stuck. Both Xcode and CUDA are at their latest release versions.

Xcode 8.3.3

clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix

CUDA Driver version: 8.0.83

nvcc fatal   : The version ('80100') of the host compiler ('Apple clang') is not supported
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o
@adib

This comment has been minimized.

Show comment
Hide comment
@adib

adib Jun 11, 2017

Uninstalled Xcode 8.3.3, installed Xcode 8.2 into /Applications/Xcode.app and now compilation fails due to a missing header file. CUDA Driver version: 8.0.83

In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
'string.h' file not found
#include <string.h>
         ^
1 error generated.
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o


1 error generated.
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
1 error generated.
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o


1 error generated.
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
1 error generated.
1 error generated.
CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1
CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1
1 error generated.
1 error generated.
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
CMake Error at THC_generated_THCStorage.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2

adib commented Jun 11, 2017

Uninstalled Xcode 8.3.3, installed Xcode 8.2 into /Applications/Xcode.app and now compilation fails due to a missing header file. CUDA Driver version: 8.0.83

In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: In file included from <built-in>:337:
In file included from <command line>:15:
In file included from /usr/local/cuda/include/cuda_runtime.h:116:
/usr/local/cuda/include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
         ^
'string.h' file not found
#include <string.h>
         ^
1 error generated.
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o


1 error generated.
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
1 error generated.
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o


1 error generated.
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
1 error generated.
1 error generated.
CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1
CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1
1 error generated.
1 error generated.
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
CMake Error at THC_generated_THCStorage.cu.o.cmake:207 (message):
  Error generating
  /Users/adib/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o


make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2
@LegendaryKim

This comment has been minimized.

Show comment
Hide comment
@LegendaryKim

LegendaryKim Jun 16, 2017

I made it with "NVIDIA CUDA Installation Guide for Mac OS X
1.1. System Requirements" in Cuda Toolkit Documantation.

My operation is MacOS 10.12.5
and I did downgrade X_Code to X_Code 8.2

  1. Download X_Code 8.2
  2. Unzip "Xcode_8.2.xip" and movie it to "Application folder" as /Applications/Xcode_8.2.app
  3. Run sudo xcode-select -s /Applications/Xcode_8.2.app/Contents/Developer
  4. Check version by Run /usr/bin/cc --version, it should be Apple LLVM version 8.0.0

I made it with "NVIDIA CUDA Installation Guide for Mac OS X
1.1. System Requirements" in Cuda Toolkit Documantation.

My operation is MacOS 10.12.5
and I did downgrade X_Code to X_Code 8.2

  1. Download X_Code 8.2
  2. Unzip "Xcode_8.2.xip" and movie it to "Application folder" as /Applications/Xcode_8.2.app
  3. Run sudo xcode-select -s /Applications/Xcode_8.2.app/Contents/Developer
  4. Check version by Run /usr/bin/cc --version, it should be Apple LLVM version 8.0.0
@EliezerIsrael

This comment has been minimized.

Show comment
Hide comment
@EliezerIsrael

EliezerIsrael Jul 2, 2017

After downgrading XCode to 8.2, I found that I had to clear out the build directory and start the build from scratch.

After downgrading XCode to 8.2, I found that I had to clear out the build directory and start the build from scratch.

@fredRos fredRos referenced this issue in mtazzari/galario Jul 3, 2017

Closed

Mac OS peculiarities: nvcc/clang/gcc #30

@alykhantejani alykhantejani referenced this issue in pytorch/pytorch Jul 7, 2017

Closed

mac build fail. #1999

@pabloheimplatz pabloheimplatz referenced this issue in pytorch/pytorch Sep 11, 2017

Closed

Install from source error #2682

@pabloheimplatz

This comment has been minimized.

Show comment
Hide comment
@pabloheimplatz

pabloheimplatz Sep 11, 2017

@derwentx thanks a lot! Your tip to rename the newer version helped me to solve this issue here.
(and I ran straight into the next problem... (pytorch/pytorch#2682)

@derwentx thanks a lot! Your tip to rename the newer version helped me to solve this issue here.
(and I ran straight into the next problem... (pytorch/pytorch#2682)

@gaoyangyiqiao

This comment has been minimized.

Show comment
Hide comment
@gaoyangyiqiao

gaoyangyiqiao Nov 6, 2017

@mlloreda It works well for me!Thanks a lot!

@mlloreda It works well for me!Thanks a lot!

@davidwowa

This comment has been minimized.

Show comment
Hide comment
@davidwowa

davidwowa Jan 9, 2018

Note that the CUDA 9.1 driver supports macOS 10.13. This means that existing CUDA applications can be run on Mac systems with CUDA 9.1 installed, however new CUDA applications cannot be compiled with CUDA 9.1 on macOS 10.13.

Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#ixzz53drQrgjs
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

Note that the CUDA 9.1 driver supports macOS 10.13. This means that existing CUDA applications can be run on Mac systems with CUDA 9.1 installed, however new CUDA applications cannot be compiled with CUDA 9.1 on macOS 10.13.

Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#ixzz53drQrgjs
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

@9prady9 9prady9 closed this May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment