Question: problem while Installing BCFtools/htslib
0
gravatar for always_learning
4.7 years ago by
Doha, Qatar
always_learning960 wrote:

Hi All,

 

I was trying to install bcftools/htslib tools using following commands at http://vcftools.sourceforge.net/htslib.html . I have downloaded latest one from Git Repository already from development branch as mentioned here https://github.com/samtools/bcftools and both  bcftools/htslib are updated too.

I am getting below errors while compiling

 

syed@syed-Precision-M6800:~$ cd bcftools; make; make test
cd ../htslib && make lib-static
make[1]: Entering directory `/home/syed/htslib'
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o kfunc.o kfunc.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o knetfile.o knetfile.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o kstring.o kstring.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o bgzf.o bgzf.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o faidx.o faidx.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o hfile.o hfile.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "0.2.0-rc10-2-gb039db8"' > version.h
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o hts.o hts.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o sam.o sam.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o vcf_sweep.o vcf_sweep.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o tbx.o tbx.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o vcf.o vcf.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o vcfutils.o vcfutils.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_decode.o cram/cram_decode.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_encode.o cram/cram_encode.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_index.o cram/cram_index.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_io.o cram/cram_io.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_samtools.o cram/cram_samtools.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/cram_stats.o cram/cram_stats.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/files.o cram/files.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/mFILE.o cram/mFILE.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/md5.o cram/md5.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/sam_header.o cram/sam_header.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/string_alloc.o cram/string_alloc.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/thread_pool.o cram/thread_pool.c
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/vlen.o cram/vlen.c
cram/vlen.c: In function ‘vflen’:
cram/vlen.c:121:9: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
     int i;
         ^
gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o cram/zfio.o cram/zfio.c
ar -rc libhts.a kfunc.o knetfile.o kstring.o bgzf.o faidx.o hfile.o hfile_net.o hts.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/md5.o cram/open_trace_file.o cram/pooled_alloc.o cram/sam_header.o cram/string_alloc.o cram/thread_pool.o cram/vlen.o cram/zfio.o
ranlib libhts.a
make[1]: Leaving directory `/home/syed/htslib'
echo '#define BCFTOOLS_VERSION "0.2.0-rc9-1-g03487c0"' > version.h
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib main.c -o main.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfindex.c -o vcfindex.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib tabix.c -o tabix.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfstats.c -o vcfstats.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfisec.c -o vcfisec.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfmerge.c -o vcfmerge.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfquery.c -o vcfquery.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcffilter.c -o vcffilter.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib filter.c -o filter.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfsom.c -o vcfsom.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfnorm.c -o vcfnorm.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfgtcheck.c -o vcfgtcheck.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfview.c -o vcfview.o
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfannotate.c -o vcfannotate.o
vcfannotate.c: In function ‘init_columns’:
vcfannotate.c:642:21: error: too few arguments to function ‘bcf_hdr_get_hrec’
                     bcf_hrec_t *hrec = bcf_hdr_get_hrec(args->files->readers[1].header, BCF_HL_INFO, str.s);
                     ^
In file included from vcfannotate.c:36:0:
../htslib/htslib/vcf.h:425:17: note: declared here
     bcf_hrec_t *bcf_hdr_get_hrec(const bcf_hdr_t *hdr, int type, const char *key, const char *value, const char *str_class);
                 ^
make: *** [vcfannotate.o] Error 1
gcc -c -g -Wall -Wc++-compat -O2  -I. -I../htslib vcfannotate.c -o vcfannotate.o
vcfannotate.c: In function ‘init_columns’:
vcfannotate.c:642:21: error: too few arguments to function ‘bcf_hdr_get_hrec’
                     bcf_hrec_t *hrec = bcf_hdr_get_hrec(args->files->readers[1].header, BCF_HL_INFO, str.s);
                     ^
In file included from vcfannotate.c:36:0:
../htslib/htslib/vcf.h:425:17: note: declared here
     bcf_hrec_t *bcf_hdr_get_hrec(const bcf_hdr_t *hdr, int type, const char *key, const char *value, const char *str_class);
                 ^
make: *** [vcfannotate.o] Error 1

Can you please help me with this errors or some one who faced similar issue already ? 

htslib bcftools installation • 4.6k views
ADD COMMENTlink modified 4.6 years ago by 141341254653464453.4k • written 4.7 years ago by always_learning960
1
gravatar for 14134125465346445
4.6 years ago by
United Kingdom
141341254653464453.4k wrote:

I found the same issue. The culprit seems to be vcfannotate, so if you comment out any reference of it in Makefile and main.c, then it compiles successfully. I was using a previous version where the command `bcftools isec --complement A.vcf.gz B.vcf.gz C.vcf.gz D.vcf.gz` would give me a segfault, but it now works with head master.

ADD COMMENTlink written 4.6 years ago by 141341254653464453.4k
0
gravatar for Devon Ryan
4.7 years ago by
Devon Ryan88k
Freiburg, Germany
Devon Ryan88k wrote:

It looks like you caught a broken commit. Unless you have a good reason, just use the current release of samtools/bcftools.

ADD COMMENTlink written 4.7 years ago by Devon Ryan88k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 834 users visited in the last hour