torch / torch7

http://torch.ch
Other
8.97k stars 2.38k forks source link

Torch not building with gcc 6+ #1123

Open asevans48 opened 6 years ago

asevans48 commented 6 years ago

I simlinked to GCC <5 using the latest Nvidia driver but still get the following error building cutorch with luarocks and at the cutorch step with the basic installer:

n file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!

error -- unsupported GNU version! gcc versions later than 6 are not supported!

^~~~~ CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:70: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed make[2]: [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:77: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1 CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:91: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1 CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:105: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1 CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:63: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1 CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:98: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1 CMake Error at THC_generated_THCStorage.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:84: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o' failed make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1 CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message): Error generating /tmp/luarocks_cutorch-scm-1-2011/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:560: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o' failed make[2]: [lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1 CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed make[1]: [lib/THC/CMakeFiles/THC.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Error: Build error: Failed building.

Anyone know how to resolve this?

tastyminerals commented 6 years ago

Please read the error messages: "unsupported GNU version! gcc versions later than 6 are not supported!". You should build Torch with gcc-4.9.

asevans48 commented 6 years ago

My default is 4.7.2. I symlinked to this. Will it not work then?

tastyminerals commented 6 years ago

Only gcc versions later than 6 are not supported. If you can't build with 4.7 then check if you symlinked it correctly or try 4.9.

Ianmcmill commented 5 years ago

I had the same issue. For whom it may concern here is a HOWTO on how to switch gcc compiler versions for linux beginners. https://codeyarns.com/2015/02/26/how-to-switch-gcc-version-using-update-alternatives/