Fastx-toolkit安裝及報錯解決

image.png

一:安裝

(1)安裝libgtextutils

wget https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gz
tar xvf libgtextutils-0.7.tar.gz
cd libgtextutils-0.7
./configure --prefix=/home/my/libgtextutils-0.7
make
make install
*加載環(huán)境變量,再安裝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.bz2
tar xvf fastx_toolkit-0.0.14.tar.bz2
cd fastx_toolkit-0.0.14 
./configure --prefix=/home/user01/apps/fastx_toolkit-0.0.14 
make
make 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<char>}' to 'bool' in return
  return input_stream ;
         ^~~~~~~~~~~~
make[3]: *** [text_line_reader.lo] Error 1
解決方法:
a.網(wǎng)上提供了修改src/gtextutils/text_line_reader.cpp文件,將return input_stream ;修改為return input_stream.good() ;
此方法可以解決,并可成功安裝,但是在此基礎(chǔ)上,安裝fastx-toolkit,會報錯undefined reference to `InputStreamWrapper::InputStreamWrapper(std::__cxx11::basic_string<char, std:
b.編譯時使用的gcc是7.3版本的,將其換成系統(tǒng)的4.8.5版本后,可以正常編譯兩個軟件(此次采用的是這個方法)
image

(2)配置fastx-toolkit時報錯

checking for GTEXTUTILS... configure: error: Package requirements (gtextutils) were not met:
No package 'gtextutils' found
解決方法:加載libgtextutils環(huán)境變量
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 output
collect2: error: ld returned 1 exit status
make[3]: *** [fastx_clipper] Error 1
make[3]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14/src/fastx_clipper'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user01/software/fastx_toolkit-0.0.14'
make: *** [all] Error 2
解決辦法:make時設(shè)置了多線程,改為單線程安裝即可。

(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: here
case 'i':
^~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:425: fasta_formatter.o] Error 1
make[3]: Leaving directory '/tmp/SBo/fastx_toolkit-0.0.14/src/fasta_formatter'

網(wǎng)上給出的解決辦法,修改fasta_formatter.cpp,如下:

image
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容