![]() |
|
|||||||
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SAMtools installation | kaushal25 | Bioinformatics | 22 | 04-12-2012 11:32 AM |
| Samtools installation problem under Cygwin | fbhe | Bioinformatics | 4 | 01-26-2012 01:23 PM |
| samtools installation error; gzopen64 | poisson200 | Bioinformatics | 1 | 06-30-2011 02:56 AM |
| samtools installation | rdu | Bioinformatics | 4 | 08-27-2010 11:18 AM |
| Orthomcl Installation | Canadian_philosophy | Bioinformatics | 0 | 07-29-2010 07:36 AM |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
Hi all,
I'm very new to bioinformatics and all I'm trying to do is index a bam file so I can view the pileup in IGV. I've downloaded the latest version of samtools unpacked it successfully. I'm now trying to install it but I'm running into an error after the 'make samtools' command. Make clean works just fine but the following error occurs after 'make samtools'. $ make samtools make[1]: Entering directory <path> gcc -c -g -Wall -O2 -D_FILE_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bgzf.o In file included from bgzf.c:36:0: gbzf.h:29:28: fatal error: zlib.h: No such file or directory compilation terminated Makefile:21: recipe for target 'bgzf.o' failed make[1]: *** [bgzf.o] Error 1 make[1]: Leaving directory <path> $CC= gcc gcc: no input filesr] Error 1 It looks like it's having trouble with one of the files. Since I only need to be using a few of the samtools options can I just delete the files that give problems? I've also tried redownloading samtools a couple of times and the same error shows up. |
|
|
|
|
|
#2 |
|
Member
Location: Baltimore, MD Join Date: Mar 2011
Posts: 19
|
|
|
|
|
|
|
#3 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
I'm on windows 7 and I'm using cygwin. I just installed zlib by updating cygwin and the command got much further. This time curses.h failed and the command was terminated. I'll try installing curses.h to see if that works.
|
|
|
|
|
|
#4 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
I installed anything with the name 'curses' in it during the cygwin installation and I'm still getting the following right before termination.
gcc -c -g -Wall -O2 -D_FILE_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_tview.c -o bam_tview.o bam_tview.c:5:20: fatal error: curses.h: No such file or directory compilation terminated makefile:21: recipe for target 'bam_tview.o' failed make:** [bam_tview.o] Error 1 I can't find curses.h to install in cygwin. I don't know what else to do from here. |
|
|
|
|
|
#5 |
|
Member
Location: Baltimore, MD Join Date: Mar 2011
Posts: 19
|
Sorry I don't use cygwin so I won't be of much help. Did you try installing libncurses-devel? I see there are several packages in cygwin for it.
|
|
|
|
|
|
#6 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
Thanks for trying, Carlos.
I found a fix suggested on another post but I have no idea how to implement it. The fix is adding CC= gcc CFLAGS= -g -Wall -O2 #-m64 #-arch ppc CFLAGS= -I/usr/include/ncurses DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log KNETFILE_O= knetfile.o to Makefile. I found three makefiles and none of them had any CFLAGS in the file. Is it even possible to install samtools on windows? |
|
|
|
|
|
#7 |
|
Senior Member
Location: bethesda Join Date: Feb 2009
Posts: 408
|
CFLAGS should be on the second line of the make file (Makefile)...
Makefile should be modified like this ... CFLAGS= -g -Wall -O2 -I/usr/include/ncurses DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log You'll also need to append the text -Dexpl=exp -Dlogl=log to the DFLAGS line the Makefile in bcftools ALSO !!!! run "make clean" or remove all the .o (object) files before re-making. |
|
|
|
|
|
#8 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
Thank you Richard Finney. I just made these corrections and the make samtools command finished. Unfortunately, when I try to use samtools the samtools command cannot be found. Did something go wrong when I made the executable?
|
|
|
|
|
|
#9 |
|
Senior Member
Location: bethesda Join Date: Feb 2009
Posts: 408
|
type "./samtools" (from cygwin) in the directory you made samools in.
If that does not work, try "./samtools.exe" . |
|
|
|
|
|
#10 |
|
Member
Location: New Hampshire Join Date: Sep 2011
Posts: 15
|
Thank you for your help, it's all working now
|
|
|
|
|
|
#11 |
|
Junior Member
Location: Delaware Join Date: Oct 2010
Posts: 1
|
I had a similar problem with getting samtools to work on Cygwin, only my error was:
bam_tview.c:5:20: fatal error: curses.h: No such file or directory The fix was modifying the makefiles as Richard Finney suggested. Thanks Richard. |
|
|
|
|
|
#12 |
|
Junior Member
Location: Beijing Join Date: Nov 2011
Posts: 3
|
I find another solution of this problem. Before compiling samtools, we can fix the 16th line of Makefile like this"LIBCURSES= -lncurses # -lXCurses". P.S. My operating system is openSUSE.
|
|
|
|
|
|
#13 |
|
Member
Location: USA Join Date: May 2012
Posts: 44
|
I followed this advice, but I get
In file included from /usr/include/math.h:146:0, from bam_md.c:5: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:101:1: error: conflicting types for ‘exp’ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:110:1: error: conflicting types for ‘log’ Linux *** 3.2.0-26-generic-tuxonice #41~ppa3-Ubuntu SMP Wed Jul 11 19:04:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux |
|
|
|
|
|
#14 |
|
Member
Location: USA Join Date: May 2012
Posts: 44
|
may have solved this one
sudo ln -s /lib/x86_64-linux-gnu/libncurses.so.5 /lib/x86_64-linux-gnu/libncurses.so CFLAGS= -g -Wall -O2 -I/usr/include/ncurses #-m64 #-arch ppc DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=0 LIBCURSES= -lncurses # -lXCurses I also installed libcurses-perl and zlib-bin via ubuntu software center prior to getting this to work note that $ make test make: *** No rule to make target `test'. Stop. $ make check make: *** No rule to make target `check'. Stop. $ make install make: *** No rule to make target `install'. Stop. so, just the "make" itself is enough to install it? |
|
|
|
|
|
#15 |
|
Junior Member
Location: Belguim Join Date: Aug 2012
Posts: 1
|
I'm also using cygwin and followed the advices above (changed the Makefile, installed ncurses, zlib), but still got the error:
bgzf.h:29:18: zlib.h: No such file or directory bgzf.c: In function `open_write': bgzf.c:186: error: `Z_DEFAULT_COMPRESSION' undeclared (first use in this functio n) bgzf.c:186: error: (Each undeclared identifier is reported only once bgzf.c:186: error: for each function it appears in.) bgzf.c: In function `deflate_block': bgzf.c:297: error: `z_stream' undeclared (first use in this function) bgzf.c:297: error: parse error before "zs" bgzf.c:298: error: `zs' undeclared (first use in this function) bgzf.c:305: error: `Z_DEFLATED' undeclared (first use in this function) bgzf.c:306: error: `Z_DEFAULT_STRATEGY' undeclared (first use in this function) bgzf.c:307: error: `Z_OK' undeclared (first use in this function) bgzf.c:311: error: `Z_FINISH' undeclared (first use in this function) bgzf.c:312: error: `Z_STREAM_END' undeclared (first use in this function) bgzf.c: In function `inflate_block': bgzf.c:371: error: `z_stream' undeclared (first use in this function) bgzf.c:371: error: parse error before "zs" bgzf.c:373: error: `zs' undeclared (first use in this function) bgzf.c:381: error: `Z_OK' undeclared (first use in this function) bgzf.c:385: error: `Z_FINISH' undeclared (first use in this function) bgzf.c:386: error: `Z_STREAM_END' undeclared (first use in this function) bgzf.c: In function `check_header': bgzf.c:405: error: `Z_DEFLATED' undeclared (first use in this function) Makefile:22: recipe for target `bgzf.o' failed make[2]: *** [bgzf.o] Error 1 make[2]: Leaving directory `/samtools-0.1.18' Makefile:25: recipe for target `lib-recur' failed make[1]: *** [lib-recur] Error 1 make[1]: Leaving directory `/samtools-0.1.18' Makefile:25: recipe for target `all-recur' failed make: *** [all-recur] Error 1 I installed everything with the name zlib, but cannot get further |
|
|
|
|
|
#16 |
|
Member
Location: New York Join Date: Jul 2012
Posts: 12
|
If anyone has solved the error: conflicting types for 'exp' or the equivalent for 'log', I'd be incredibly grateful.
|
|
|
|
|
|
#17 |
|
Senior Member
Location: bethesda Join Date: Feb 2009
Posts: 408
|
Is the conflicting types a warning or an error ?
Can you display the full message? If it's just a warning, don't worry about it. |
|
|
|
|
|
#18 |
|
Member
Location: New York Join Date: Jul 2012
Posts: 12
|
phil@phil:~/Desktop/samtools-0.1.18$ make
make[1]: Entering directory `/home/phil/Desktop/samtools-0.1.18' make[2]: Entering directory `/home/phil/Desktop/samtools-0.1.18' gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bgzf.c -o bgzf.o bgzf.c: In function ‘bgzf_close’: bgzf.c:630:8: warning: variable ‘count’ set but not used [-Wunused-but-set-variable] gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kstring.c -o kstring.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_aux.c -o bam_aux.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam.c -o bam.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_import.c -o bam_import.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam.c -o sam.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_index.c -o bam_index.o bam_index.c: In function ‘bam_index_load_core’: bam_index.c:330:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:337:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:350:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:353:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:357:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:361:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:371:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] bam_index.c:375:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_pileup.c -o bam_pileup.o bam_pileup.c: In function ‘resolve_cigar2’: bam_pileup.c:75:9: warning: variable ‘is_head’ set but not used [-Wunused-but-set-variable] gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_lpileup.c -o bam_lpileup.o gcc -c -g -Wall -O2 -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_md.c -o bam_md.o In file included from /usr/include/math.h:146:0, from bam_md.c:5: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:101:1: error: conflicting types for ‘exp’ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:110:1: error: conflicting types for ‘log’ make[2]: *** [bam_md.o] Error 1 make[2]: Leaving directory `/home/phil/Desktop/samtools-0.1.18' make[1]: *** [lib-recur] Error 1 make[1]: Leaving directory `/home/phil/Desktop/samtools-0.1.18' make: *** [all-recur] Error 1 |
|
|
|
|
|
#19 |
|
Member
Location: New York Join Date: Jul 2012
Posts: 12
|
I don't quite know what's important, so there's all of it.
|
|
|
|
|
|
#20 |
|
Member
Location: New York Join Date: Jul 2012
Posts: 12
|
Figured it out! I put in, from somewhere I found online, the -Dexpl=exp -Dlogl=log line in DFLAGS. Got rid of that and it worked! Thanks!
|
|
|
|
![]() |
| Thread Tools | |
|
|