Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE_C_COMPILER error #2090

Open
nguyen-huong opened this issue Apr 21, 2022 · 1 comment
Open

CMAKE_C_COMPILER error #2090

nguyen-huong opened this issue Apr 21, 2022 · 1 comment

Comments

@nguyen-huong
Copy link

When I tried to do make -jnproc it gives me this error, I think it has to do CUDA 9.0 gcc version being later than 6.0. I tried to downgraded and it gives an unknown compiler identification (second result).

After make -jnproc:
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GCC detected, adding compile flags
-- GCC detected, adding compile flags
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr (found version "9.1")
-- Building with CUDA.
-- CUDA detected: 9.1
-- Found cuDNN: ver. 8.4.0 found (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Added CUDA NVCC flags for: sm_61
-- Found cuDNN: ver. 8.4.0 found (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Found GFlags: /usr/include
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found Glog: /usr/include
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found version "3.20.1")
-- Found OpenCV: /usr (found version "3.2.0")
-- Caffe will be downloaded from source now. NOTE: This process might take several minutes depending
on your internet connection.
-- Caffe has already been downloaded.
HEAD is now at 1807aada Added Ampere arch's (CUDA11)
-- Caffe will be built from source now.
-- Download the models.
-- Downloading BODY_25 model...
-- Model already exists.
-- Not downloading body (COCO) model
-- Not downloading body (MPI) model
-- Downloading face model...
-- Model already exists.
-- Downloading hand model...
-- Model already exists.
-- Models Downloaded.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/huong/openpose/build/UILD
huong@pratyusha-HP-Z840-Workstation:~/openpose/build$ make -jnproc
[ 12%] Performing build step for 'openpose_lib'
[ 1%] Built target caffeproto
[ 2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_base_data_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_conv_layer.cu.o
[ 2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_lcn_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_norm_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_reindex_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_conv_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/util/cuda_compile_1_generated_math_functions.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_crop_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_contrastive_loss_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_accuracy_layer.cu.o
[ 5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_deconv_layer.cu.o
[ 5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_concat_layer.cu.o
[ 5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bnll_layer.cu.o
[ 6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_clip_layer.cu.o
[ 8%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_layer.cu.o
In file included from /usr/include/host_config.h:50:0,
from /usr/include/cuda_runtime.h:78,
from :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 :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 cuda_compile_1_generated_clip_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_clip_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:112: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_clip_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_clip_layer.cu.o] Error 1
make[5]: *** Waiting for unfinished jobs....
CMake Error at cuda_compile_1_generated_contrastive_loss_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_contrastive_loss_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:126: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_contrastive_loss_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_contrastive_loss_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_batch_reindex_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_reindex_layer.cu.o

CMake Error at cuda_compile_1_generated_batch_norm_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_norm_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:91: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_reindex_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_reindex_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_absval_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_absval_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:84: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_norm_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_norm_layer.cu.o] Error 1
src/caffe/CMakeFiles/caffe.dir/build.make:63: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_bnll_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bnll_layer.cu.o

CMake Error at cuda_compile_1_generated_bias_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bias_layer.cu.o

CMake Error at cuda_compile_1_generated_cudnn_lcn_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_cudnn_lcn_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:98: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_layer.cu.o] Error 1
src/caffe/CMakeFiles/caffe.dir/build.make:105: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bnll_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bnll_layer.cu.o] Error 1
src/caffe/CMakeFiles/caffe.dir/build.make:161: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_lcn_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_lcn_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_cudnn_deconv_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_cudnn_deconv_layer.cu.o

CMake Error at cuda_compile_1_generated_base_data_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_base_data_layer.cu.o

CMake Error at cuda_compile_1_generated_conv_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_conv_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:154: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_deconv_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_deconv_layer.cu.o] Error 1
src/caffe/CMakeFiles/caffe.dir/build.make:77: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_base_data_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_base_data_layer.cu.o] Error 1
src/caffe/CMakeFiles/caffe.dir/build.make:133: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_conv_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_conv_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_crop_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_crop_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:140: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_crop_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_crop_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_accuracy_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_accuracy_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:70: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_accuracy_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_accuracy_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_cudnn_conv_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_cudnn_conv_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:147: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_conv_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_cudnn_conv_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_concat_layer.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_concat_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:119: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_concat_layer.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_concat_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_math_functions.cu.o.Release.cmake:219 (message):
Error generating
/home/huong/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/util/./cuda_compile_1_generated_math_functions.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:497: recipe for target 'src/caffe/CMakeFiles/cuda_compile_1.dir/util/cuda_compile_1_generated_math_functions.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile_1.dir/util/cuda_compile_1_generated_math_functions.cu.o] Error 1
CMakeFiles/Makefile2:235: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[4]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/openpose_lib.dir/build.make:110: recipe for target 'caffe/src/openpose_lib-stamp/openpose_lib-build' failed
make[2]: *** [caffe/src/openpose_lib-stamp/openpose_lib-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/openpose_lib.dir/all' failed
make[1]: *** [CMakeFiles/openpose_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

After trying to downgrade: ethereum-mining/ethminer#731

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:19 (project):
The CMAKE_C_COMPILER:

/usr/bin/cc

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:19 (project):
The CMAKE_CXX_COMPILER:

/usr/bin/c++

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

My environment:
Ubuntu18.04
Cuda V9.1.85
Cudnn v8
cmake version 3.15.6
Gcc 7.5.0
G++ 7.5.0
Opencv 4.5.5

@ekurtgl
Copy link

ekurtgl commented Nov 11, 2022

Have the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants