Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Samtools installation problem under Cygwin

    Hello,

    I appreciate any help to resolve this issue. I got an error when I compiled Samtools under Cygwin 1.7 (windows vista 32 bit).
    I had the following message:

    $ make
    make[1]: Entering directory `/home/fbhe/samtools-0.1.18'
    make[2]: Entering directory `/home/fbhe/samtools-0.1.18'
    make[2]: Nothing to be done for `lib'.
    make[2]: Leaving directory `/home/fbhe/samtools-0.1.18'
    make[2]: Entering directory `/home/fbhe/samtools-0.1.18/bcftools'
    make[2]: Nothing to be done for `lib'.
    make[2]: Leaving directory `/home/fbhe/samtools-0.1.18/bcftools'
    make[2]: Entering directory `/home/fbhe/samtools-0.1.18/misc'
    make[2]: Nothing to be done for `lib'.
    make[2]: Leaving directory `/home/fbhe/samtools-0.1.18/misc'
    gcc -g -Wall -O2 -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmd up.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 -lm -lz
    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status
    Makefile:44: recipe for target `samtools' failed
    make[1]: *** [samtools] Error 1
    make[1]: Leaving directory `/home/fbhe/samtools-0.1.18'
    Makefile:24: recipe for target `all-recur' failed
    make: *** [all-recur] Error 1


    Thanks,

    fbhe

  • #2
    I think it can't find zlib.
    Maybe this will help:
    this (they said to modify makefile and also install the lib)

    and this

    Comment


    • #3
      I'm also having a problem installing samtools under cygwin. after executing: tar xjvf <file location> I get the error of "Compressed file ends unexpectedly." It then proceeds to tell me that the file may be corrupted.

      Comment


      • #4
        Also, I have redownloaded and the same message shows up.

        Comment


        • #5
          Worked for me ... from cygwin ...

          $ tar xjvf samtools-0.1.18.tar.bz2
          samtools-0.1.18/
          samtools-0.1.18/AUTHORS
          samtools-0.1.18/COPYING
          samtools-0.1.18/ChangeLog
          samtools-0.1.18/INSTALL
          samtools-0.1.18/Makefile
          samtools-0.1.18/Makefile.mingw
          samtools-0.1.18/NEWS
          samtools-0.1.18/bam.c
          samtools-0.1.18/bam.h

          Either your tar is broken or your file is broken.
          Try using "bzip2" -d to un-bzip2 it first
          then "tar xvf" separately. This should tell you which is broken.


          ....
          Last edited by Richard Finney; 01-26-2012, 02:43 PM.

          Comment


          • #6
            help

            hello,did you resovled your problem? I have the same trouble with you, could you help me?

            Comment


            • #7
              emma924, you need to be more specific.

              What version of gcc and cygwin do you have?
              What version of samtools do you have?
              What is your command line?
              What are the results of this command?

              Comment


              • #8
                Hi,

                I need some help to resolve a similar problem. I got an error when I compiled Samtools under Cygwin (windows 8 64 bit).

                I got the following message:

                ADMIN@USER ~/samtools-0.1.19
                $ 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

                Thanks,

                neseqr

                Comment


                • #9
                  Originally posted by nuseqr View Post
                  Hi,

                  I need some help to resolve a similar problem. I got an error when I compiled Samtools under Cygwin (windows 8 64 bit).


                  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

                  Thanks,

                  neseqr
                  You need to install "zlib". Since this is windows you can find the compiled DLL here: http://zlib.net/zlib128-dll.zip. Once you download see the "usage.txt" files for instructions.

                  Comment


                  • #10
                    Originally posted by GenoMax View Post
                    You need to install "zlib". Since this is windows you can find the compiled DLL here: http://zlib.net/zlib128-dll.zip. Once you download see the "usage.txt" files for instructions.
                    Thanks GenoMax,

                    Please see this note given in the usage.txt file

                    Using ZLIB1.DLL with gcc/Cygwin
                    ===============================
                    ZLIB1.DLL is not designed to work with Cygwin. The Cygwin
                    system has its own DLL build of zlib, named CYGZ.DLL.

                    Does this mean that I need to add CYGZ.DLL?


                    I tried installing all zlib packages from a mirrors site, and got the following error message:

                    {$ 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 '
                    make[2]: Nothing to be done for 'lib'.
                    make[2]: Leaving 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 /bcftools'
                    make[2]: Nothing to be done for 'lib'.
                    make[2]: Leaving directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/ bcftools'
                    make[2]: Entering directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19 /misc'
                    make[2]: Nothing to be done for 'lib'.
                    make[2]: Leaving directory '/cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/ misc'
                    gcc -g -Wall -O2 -o samtools bam_tview.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_ind el.o errmod.o sample.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamsh uf.o bam_tview_curses.o bam_tview_html.o libbam.a -Lbcftools -lbcf -lcurses - lm -lz -lpthread
                    errmod.o: In function `cal_coef':
                    /cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/errmod.c:44: undefined refer ence to `expl'
                    /cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/errmod.c:44.text+0xc0c): r elocation truncated to fit: R_X86_64_PC32 against undefined symbol `expl'
                    /cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/errmod.c:45: undefined refer ence to `logl'
                    /cygdrive/c/Users/ADMIN/Cygwin/home/samtools-0.1.19/errmod.c:45.text+0xc2d): r elocation truncated to fit: R_X86_64_PC32 against undefined symbol `logl'
                    collect2: error: ld returned 1 exit status
                    Makefile:47: recipe for target 'samtools' failed
                    make[1]: *** [samtools] 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}

                    Comment


                    • #11
                      I never came across the need of installing samtools on Windows until very recently, and I stumbled upon this same issue. this previous thread had all the information I needed. I finally solved it by installing the same dependencies bedtools has (make, gcc-g++, zlib-devel) and by modifying the CFLAGS and DFLAGS lines of the Makefile file with these ones:
                      Code:
                      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

                      Comment


                      • #12
                        Thanks Jorge Amigo,

                        I installed the zlib and lib packages from the mirror sites, and noticed that all mirror sites may not have all the packages. i did not modifying the CFLAGS and DFLAGS lines of the Makefile file.

                        and this is the following message got:

                        $ cd samtools-0.1.19
                        $ make
                        make: 'install' is up to date.


                        There were no error messages . Does this mean that samtools is installed and ready to use?? Do I still need to modifying the CFLAGS and DFLAGS lines of the Makefile file?

                        Comment


                        • #13
                          if you didn't get any error messages you could try testing the command "./samtools.exe" inside that samtools-0.1.19 folder. if it returns the usage message, then you have successfully compiled samtools and generated a samtools.exe binary, which you can move around and place it wherever it best fits your needs.

                          Comment


                          • #14
                            I tried testing the command "./samtools.exe" inside that samtools-0.1.19

                            ADMIN@USER ~/samtools-0.1.19
                            $ ./samtools.exe
                            -bash: ./samtools.exe: No such file or directory

                            ADMIN@USER ~/samtools-0.1.19
                            $ ./samtools-0.1.19.exe
                            -bash: ./samtools-0.1.19.exe: No such file or directory

                            Tried again

                            ADMIN@USER ~/samtools-0.1.19
                            $ make
                            make: 'install' is up to date.

                            Comment


                            • #15
                              Can you post a listing of the files in the samtools directory?
                              $ ls -l samtools*

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Current Approaches to Protein Sequencing
                                by seqadmin


                                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                                04-04-2024, 04:25 PM
                              • 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

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 04-11-2024, 12:08 PM
                              0 responses
                              24 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 10:19 PM
                              0 responses
                              25 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 09:21 AM
                              0 responses
                              21 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-04-2024, 09:00 AM
                              0 responses
                              52 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X