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
      Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
      by SEQadmin2



      CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

      Despite this, “CRISPR helped turn genome editing from a specialized technique into
      ...
      07-31-2026, 11:01 AM
    • SEQadmin2
      Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
      by SEQadmin2


      Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

      The systematic characterization of the human proteome has
      ...
      07-20-2026, 11:48 AM
    • SEQadmin2
      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
      by SEQadmin2



      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
      ...
      07-09-2026, 11:10 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 07-31-2026, 02:55 AM
    0 responses
    14 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-24-2026, 12:17 PM
    0 responses
    15 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-23-2026, 11:41 AM
    0 responses
    13 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-20-2026, 11:10 AM
    0 responses
    24 views
    0 reactions
    Last Post SEQadmin2  
    Working...