问题描述
我想编译最新的github bcftools,但下面出现这些错误。
[安装说明] https://raw.githubusercontent.com/samtools/bcftools/develop/INSTALL提到:
git clone git://github.com/samtools/htslib.git
git clone git://github.com/samtools/bcftools.git
cd bcftools
make
此外,我执行了以下操作:
- BCFTOOLS_PLUGINS = / path / to / bcftools / plugins(添加到Makefile中) 以及这些第三方库(已下载并添加到路径)
- zlib,gsl和libperl
运行make命令时出错
C:\Users\Admin\bcftools>make
echo '#define BCFTOOLS_VERSION "1.10.2-122-gf09bac3-dirty"' > version.h
gcc -g -Wall -O2 -I. -I../htslib -c -o main.o main.c
gcc -g -Wall -O2 -I. -I../htslib -c -o vcfindex.o vcfindex.c
gcc -g -Wall -O2 -I. -I../htslib -c -o tabix.o tabix.c
gcc -g -Wall -O2 -I. -I../htslib -c -o vcfstats.o vcfstats.c
gcc -g -Wall -O2 -I. -I../htslib -c -o vcfisec.o vcfisec.c
gcc -g -Wall -O2 -I. -I../htslib -c -o vcfmerge.o vcfmerge.c
vcfmerge.c: In function 'merge_GT':
vcfmerge.c:1565:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !warned ) fprintf(stderr,"Warning: Too many genotypes at %s:%"PRId64",requires %zu
bytes,skipping.\n",bcf_seqname(out_hdr,out),(int64_t) out->pos+1,msize);
^
vcfmerge.c:1565:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c:1572:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !ma->tmp_arr ) error("Could not allocate %zu bytes\n",msize);
^
vcfmerge.c:1572:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c: In function 'merge_format_string':
vcfmerge.c:1743:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !warned ) fprintf(stderr,"Warning: The row size is too big for FORMAT/%s at
%s:%"PRId64",requires %zu bytes,key,(int64_t) out-
>pos+1,msize);
^
vcfmerge.c:1743:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c:1750:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !ma->tmp_arr ) error("Could not allocate %zu bytes\n",msize);
^
vcfmerge.c:1750:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c: In function 'merge_localized_numberG_format_field':
vcfmerge.c:1777:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !warned ) fprintf(stderr,bcf_seqname(args->out_hdr,msize);
^
vcfmerge.c:1777:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c:1784:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !ma->tmp_arr ) error("Failed to allocate %zu bytes at %s:%"PRId64" for FORMAT/%s\n",msize,key);
^
vcfmerge.c:1784:9: warning: format '%s' expects argument of type 'char *',but argument 2 has type
'size_t' [-Wformat=]
vcfmerge.c:1784:9: warning: format '%I64d' expects argument of type 'long long int',but argument 3
has type 'const char *' [-Wformat=]
vcfmerge.c:1784:9: warning: format '%s' expects argument of type 'char *',but argument 4 has type
'hts_pos_t' [-Wformat=]
vcfmerge.c:1784:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c: In function 'merge_localized_numberAR_format_field':
vcfmerge.c:1878:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !warned ) fprintf(stderr,msize);
^
vcfmerge.c:1878:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c:1885:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !ma->tmp_arr ) error("Failed to allocate %zu bytes at %s:%"PRId64" for FORMAT/%s\n",key);
^
vcfmerge.c:1885:9: warning: format '%s' expects argument of type 'char *',but argument 2 has type
'size_t' [-Wformat=]
vcfmerge.c:1885:9: warning: format '%I64d' expects argument of type 'long long int',but argument 3
has type 'const char *' [-Wformat=]
vcfmerge.c:1885:9: warning: format '%s' expects argument of type 'char *',but argument 4 has type
'hts_pos_t' [-Wformat=]
vcfmerge.c:1885:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c: In function 'merge_format_field':
vcfmerge.c:2015:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !warned ) fprintf(stderr,msize);
^
vcfmerge.c:2015:9: warning: too many arguments for format [-Wformat-extra-args]
vcfmerge.c:2022:9: warning: unkNown conversion type character 'z' in format [-Wformat=]
if ( !ma->tmp_arr ) error("Failed to allocate %zu bytes at %s:%"PRId64" for FORMAT/%s\n",key);
^
vcfmerge.c:2022:9: warning: format '%s' expects argument of type 'char *',but argument 2 has type
'size_t' [-Wformat=]
vcfmerge.c:2022:9: warning: format '%I64d' expects argument of type 'long long int',but argument 3
has type 'const char *' [-Wformat=]
vcfmerge.c:2022:9: warning: format '%s' expects argument of type 'char *',but argument 4 has type
'hts_pos_t' [-Wformat=]
vcfmerge.c:2022:9: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -I../htslib -c -o vcfquery.o vcfquery.c
gcc -g -Wall -O2 -I. -I../htslib -c -o vcffilter.o vcffilter.c
gcc -g -Wall -O2 -I. -I../htslib -c -o filter.o filter.c
filter.c:36:19: Fatal error: regex.h: No such file or directory
#include <regex.h>
^
compilation terminated.
make: *** [Makefile:259: filter.o] Error 1
解决方法
安装了正则表达式https://github.com/gskinner/regexr,并且可以正常运行
正文必须至少包含30个字符;您输入了29。