编译RabbitQCPlus时出现zlib.h未找到错误的求助
编译RabbitQCPlus时出现zlib.h找不到的问题
环境背景
在无root/sudo权限的Linux服务器上,按照官方文档编译RabbitQCPlus程序,已通过conda安装gcc和zlib相关依赖。运行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/Formater.cpp -o obj/Formater.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 In file included from ./include/kseqpp/kseqpp.hpp:4, from ./include/readlibraryio.hpp:6, from ./include/options.hpp:5, from src/options.cpp:1: ./include/kseqpp/gziphelpers.hpp:4:10: fatal error: zlib.h: No such file or directory 4 | #include <zlib.h> | ^~~~~~~~ In file included from ./include/kseqpp/kseqpp.hpp:4, from ./include/readlibraryio.hpp:6, from ./include/correctionresultoutput.hpp:6, from src/correctionresultoutput.cpp:1: ./include/kseqpp/gziphelpers.hpp:4:10: fatal error: zlib.h: No such file or directory 4 | #include <zlib.h> | ^~~~~~~~ compilation terminated. compilation terminated. make: *** [obj/options.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [obj/correctionresultoutput.o] Error 1 In file included from ./include/kseqpp/kseqpp.hpp:4, from ./include/readlibraryio.hpp:6, from ./include/options.hpp:5, from src/main_correct_cpu.cpp:5: ./include/kseqpp/gziphelpers.hpp:4:10: fatal error: zlib.h: No such file or directory 4 | #include <zlib.h> | ^~~~~~~~ compilation terminated. make: *** [obj/main_correct_cpu.o] Error 1 In file included from src/FastxStream.h:18, from src/Formater.cpp:6: src/FileReader.h:13:10: fatal error: zlib.h: No such file or directory 13 | #include <zlib.h>//support gziped files, functional but inefficient | ^~~~~~~~ compilation terminated. make: *** [obj/Formater.o] Error 1
已尝试的操作
错误提示缺少zlib.h,已通过conda安装zlib开发库,当前conda已安装的zlib相关包如下:
zlib 1.2.13 h5eee18b_0 anaconda zlib-amzn2-aarch64 1.2.7 5 anaconda zlib-devel-amzn2-aarch64 1.2.7 5 anaconda
但重新编译后错误仍未解决。
求助需求
本人是Linux新手,需要通俗易懂的解决方案,解决编译时找不到zlib.h的问题。
内容的提问来源于stack exchange,提问作者kabirium
相关产品推荐
相关产品推荐

