linux gcc版本冲突(使用conda env)

jxct1oxe  于 2023-08-03  发布在  Linux
关注(0)|答案(1)|浏览(198)

我正在尝试在服务器上安装RabbitQCPlus程序。(我用ssh进入服务器。我没有sudo权限,无法更改根目录。我们所有的安装都使用conda env。)我按照下面的github页面进行安装:https://github.com/RabbitBio/RabbitQCPlus
克隆存储库后。我在我的环境中安装了gcc v11.2.0(RabbitQCPlus需要gcc 9.4或更高版本)。当我尝试在目录中使用make命令make -j4时,我得到以下错误:

The detected gcc version is 11.2.0 

Based on the detected gcc version and cpuflags, it was decided to use the avx2 instruction set to speed up the program

g++ -c src/options.cpp -o obj/options.o -DVec256 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP -fconstexpr-ops-limit=99000100 -Wall -Wextra -Wno-terminate -Wno-class-memaccess -DNDUBUG -std=c++17 -I./ -I./common -I./include -I./include/huffman -march=native -I./dependencies/thrust-1.17.0 -g -O3 -w -fopenmp
g++ -c src/main_correct_cpu.cpp -o obj/main_correct_cpu.o -DVec256 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP -fconstexpr-ops-limit=99000100 -Wall -Wextra -Wno-terminate -Wno-class-memaccess -DNDUBUG -std=c++17 -I./ -I./common -I./include -I./include/huffman -march=native -I./dependencies/thrust-1.17.0 -g -O3 -w -fopenmp
g++ -c src/correctionresultoutput.cpp -o obj/correctionresultoutput.o -DVec256 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP -fconstexpr-ops-limit=99000100 -Wall -Wextra -Wno-terminate -Wno-class-memaccess -DNDUBUG -std=c++17 -I./ -I./common -I./include -I./include/huffman -march=native -I./dependencies/thrust-1.17.0 -g -O3 -w -fopenmp
g++ -c src/tgetopt.cpp -o obj/tgetopt.o -DVec256 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP -fconstexpr-ops-limit=99000100 -Wall -Wextra -Wno-terminate -Wno-class-memaccess -DNDUBUG -std=c++17 -I./ -I./common -I./include -I./include/huffman -march=native -I./dependencies/thrust-1.17.0 -g -O3 -w -fopenmp
g++: error: unrecognized command line option ‘-fconstexpr-ops-limit=99000100’
g++: error: unrecognized command line option ‘-std=c++17’
make: *** [obj/options.o] Error 1
make: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option ‘-fconstexpr-ops-limit=99000100’
g++: error: unrecognized command line option ‘-std=c++17’
make: *** [obj/main_correct_cpu.o] Error 1
g++: error: unrecognized command line option ‘-fconstexpr-ops-limit=99000100’
g++: error: unrecognized command line option ‘-std=c++17’
make: *** [obj/correctionresultoutput.o] Error 1
g++: error: unrecognized command line option ‘-fconstexpr-ops-limit=99000100’
g++: error: unrecognized command line option ‘-std=c++17’
make: *** [obj/tgetopt.o] Error 1
(integration) [agastyas@arbor RabbitQCPlus]$ gcc --version
gcc (Anaconda gcc) 11.2.0
Copyright (C) 2021 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.

字符串
我在谷歌上搜索了这个问题,发现错误中的-std=c++17意味着正在使用旧版本的gcc来编译程序(here)。要在运行gcc --version时检查已安装的版本,我得到
cc (Anaconda gcc) 11.2.0 Copyright (C) 2021 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.
运行rpm -q libstdc++-devel会得到
libstdc++-devel-4.8.5-16.el7.x86_64
gcc 4.8是安装在系统中的gcc。我知道这是因为在conda env之外运行gcc --version显示安装了gcc 4.8。我对Linux并不熟悉,因为我对它很陌生。如何解决此问题?请按照我需要遵循的步骤给予答案,因为我对系统的来龙去脉不是很熟悉。

envsm3lx

envsm3lx1#

解决者**@n.m.可能是评论中的AI**。我安装了gcc,但没有安装gxx。费克斯很简单,就这么做了

conda install -c anaconda gxx

字符串
安装了C++编译器并修复了这个问题。最后我又犯了一个错误,但那是另一个线程的错误:P

相关问题