우분투 18.04 LTS에서 CUDA 9.0을 다운로드받으면서 torch7을 빌드해야 했다.

 

$ cd ~/torch

$ ./install.sh

 

이 명령어로 빌드를 하던 도중에 아래와 같은 에러가 발생했다.

 

 

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

 

$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10

 

위 명령어로 해결하였다.

 

하지만 또 다른 에러가 발생했다.

 

#error: more than one operator "!=" matches these operands

 

$ export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"

 

이렇게 하면 정상적으로 빌드가 될 것이다.

+ Recent posts