Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2

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

    Comment


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


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


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

          Comment


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


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


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


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


                  • #10
                    Thanks Teja,

                    Miss having you around

                    Comment


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

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

                      Comment


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

                        Comment


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

                          • seqadmin
                            Strategies for Sequencing Challenging Samples
                            by seqadmin


                            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                            03-22-2024, 06:39 AM
                          • seqadmin
                            Techniques and Challenges in Conservation Genomics
                            by seqadmin



                            The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                            Avian Conservation
                            Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                            03-08-2024, 10:41 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by seqadmin, 03-27-2024, 06:37 PM
                          0 responses
                          13 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 03-27-2024, 06:07 PM
                          0 responses
                          11 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 03-22-2024, 10:03 AM
                          0 responses
                          53 views
                          0 likes
                          Last Post seqadmin  
                          Started by seqadmin, 03-21-2024, 07:32 AM
                          0 responses
                          69 views
                          0 likes
                          Last Post seqadmin  
                          Working...
                          X