CMake:不支持的GNU版本-不支持晚于8的gcc版本 [英] CMake: unsupported GNU version -- gcc versions later than 8 are not supported

查看:369
本文介绍了CMake:不支持的GNU版本-不支持晚于8的gcc版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在降级我的GCC之前,我想知道是否有办法确定我的计算机中哪些程序/框架或依赖项将损坏,以及是否有更好的方法可以对此进行openpose安装?(例如,在CMake中进行更改)

Before downgrading my GCC, I want to know if there's a way to figure which programs/frameworks or dependencies in my machine will break and if there is a better way to do this for openpose installation? (e.g. changing something in CMake)

是否有黑客可以在不更改我的系统GCC版本和不破坏其他东西的情况下解决此问题?

Is there a hack to fix this without changing my system GCC version and potentially breaking other things?

[10889:10881 0:2009] 09:21:36 Wed Jan 06 [mona@goku:pts/0 +1] ~/research/code/openpose/build
$ make -j`nproc`
[ 12%] Performing configure step for 'openpose_lib'
CMake Warning (dev) at cmake/Misc.cmake:32 (set):
  implicitly converting 'BOOLEAN' to 'STRING' type.
Call Stack (most recent call first):
  CMakeLists.txt:25 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found PROTOBUF Compiler: /usr/local/bin/protoc
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- CUDA detected: 10.1
-- Added CUDA NVCC flags for: sm_75
-- Found Atlas: /usr/include/x86_64-linux-gnu  
-- Found Atlas (include: /usr/include/x86_64-linux-gnu library: /usr/lib/x86_64-linux-gnu/libatlas.so lapack: /usr/lib/x86_64-linux-gnu/liblapack.so
-- Python interface is disabled or not all required dependencies found. Building without it...
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- 
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   1.0.0
--   Git               :   1.0-149-g1807aada
--   System            :   Linux
--   C++ compiler      :   /usr/bin/c++
--   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags   :   -g -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Build type        :   Release
-- 
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   OFF
--   BUILD_matlab      :   OFF
--   BUILD_docs        :   OFF
--   CPU_ONLY          :   OFF
--   USE_OPENCV        :   OFF
--   USE_LEVELDB       :   OFF
--   USE_LMDB          :   OFF
--   USE_NCCL          :   OFF
--   ALLOW_LMDB_NOLOCK :   OFF
--   USE_HDF5          :   ON
-- 
-- Dependencies:
--   BLAS              :   Yes (Atlas)
--   Boost             :   Yes (ver. 1.71)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 3.6.1)
--   CUDA              :   Yes (ver. 10.1)
-- 
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_75
--   cuDNN             :   Disabled
-- 
-- Install:
--   Install path      :   /home/mona/research/code/openpose/build/caffe
-- 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CUDA_ARCH_BIN


-- Build files have been written to: /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build
[ 25%] Performing build step for 'openpose_lib'
[  1%] Running C++/Python protocol buffer compiler on /home/mona/research/code/openpose/3rdparty/caffe/src/caffe/proto/caffe.proto
Scanning dependencies of target caffeproto
[  1%] Building CXX object src/caffe/CMakeFiles/caffeproto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
[  1%] Linking CXX static library ../../lib/libcaffeproto.a
[  1%] Built target caffeproto
[  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_bnll_layer.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_accuracy_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_batch_norm_layer.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_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_concat_layer.cu.o
[  5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_clip_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_conv_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_contrastive_loss_layer.cu.o
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
In file included from /home/mona/research/code/openpose/3rdparty/caffe/src/caffe/util/math_functions.cu:1:
/usr/include/math_functions.h:54:2: warning: #warning "math_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
   54 | #warning "math_functions.h is an internal header file and must not be used directly.  This file will be removed in a future CUDA release.  Please use cuda_runtime_api.h or cuda_runtime.h instead."
      |  ^~~~~~~
CMake Error at cuda_compile_1_generated_clip_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_clip_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:114: 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_absval_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_absval_layer.cu.o


CMake Error at cuda_compile_1_generated_concat_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_concat_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:65: src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_absval_layer.cu.o] Error 1
make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:121: 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_batch_reindex_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_reindex_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:93: 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_bias_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bias_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:100: src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bias_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_batch_norm_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_batch_norm_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:86: src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_batch_norm_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_contrastive_loss_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_contrastive_loss_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:128: 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_conv_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_conv_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:135: 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_accuracy_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_accuracy_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:72: 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_base_data_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_base_data_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:79: src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_base_data_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_bnll_layer.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/./cuda_compile_1_generated_bnll_layer.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:107: src/caffe/CMakeFiles/cuda_compile_1.dir/layers/cuda_compile_1_generated_bnll_layer.cu.o] Error 1
CMake Error at cuda_compile_1_generated_math_functions.cu.o.Release.cmake:220 (message):
  Error generating
  /home/mona/research/code/openpose/build/caffe/src/openpose_lib-build/src/caffe/CMakeFiles/cuda_compile_1.dir/util/./cuda_compile_1_generated_math_functions.cu.o


make[5]: *** [src/caffe/CMakeFiles/caffe.dir/build.make:499: src/caffe/CMakeFiles/cuda_compile_1.dir/util/cuda_compile_1_generated_math_functions.cu.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:371: src/caffe/CMakeFiles/caffe.dir/all] Error 2
make[3]: *** [Makefile:130: all] Error 2
make[2]: *** [CMakeFiles/openpose_lib.dir/build.make:112: caffe/src/openpose_lib-stamp/openpose_lib-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/openpose_lib.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
21834/31772MB(openpose) 
[10889:10881 0:2010] 09:21:55 Wed Jan 06 [mona@goku:pts/0 +1] ~/research/code/openpose/build
$ 


我有:

$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我正在按照Ubuntu 20.04上的编译说明进行操作: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/README.md#prerequisites

I am following the compilation instructions here on Ubuntu 20.04: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/README.md#prerequisites

推荐答案

通过将GCC从9.3.0降级到7来解决:

Solved by downgrading the GCC from 9.3.0 to 7:

$ sudo apt remove gcc
$ sudo apt-get install gcc-7 g++-7 -y
$ sudo ln -s /usr/bin/gcc-7 /usr/bin/gcc
$ sudo ln -s /usr/bin/g++-7 /usr/bin/g++
$ sudo ln -s /usr/bin/gcc-7 /usr/bin/cc
$ sudo ln -s /usr/bin/g++-7 /usr/bin/c++
$ gcc --version
gcc (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

这篇关于CMake:不支持的GNU版本-不支持晚于8的gcc版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆