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

    • kinpict.com
      Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by kinpict.com
      The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
      Today, 06:37 PM
    • SEQadmin2
      16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by SEQadmin2





      NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
      10-30-2026, 06:46 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 11-12-2026, 07:59 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-05-2026, 09:25 AM
    0 responses
    35 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-03-2026, 11:54 AM
    2 responses
    56 views
    0 reactions
    Last Post kinpict.com  
    Started by SEQadmin2, 10-28-2026, 09:57 AM
    0 responses
    175 views
    0 reactions
    Last Post SEQadmin2  
    Working...