Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dideco
    Junior Member
    • Jan 2014
    • 4

    #1

    compiling problem of bcftools under cygwin

    Hello everybody,

    Although there are quite some threads on the forum about compiling samtools under cygwin, I didn't find any that adressed my problem with bcftools under cygwin.

    So I've succesfully compiled samtools 1.1 by adjusting the necessary flags in the Makefile (http://seqanswers.com/forums/showthread.php?t=17173), but I am not able to compile bcftools 1.1, even after appending the text -Dexpl=exp -Dlogl=log to the DFLAGS line in the bcftools Makefile as suggested in the previous quoted post.

    Here is an excerpt from the output of the $ make bcftools command in cygwin (which should have been installed with all libraries) under win7 x64.
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 vcfcnv.c -o vcfcnv.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 HMM.c -o HMM.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 vcfplugin.c -o vcfplugin.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 ccall.c -o ccall.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 em.c -o em.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 prob1.c -o prob1.o
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 kmin.c -o kmin.o
    gcc -g -Wall -Wc++-compat -O2 -o bcftools main.o vcfindex.o tabix.o vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o vcfnorm.o vcfgtcheck.o vcfview.o vcfannotate.o vcfroh.o vcfconcat.o vcfcall.o mcall.o vcmp.o gvcf.o reheader.o convert.o vcfconvert.o tsv2vcf.o vcfcnv.o HMM.o vcfplugin.o ccall.o em.o prob1.o kmin.o htslib-1.1/libhts.a -lpthread -lz -lm -ldl
    gcc -c -g -Wall -Wc++-compat -O2 -Dexpl=exp -Dlogl=log -I. -Ihtslib-1.1 test/test-rbuf.c -o test/test-rbuf.o
    gcc -g -Wall -Wc++-compat -O2 -o test/test-rbuf -lm -ldl test/test-rbuf.o
    gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.1 -fPIC -shared -o plugins/fill-AN-AC.so version.c plugins/fill-AN-AC.c -Lhtslib-1.1 -lhts
    version.c:1:0: let op: -fPIC ignored for target (all code is position independent) [enabled by default]
    /* version.c -- report version numbers for plugins.
    ^
    plugins/fill-AN-AC.c:1:0: let op: -fPIC ignored for target (all code is position independent) [enabled by default]
    /* plugins/fill-AN-AC.c -- fills AN and AC INFO fields.
    ^
    htslib-1.1/libhts.a(hts.o): In function `decompress_peek':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:104: undefined reference to `inflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:104: (.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:107: undefined reference to `inflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:107: (.text+0x89): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:110: undefined reference to `inflateEnd'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/hts.c:110: (.text+0xa3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflateEnd'
    htslib-1.1/libhts.a(vcf.o): In function `vcf_hdr_read':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:1203: undefined reference to `gzopen'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:1203: (.text+0x9c7c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gzopen'
    htslib-1.1/libhts.a(vcf.o): In function `ks_getc':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:45: undefined reference to `gzread'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:45: (.text+0x9f16): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gzread'
    htslib-1.1/libhts.a(vcf.o): In function `vcf_hdr_read':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:1216: undefined reference to `gzclose'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/vcf.c:1216: (.text+0xa15d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gzclose'
    htslib-1.1/libhts.a(bgzf.o): In function `inflate_gzip_block':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:327: undefined reference to `inflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:327: (.text+0x223): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflate'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_compress':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:229: undefined reference to `deflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:229: (.text+0x37d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `deflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:230: undefined reference to `deflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:230: (.text+0x392): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `deflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:231: undefined reference to `deflateEnd'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:231: (.text+0x3a3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `deflateEnd'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:237: undefined reference to `crc32'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:237: (.text+0x3f2): additional relocation overflows omitted from the output
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:237: undefined reference to `crc32'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_gzip_compress':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:259: undefined reference to `deflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:252: undefined reference to `deflateInit2_'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_open':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:159: undefined reference to `compressBound'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_dopen':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:181: undefined reference to `compressBound'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_hopen':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:203: undefined reference to `compressBound'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_read_block':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:498: undefined reference to `inflateInit2_'
    htslib-1.1/libhts.a(bgzf.o): In function `inflate_block':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:294: undefined reference to `inflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:298: undefined reference to `inflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:303: undefined reference to `inflateEnd'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:299: undefined reference to `inflateEnd'
    htslib-1.1/libhts.a(bgzf.o): In function `bgzf_close':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:809: undefined reference to `inflateEnd'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/bgzf.c:810: undefined reference to `deflateEnd'
    htslib-1.1/libhts.a(cram_io.o): In function `zlib_mem_deflate':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:615: undefined reference to `deflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:629: undefined reference to `deflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:636: undefined reference to `deflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:641: undefined reference to `deflateEnd'
    htslib-1.1/libhts.a(cram_io.o): In function `zlib_mem_inflate':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:553: undefined reference to `inflateInit2_'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:566: undefined reference to `inflate'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/cram_io.c:584: undefined reference to `inflateEnd'
    htslib-1.1/libhts.a(zfio.o): In function `zfputs':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:82: undefined reference to `gzputs'
    htslib-1.1/libhts.a(zfio.o): In function `zfpeek':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:99: undefined reference to `gzungetc'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:97: undefined reference to `gzgetc'
    htslib-1.1/libhts.a(zfio.o): In function `zfopen':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:167: undefined reference to `gzopen'
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:171: undefined reference to `gzopen'
    htslib-1.1/libhts.a(zfio.o): In function `zfclose':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:182: undefined reference to `gzclose'
    htslib-1.1/libhts.a(zfio.o): In function `zfgets':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:71: undefined reference to `gzgets'
    htslib-1.1/libhts.a(zfio.o): In function `zfeof':
    /cygdrive/d/methylome/samtools-1.1/bcftools-1.1/htslib-1.1/cram/zfio.c:107: undefined reference to `gzeof'
    collect2: error: ld returned exit-status 1
    Makefile:91: recipe for target 'plugins/fill-AN-AC.so' failed
    make: *** [plugins/fill-AN-AC.so] Fout 1

    Does anyone have any idea of what went wrong and how I can fix it? Any help would be greatly appreciated.

    Thanks,
    Dieter
    Last edited by dideco; 11-01-2014, 03:19 PM.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Try the suggestion about putting -lz at the end of the command as mentioned in this thread (http://stackoverflow.com/questions/1...-to-gzopen-etc) you may need to edit the Makefile.

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
      by SEQadmin2



      Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

      Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
      ...
      10-14-2026, 09:55 AM
    • SEQadmin2
      New Genomics Technologies Take Aim at Long-Standing Limits
      by SEQadmin2


      Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

      We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
      ...
      09-28-2026, 10:25 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 10-22-2026, 11:13 AM
    0 responses
    26 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-22-2026, 10:48 AM
    0 responses
    20 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    36 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    43 views
    0 reactions
    Last Post SEQadmin2  
    Working...