一:安装
(1)安装libgtextutils
wget https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gztar xvf libgtextutils-0.7.tar.gzcd libgtextutils-0.7./configure --prefix=/home/my/libgtextutils-0.7makemake install*加载环境变量,再安装fastx-toolkit*export PKG_CONFIG_PATH=/home/my/libgtextutils-0.7/lib/pkgconfig:$PKG_CONFIG_PATH
(2)安装fastx-toolkit
wget https://github.com/agordon/fastx_toolkit/releases/download/0.0.14/fastx_toolkit-0.0.14.tar.bz2tar xvf fastx_toolkit-0.0.14.tar.bz2cd fastx_toolkit-0.0.14 ./configure --prefix=/home/user01/apps/fastx_toolkit-0.0.14 makemake install
二:报错解决
(1)编译libgtextutils-0.7时报错
text_line_reader.cpp: In member function 'bool TextLineReader::next_line()':text_line_reader.cpp:47:9: error: cannot convert 'std::istream {aka std::basic_istream}' to 'bool' in return return input_stream ; ^~~~~~~~~~~~make[3]: *** [text_line_reader.lo] Error 1解决方法:a.网上提供了修改src/gtextutils/text_line_reader.cpp文件,将return input_stream ;修改为return input_stream.good() ;此方法可以解决,并可成功安装,但是在此基础上,安装fastx-toolkit,会报错undefined reference to `InputStreamWrapper::InputStreamWrapper(std::__cxx11::basic_stringb.编译时使用的gcc是7.3版本的,将其换成系统的4.8.5版本后,可以正常编译两个软件(此次采用的是这个方法)
(2)配置fastx-toolkit时报错
checking for GTEXTUTILS... configure: error: Package requirements (gtextutils) were not met:No package 'gtextutils' found解决方法:加载libgtextutils环境变量export PKG_CONFIG_PATH=/home/my/libgtextutils-0.7/lib/pkgconfig:$PKG_CONFIG_PATH
(3)make时报错1
/usr/bin/ld: fastx.o: access beyond end of merged section (2084)/usr/bin/ld: fastx.o: access beyond end of merged section (2084)/usr/bin/ld: ../libfastx/libfastx.a(fastx.o)(.debug_info+0x896): reloc against `.text': error 2/usr/bin/ld: final link failed: Nonrepresentable section on outputcollect2: error: ld returned 1 exit statusmake[3]: *** [fastx_clipper] Error 1make[3]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14/src/fastx_clipper'make[2]: *** [all-recursive] Error 1make[2]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14'make: *** [all] Error 2解决办法:make时设置了多线程,改为单线程安装即可。
(4)make时报错2
fasta_formatter.cpp: In function ‘void parse_command_line(int, char**)’:fasta_formatter.cpp:105:9: error: this statement may fall through [-Werror=implicit-fallthrough=]usage();~~~~~^~fasta_formatter.cpp:107:3: note: herecase 'i':^~~~cc1plus: all warnings being treated as errorsmake[3]: *** [Makefile:425: fasta_formatter.o] Error 1make[3]: Leaving directory '/tmp/SBo/fastx_toolkit-0.0.14/src/fasta_formatter'
网上给出的解决办法,修改fasta_formatter.cpp,如下: