1

Sorry for this question. I can already see that this has been asked several times. In fact, I think I found my answer at How to build CUDA 8 samples with gcc 5?

But I want to make sure that if I implement said solution (which I describe below) that this would not alter how other things work. To be honest, I am not entirely sure what the GNU is aside from what I get from googling it.

But to give some background, I have been trying to install the gpu support for xgboost on this site: https://xgboost.readthedocs.io/en/latest/build.html

The instructions are easy enough and are detailed below

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; make -j4
mkdir build
cd build
cmake .. -DUSE_CUDA=ON
make -j

When I get to

make -j

I get

mikedoho@RadMD:~/xgboost/build$ make -j
[  4%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/objective/gpuxgboost_generated_regression_obj_gpu.cu.o
[  4%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/common/gpuxgboost_generated_host_device_vector.cu.o
[  4%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/linear/gpuxgboost_generated_updater_gpu_coordinate.cu.o
[  7%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu_hist.cu.o
[  9%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/predictor/gpuxgboost_generated_gpu_predictor.cu.o
[  9%] Building NVCC (Device) object CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu.cu.o
[ 16%] Built target rabit
[ 33%] Built target dmlc
[ 93%] Built target objxgboost
In file included from /usr/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/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 gpuxgboost_generated_host_device_vector.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/common/./gpuxgboost_generated_host_device_vector.cu.o


CMakeFiles/gpuxgboost.dir/build.make:63: recipe for target 'CMakeFiles/gpuxgboost.dir/src/common/gpuxgboost_generated_host_device_vector.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/common/gpuxgboost_generated_host_device_vector.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMake Error at gpuxgboost_generated_updater_gpu.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/tree/./gpuxgboost_generated_updater_gpu.cu.o


CMakeFiles/gpuxgboost.dir/build.make:91: recipe for target 'CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu.cu.o] Error 1
CMake Error at gpuxgboost_generated_gpu_predictor.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/predictor/./gpuxgboost_generated_gpu_predictor.cu.o


CMakeFiles/gpuxgboost.dir/build.make:84: recipe for target 'CMakeFiles/gpuxgboost.dir/src/predictor/gpuxgboost_generated_gpu_predictor.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/predictor/gpuxgboost_generated_gpu_predictor.cu.o] Error 1
CMake Error at gpuxgboost_generated_updater_gpu_coordinate.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/linear/./gpuxgboost_generated_updater_gpu_coordinate.cu.o


CMakeFiles/gpuxgboost.dir/build.make:70: recipe for target 'CMakeFiles/gpuxgboost.dir/src/linear/gpuxgboost_generated_updater_gpu_coordinate.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/linear/gpuxgboost_generated_updater_gpu_coordinate.cu.o] Error 1
CMake Error at gpuxgboost_generated_updater_gpu_hist.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/tree/./gpuxgboost_generated_updater_gpu_hist.cu.o


CMake Error at gpuxgboost_generated_regression_obj_gpu.cu.o.Release.cmake:219 (message):
  Error generating
  /home/mikedoho/xgboost/build/CMakeFiles/gpuxgboost.dir/src/objective/./gpuxgboost_generated_regression_obj_gpu.cu.o


CMakeFiles/gpuxgboost.dir/build.make:98: recipe for target 'CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu_hist.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/tree/gpuxgboost_generated_updater_gpu_hist.cu.o] Error 1
CMakeFiles/gpuxgboost.dir/build.make:77: recipe for target 'CMakeFiles/gpuxgboost.dir/src/objective/gpuxgboost_generated_regression_obj_gpu.cu.o' failed
make[2]: *** [CMakeFiles/gpuxgboost.dir/src/objective/gpuxgboost_generated_regression_obj_gpu.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gpuxgboost.dir/all' failed
make[1]: *** [CMakeFiles/gpuxgboost.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Now the solution I found at How to build CUDA 8 samples with gcc 5?

mentioned that I should do

sudo ln -s /usr/bin/gcc-5 /usr/local/cuda-8.0/bin/gcc
sudo ln -s /usr/bin/g++-5 /usr/local/cuda-8.0/bin/g++

Now I would imagine I would have to change gcc-5 and g++-5 to 6 and cuda-8.0 to cuda-9.1 for this to work for me but I want to make sure that this would not affect other things work like tensorflow (the original reason I have CUDA). I apologize it may not even affect that but I want to make sure.

MikeDoho
  • 552
  • 2
  • 5
  • 18
  • Yeah but I already have a newer version and am not sure if downgrading will hurt others stuff – MikeDoho Jul 23 '18 at 12:10
  • Plus I already tried downloading the older one and all I get is a message stating I have a newer version – MikeDoho Jul 23 '18 at 12:11
  • You *must* use a supported version of gcc with CUDA. It won't work if you don't. It is that simple – talonmies Jul 23 '18 at 12:24
  • Ok so if I understand you correctly then my gcc version and my cuda version are already incompatible and downgrading the gcc wont affect other things I have cuda for (tensorflow) – MikeDoho Jul 23 '18 at 12:41
  • I'm not saying that at all. I am telling you that you must use a supported version of gcc for whatever CUDA toolkit version you want to use. Downgrading the system compiler might well break a lot of things. Or it might not. It is normally perfectly feasible to have multiple compiler versions installed and the question you linked to has several solutions for how to use a non-system gcc version with nvcc. – talonmies Jul 23 '18 at 12:49
  • Ok thank you for your time. I will pursue this further after work but this was helpful to hear that I have to be careful with this process. It looks like then the sudo code that I have at the bottom might not work (even after i change it to match the version that I want and have) – MikeDoho Jul 23 '18 at 12:55

0 Answers0