Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sflong
    Junior Member
    • Jun 2010
    • 8

    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
  • lynn012
    Junior Member
    • Sep 2010
    • 9

    #2

    You can read this method, though it wasn't the same as your problem. I think it will help you.

    Comment

    • sflong
      Junior Member
      • Jun 2010
      • 8

      #3
      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!

      Comment

      • poisson200
        Member
        • Feb 2010
        • 63

        #4
        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.

        Comment

        • Kulvait
          Member
          • Aug 2012
          • 11

          #5
          On Ubuntu try:
          sudo apt-get install --reinstall zlib1g
          Data analysis www.persmed.eu

          Comment

          • sridhar28
            Member
            • May 2013
            • 15

            #6
            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

            Comment

            • Michael Meng
              Junior Member
              • Dec 2013
              • 1

              #7
              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

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                As the install instructions say have you tried doing a plain "make"?
                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/

                Comment

                • vyellapa
                  Member
                  • Oct 2011
                  • 59

                  #9
                  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)

                  Comment

                  • Jon_Keats
                    Senior Member
                    • Mar 2010
                    • 279

                    #10
                    Thanks Teja,

                    Miss having you around

                    Comment

                    • Jon_Keats
                      Senior Member
                      • Mar 2010
                      • 279

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

                      export LIBS = /usr/local/lib/libz.so.1.2.8

                      Comment

                      • Jixiangj
                        Junior Member
                        • Nov 2012
                        • 2

                        #12
                        Thanks, vyellapa! This solution really works and it can also work in the guest mode.

                        Comment

                        • igor.bioinfo
                          Junior Member
                          • Mar 2016
                          • 1

                          #13
                          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.

                          Comment

                          Latest Articles

                          Collapse

                          • GATTACAT
                            Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                            by GATTACAT
                            Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                            07-01-2026, 11:43 AM
                          • SEQadmin2
                            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                            by SEQadmin2


                            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                            Here are nine questions we think about, in roughly the order they matter, before...
                            06-18-2026, 07:11 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by SEQadmin2, 07-02-2026, 11:08 AM
                          0 responses
                          25 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-30-2026, 05:37 AM
                          0 responses
                          23 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-26-2026, 11:10 AM
                          0 responses
                          23 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-17-2026, 06:09 AM
                          0 responses
                          55 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...