dlandon / zoneminder.machine.learning

Zoneminder Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while compiling openCV with GPU support: "unsupported GNU version! gcc versions later than 8 are not supported!"

yetkinergun opened this issue · comments

Is anyone else seeing this error while running opencv.sh?

unsupported GNU version! gcc versions later than 8 are not supported!

I am on Unraid 6.8.3 and using the below packages:

CUDNN_RUN=libcudnn7_7.6.5.32-1+cuda10.2_amd64.deb
CUDNN_DEV=libcudnn7-dev_7.6.5.32-1+cuda10.2_amd64.deb
CUDA_TOOL=cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
CUDA_PIN=cuda-ubuntu1804.pin
CUDA_KEY=/var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
CUDA_VER=10.2

The way I solved it was to force the script to download and use gcc version 8 because that is the compatible version against Cuda 10.2.

I added

# download the right gcc version
MAX_GCC_VERSION=8
apt-get -y install gcc-$MAX_GCC_VERSION g++-$MAX_GCC_VERSION
ln -sf /usr/bin/gcc-$MAX_GCC_VERSION /usr/local/cuda/bin/gcc
ln -sf /usr/bin/g++-$MAX_GCC_VERSION /usr/local/cuda/bin/g++

before the cmake command, and added -D CUDA_NVCC_FLAGS="-ccbin gcc-$MAX_GCC_VERSION" \ as an argument to the cmake. Seems to be compiling nicely now.

If this is a common error people are seeing, happy to make a PR to add it to the script, @dlandon.

This is not being supported at this time. We will support this when the funding is raised in GoFundMe for the development and maintenance of a new Docker with ES/ML built in.