Make fails, not ready yet?
A make command lead to a failure
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 vcfview.c -o vcfview.o gcc -c -g -Wall -Wc++-compat -O2 -I. -I../htslib bcfidx.c -o bcfidx.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 vcfcheck.c -o vcfcheck.o vcfcheck.c: In function 'do_sample_stats': vcfcheck.c:594: error: 'bcf_int8_vector_end' undeclared (first use in this function) vcfcheck.c:594: error: (Each undeclared identifier is reported only once vcfcheck.c:594: error: for each function it appears in.) vcfcheck.c:594: error: 'bcf_int8_missing' undeclared (first use in this function) vcfcheck.c:595: error: 'bcf_int16_vector_end' undeclared (first use in this function) vcfcheck.c:595: error: 'bcf_int16_missing' undeclared (first use in this function) vcfcheck.c:596: error: 'bcf_int32_vector_end' undeclared (first use in this function) vcfcheck.c:596: error: 'bcf_int32_missing' undeclared (first use in this function) vcfcheck.c: In function 'check_vcf': vcfcheck.c:683: warning: implicit declaration of function 'bcf_sr_has_line' vcfcheck.c: In function 'main_vcfcheck': vcfcheck.c:981: warning: assignment makes integer from pointer without a cast make: *** [vcfcheck.o] Error 1
It is almost ready. Please try this for now: git clone --branch=develop [email protected]:samtools/htslib.git git clone [email protected]:samtools/bcftools.git cd htslib; make; cd .. cd bcftools; make
it works now. thanks. Btw, is there any command similar as vcf-validator?
http://vcftools.sourceforge.net/docs.html#validator
Nope, not yet, sorry.
I'm getting the same error, and I can't get bcftools to compile.
The instructions in here http://vcftools.sourceforge.net/htslib.html are also outdated.
make git-stamp does not work with the develop branch anymore.
Does anyone know how to compile this ? Thank you! :)
The instructions have been just updated and a new version of bcftools/htslib has been pushed to github. It should work now (does for me).
Any idea on how to compile it using MinGW? cygiwn dll is just fine. I think the offensive part for compiling in MinGW is the pthread lib?
Now i'm getting another error:
make
make[1]: Entering directory /lgc/programs/bcftools' make[1]: Nothing to be done forlib'.
make[1]: Leaving directory `/lgc/programs/bcftools'
echo -e '#define BCFTOOLS_VERSION "0.1.0-8-g3aa6f44"\nchar bcftools_version(void);' > version.h
gcc -c -g -Wall -Wc++-compat -O2 -I. -I../htslib main.c -o main.o
In file included from main.c:7:0:
version.h:1:1: error: expected identifier or ‘(’ before ‘-’ token
version.h:1:1: error: stray ‘#’ in program
main.c: In function ‘bcftools_version’:
main.c:114:50: error: ‘BCFTOOLS_VERSION’ undeclared (first use in this function)
main.c:114:50: note: each undeclared identifier is reported only once for each function it appears in
make: ** [main.o] Error 1
Should I open another Issue for this ?
Best Regards!
The echo -e doesn't work for you -- see my comment on Petr's commit 4d8a0fa7a50da65980c1ec96c1feaf5358a83282. If you hand-edit the generated version.h and remove the -e from the start of the first line, rerunning make will carry on and build it properly.
That'll get you going for now; I'm sure Petr will fix it properly tomorrow.
Yes, removing the '-e ' from version.h did the trick!
Thank you very much! :dart:
I get this error:
make: *** No rule to make target ../htslib/htslib/kfunc.h', needed byvcfcall.o'. Stop.
kfunc.h is missing from htslib directory. Can you git add this? thx
To compile bcftools, you need an up-to-date checkout of the develop branch of htslib. kfunc.h was committed there a couple of days ago.
Bear in mind that this is new code under heavy development at the moment. Once there are actual releases of bcftools and htslib, these inter-project dependencies will be easier to manage. At the moment, it's a little bit bleeding edge and do it yourself.
Closing this now...