Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • fbhe
    Junior Member
    • Jan 2012
    • 1

    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
  • mitochy
    Member
    • Dec 2011
    • 10

    #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

    • SeqVicious
      Member
      • Sep 2011
      • 20

      #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

      • SeqVicious
        Member
        • Sep 2011
        • 20

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

        Comment

        • Richard Finney
          Senior Member
          • Feb 2009
          • 701

          #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

          • emma924
            Junior Member
            • Jun 2013
            • 1

            #6
            help

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

            Comment

            • Richard Finney
              Senior Member
              • Feb 2009
              • 701

              #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

              • nuseqr
                Junior Member
                • Mar 2014
                • 8

                #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

                • GenoMax
                  Senior Member
                  • Feb 2008
                  • 7142

                  #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

                  • nuseqr
                    Junior Member
                    • Mar 2014
                    • 8

                    #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

                    • Jorge Amigo
                      Member
                      • Jan 2010
                      • 11

                      #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

                      • nuseqr
                        Junior Member
                        • Mar 2014
                        • 8

                        #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

                        • Jorge Amigo
                          Member
                          • Jan 2010
                          • 11

                          #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

                          • nuseqr
                            Junior Member
                            • Mar 2014
                            • 8

                            #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

                            • GenoMax
                              Senior Member
                              • Feb 2008
                              • 7142

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

                              Comment

                              Latest Articles

                              Collapse

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              12 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-04-2026, 08:59 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 12:03 PM
                              0 responses
                              28 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 11:40 AM
                              0 responses
                              22 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...