SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
SAM(tools) and BLAST fungs Bioinformatics 6 12-04-2018 04:01 AM
SAM tools hemang Bioinformatics 17 01-10-2012 06:27 AM
SAM tools question jsun529 Bioinformatics 1 05-31-2011 07:13 AM
Index of all tools supporting SAM? krobison Wiki Discussion 5 03-01-2011 03:04 AM
SAM tools output question sowmyai Bioinformatics 5 07-11-2010 05:38 PM

Reply
 
Thread Tools
Old 02-25-2011, 08:16 AM   #1
sflong
Junior Member
 
Location: Hong kong

Join Date: Jun 2010
Posts: 8
Default installition of SAM tools package

I would like to install SAM tools in linux system, zlib and ncurses had been installed before successfully, however, when type "make", I got wrong information below:



make[1]: Entering directory `/home/flsun/samtools-0.1.6'
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bgzf.c -o bgzf.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 kstring.c -o kstring.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_aux.c -o bam_aux.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam.c -o bam.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_import.c -o bam_import.o
bam_import.c: In function ‚__bam_get_lines‚:
bam_import.c:75: warning: implicit declaration of function ‚gzopen64‚
bam_import.c:75: warning: pointer/integer type mismatch in conditional expression
bam_import.c: In function ‚sam_header_read2‚:
bam_import.c:125: warning: pointer/integer type mismatch in conditional expression
bam_import.c: In function ‚sam_open‚:
bam_import.c:502: warning: pointer/integer type mismatch in conditional expression
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 sam.c -o sam.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_index.c -o bam_index.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_pileup.c -o bam_pileup.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_lpileup.c -o bam_lpileup.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_md.c -o bam_md.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 glf.c -o glf.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 razf.c -o razf.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 faidx.c -o faidx.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 knetfile.c -o knetfile.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_sort.c -o bam_sort.o
ar -cru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o knetfile.o bam_sort.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_tview.c -o bam_tview.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_maqcns.c -o bam_maqcns.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_plcmd.c -o bam_plcmd.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 sam_view.c -o sam_view.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_rmdup.c -o bam_rmdup.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_rmdupse.c -o bam_rmdupse.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_mate.c -o bam_mate.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_stat.c -o bam_stat.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bam_color.c -o bam_color.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 bamtk.c -o bamtk.o
gcc -g -Wall -O2 -o samtools bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o -lm -lcurses -lz -L. -lbam
./libbam.a(bam_import.o): In function `sam_open':
/home/flsun/samtools-0.1.6/bam_import.c:502: undefined reference to `gzopen64'
./libbam.a(bam_import.o): In function `__bam_get_lines':
/home/flsun/samtools-0.1.6/bam_import.c:75: undefined reference to `gzopen64'
./libbam.a(bam_import.o): In function `sam_header_read2':
/home/flsun/samtools-0.1.6/bam_import.c:125: undefined reference to `gzopen64'
collect2: ld returned 1 exit status
make[1]: *** [samtools] Error 1
make[1]: Leaving directory `/home/flsun/samtools-0.1.6'
make: *** [all-recur] Error 1


I am a new user, I'd like to please everyone to help me
sflong is offline   Reply With Quote
Old 03-02-2011, 12:28 AM   #2
lynn012
Junior Member
 
Location: china

Join Date: Sep 2010
Posts: 9
Default

http://openhelp.net/2010/11/11/libxm...e-to-gzopen64/
You can read this method, though it wasn't the same as your problem. I think it will help you.
lynn012 is offline   Reply With Quote
Old 03-03-2011, 03:03 AM   #3
sflong
Junior Member
 
Location: Hong kong

Join Date: Jun 2010
Posts: 8
Default

Quote:
Originally Posted by lynn012 View Post
http://openhelp.net/2010/11/11/libxm...e-to-gzopen64/
You can read this method, though it wasn't the same as your problem. I think it will help you.
I have got the way to solove the problem:
first: cd zlib/
CFLAGS="-O3 -fPIC" ./configure
make
make install;
then cd sam/
and type make
it will be okay now!
sflong is offline   Reply With Quote
Old 06-30-2011, 02:02 AM   #4
poisson200
Member
 
Location: united kingdom

Join Date: Feb 2010
Posts: 63
Unhappy Painful

Dear all,
I have a similar issue on a Centos machine. I want to compile samtools and it runs fine until it issues this;
gcc -g -Wall -O2 -o samtools bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o -Lbcftools libbam.a -lbcf -lcurses -lm -lz
phase.o: In function `loadpos':
/root/samtools-0.1.15/phase.c:475: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `__bam_get_lines':
/root/samtools-0.1.15/bam_import.c:76: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `sam_open':
/root/samtools-0.1.15/bam_import.c:442: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `sam_header_read2':
/root/samtools-0.1.15/bam_import.c:126: undefined reference to `gzopen64'
libbam.a(bedidx.o): In function `bed_read':
/root/samtools-0.1.15/bedidx.c:99: undefined reference to `gzopen64'
collect2: ld returned 1 exit status
make[1]: *** [samtools] Error 1
make[1]: Leaving directory `/root/samtools-0.1.15'
make: *** [all-recur] Error 1

I have tried the solution listed here;
1) downloaded http://www.zlib.net/ zlib 1.2.5

2) As stated by sflong
CFLAGS="-O3 -fPIC" ./configure
make
make install;
then cd sam/
and type make

Can anyone save me from setting fire to our cluster

Thank you for any ideas.

John.
poisson200 is offline   Reply With Quote
Old 08-24-2012, 06:19 AM   #5
Kulvait
Member
 
Location: Czech Republic

Join Date: Aug 2012
Posts: 10
Default

On Ubuntu try:
sudo apt-get install --reinstall zlib1g
Kulvait is offline   Reply With Quote
Old 05-30-2013, 11:05 PM   #6
sridhar28
Member
 
Location: chennai

Join Date: May 2013
Posts: 15
Default samtools installation : problem"gzopen64"

Hi,
I face the same problem even after reinstalling the zlib i am getting error as "undefined reference to `gzopen64' "

Thanks for any suggestions
sridhar28 is offline   Reply With Quote
Old 12-06-2013, 07:02 PM   #7
Michael Meng
Junior Member
 
Location: Missouri

Join Date: Dec 2013
Posts: 1
Default error in samtools installation

There is an error when I install samtools in a linux system (zorin-os-7.1). The message is in the following. Has someone had this problem before? Is there any suggestion I should do? Thanks.

gcc -g -Wall -O2 -o razip razip.o razf.o knetfile.o -lz
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [razip] Error 1
Michael Meng is offline   Reply With Quote
Old 12-07-2013, 04:13 AM   #8
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

As the install instructions say have you tried doing a plain "make"?
Quote:
Type `make' to compile samtools. If you have zlib >= 1.2.2.1, you can compile razip with `make razip'
I am not familiar with "Zorin". Does it use "packages"? If so you may be able to use one from another linux distro.

Otherwise you may need to compile/install zlib from source as last option: http://www.zlib.net/
GenoMax is offline   Reply With Quote
Old 01-29-2014, 03:30 PM   #9
vyellapa
Member
 
Location: phoenix

Join Date: Oct 2011
Posts: 59
Default

In the make file change
CFLAGS= -g -Wall -O2 to
CFLAGS= -g -Wall -O2 -L /usr/local/lib (This is where my zlib libraries are located)
vyellapa is offline   Reply With Quote
Old 07-26-2014, 08:53 PM   #10
Jon_Keats
Senior Member
 
Location: Phoenix, AZ

Join Date: Mar 2010
Posts: 279
Default

Thanks Teja,

Miss having you around
Jon_Keats is offline   Reply With Quote
Old 07-31-2014, 10:50 AM   #11
Jon_Keats
Senior Member
 
Location: Phoenix, AZ

Join Date: Mar 2010
Posts: 279
Default

Also to install bedtools you will need to make a similar change

export LIBS = /usr/local/lib/libz.so.1.2.8
Jon_Keats is offline   Reply With Quote
Old 01-13-2016, 08:29 PM   #12
Jixiangj
Junior Member
 
Location: Shanghai,China

Join Date: Nov 2012
Posts: 2
Default

Thanks, vyellapa! This solution really works and it can also work in the guest mode.
Jixiangj is offline   Reply With Quote
Old 03-07-2016, 01:02 PM   #13
igor.bioinfo
Junior Member
 
Location: Brazil

Join Date: Mar 2016
Posts: 1
Default

I solved this problem today by replacing the line
Code:
#include <zlib.h>
with
Code:
#include "win32/zlib.h"
on dict.c, stats.c, bedcov.c, phase.c, bedidx.c and misc/md5fa.c.
If you have already tried to compile, clear your folder with a
Code:
 rm *.o misc/*.o
before running "make" again.
This works because samtools ships with the zlib.h for windows users.
igor.bioinfo is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:47 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO