PennCNV安装,官方安装说明:http://penncnv.openbioinformatics.org/en/latest/user-guide/install/
wget https://github.com/WGLab/PennCNV/archive/v1.0.4.tar.gz
tar xvfz v1.0.4.tar.gz
cd kext/
make
但是会报错:
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmm_wrap.o khmm_wrap.c khmm_wrap.c: In function ‘SWIG_AsCharPtrAndSize’: khmm_wrap.c:1576: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:1576: error: (Each undeclared identifier is reported only once khmm_wrap.c:1576: error: for each function it appears in.) khmm_wrap.c:1576: error: expected ‘:’ before numeric constant khmm_wrap.c: In function ‘_wrap_estHMMFromFile_CHMM’: khmm_wrap.c:1875: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:1875: error: expected ‘:’ before numeric constant khmm_wrap.c:1875: error: expected ‘:’ before numeric constant khmm_wrap.c:1890: error: expected ‘:’ before numeric constant khmm_wrap.c:1890: error: expected ‘:’ before numeric constant khmm_wrap.c:1905: error: expected ‘:’ before numeric constant khmm_wrap.c:1905: error: expected ‘:’ before numeric constant khmm_wrap.c: In function ‘_wrap_testVit_CHMM’: khmm_wrap.c:2005: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:2005: error: expected ‘:’ before numeric constant khmm_wrap.c:2005: error: expected ‘:’ before numeric constant khmm_wrap.c: In function ‘_wrap_GetStateProb_CHMM’: khmm_wrap.c:2137: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:2137: error: expected ‘:’ before numeric constant khmm_wrap.c:2137: error: expected ‘:’ before numeric constant khmm_wrap.c: In function ‘_wrap_testVitTrio_CHMM’: khmm_wrap.c:2325: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:2325: error: expected ‘:’ before numeric constant khmm_wrap.c:2325: error: expected ‘:’ before numeric constant khmm_wrap.c: In function ‘_wrap_reg_linear’: khmm_wrap.c:2443: error: ‘bool’ undeclared (first use in this function) khmm_wrap.c:2443: error: expected ‘:’ before numeric constant khmm_wrap.c:2443: error: expected ‘:’ before numeric constant khmm_wrap.c:2458: error: expected ‘:’ before numeric constant khmm_wrap.c:2458: error: expected ‘:’ before numeric constant khmm_wrap.c:2473: error: expected ‘:’ before numeric constant khmm_wrap.c:2473: error: expected ‘:’ before numeric constant khmm_wrap.c:2488: error: expected ‘:’ before numeric constant khmm_wrap.c:2488: error: expected ‘:’ before numeric constant make: *** [khmm_wrap.o] Error 1
解决办法:
sed -i -e '/#undef bool/d' khmm_wrap.c
然后:
make clean
make
还是报错:
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmm_wrap.o khmm_wrap.c
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmm.o khmm.c
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o kc.o kc.c
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmmDev.o khmmDev.c
gcc -shared -o khmm.so khmm_wrap.o khmm.o kc.o khmmDev.o `perl -MExtUtils::Embed -e ldopts`
/usr/bin/ld: /share/work/biosoft/perl/perl-5.22.1/lib/5.22.1/x86_64-linux-thread-multi/CORE/libperl.a(op.o): relocation R_X86_64_32 against `PL_op_mutex' can not be used when making a shared object; recompile with -fPIC
/share/work/biosoft/perl/perl-5.22.1/lib/5.22.1/x86_64-linux-thread-multi/CORE/libperl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [khmm.so] Error 1
本人谷歌和查找说明文档,说GCC必须是4版本,而且perl版本要低于5.14.2:,于是安装低版本perl:
wget https://www.cpan.org/src/5.0/perl-5.14.2.tar.gz tar xvfz perl-5.14.2.tar.gz
cd perl-5.14.2
./Configure -des -Dprefix=/share/work/perl/perl-v5.14.2 -Accflags='-fPIC' make make install
Note that in the command above, -fPIC is needed for x86_64 system, and -Duseithreads are highly recommended to enable threading functionality in Perl (though not used in PennCNV per se).
然后再把这个版本的perl添加到PATH的开头就可以,顺利make 安装成功了;
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!