happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 650 forks source link

error in compiling caffe on linux {hotspot_layer} #310

Open robosina opened 5 years ago

robosina commented 5 years ago

I want to make caffe on ubunut 16.04.3 but I get some error that I can't find in like issue in google.my system config is as below:

opencv version 3 cuda version 9 cudnn version 7

the error I get is

92 errors detected in the compilation of "/tmp/tmpxft_00004404_00000000-6_hotspot_layer.cpp1.ii". Makefile:594: recipe for target '.build_release/cuda/src/caffe/layers/hotspot_layer.o' failed make: *** [.build_release/cuda/src/caffe/layers/hotspot_layer.o] Error 1

robosina commented 5 years ago

I solve it with upgrading gcc to version 6.

for upgrading gcc you can use below commands.(link to source)

sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt-get update && \
sudo apt-get install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v