首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用cygwin编译和使用samtools

如何使用cygwin编译和使用samtools
EN

Stack Overflow用户
提问于 2014-03-24 19:47:04
回答 1查看 3.9K关注 0票数 1

我需要一些帮助来解决这个问题。当我在Cygwin (windows 8 64位)下编译Samtools时,我得到了一个错误。

我收到了以下消息:

ADMIN@USER ~/samtools-0.1.19

代码语言:javascript
复制
$ make    
make[1]: Entering directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19'    
make[2]: Entering directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19'    
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -DBGZF_CACHE -I. bgzf.c -o bgzf.o    
In file included from bgzf.c:32:0:    
bgzf.h:33:18: fatal error: zlib.h: No such file or directory    
#include <zlib.h>        
^         
compilation terminated.    
Makefile:56: recipe for target 'bgzf.o' failed    
make[2]: *** [bgzf.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19'
Makefile:27: recipe for target 'lib-recur' failed
make[1]: *** [lib-recur] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19'
Makefile:27: recipe for target 'all-recur' failed
make: *** [all-recur] Error 1 

请告诉我哪里出了问题,以及我需要如何纠正它。我尝试对Makefile进行一些更改,比如将-D_CURSES_LIB=1更改为-D_CURSES_LIB=0,将"LIBCURSES= -lcurses # -lXCurses“更改为"LIBCURSES= # -lcurses # -lXCurse

错误消息仍然存在,请帮助..

EN

回答 1

Stack Overflow用户

发布于 2014-09-30 10:52:08

我遇到了同样的问题,并通过以下步骤解决了它:

启动Cygwin安装程序,在“选择包”页面,搜索并安装gcc-g++,gdb,make,libncurses,zlib,zlib-devel。

下载并解压缩samtools。

-Dexpl=exp -Dlogl=log附加到Makefile的默认DFLAGS行,例如:

代码语言:javascript
复制
DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log

运行make clean清除以前的构建尝试。

然后运行make

将samtools.exe和misc文件夹复制到系统路径。或者,对于samtools 1.0版或更高版本,运行make install

请注意: samtools现在是version 1.1版本。你应该先试一下。

有关更多信息,请访问my blog

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22608531

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档