bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Make fails, not ready yet?

Open ws6 opened this issue 13 years ago • 13 comments

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

ws6 avatar Jul 16 '13 15:07 ws6

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

pd3 avatar Jul 16 '13 15:07 pd3

it works now. thanks. Btw, is there any command similar as vcf-validator?

http://vcftools.sourceforge.net/docs.html#validator

ws6 avatar Jul 16 '13 16:07 ws6

Nope, not yet, sorry.

pd3 avatar Jul 17 '13 07:07 pd3

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! :)

raonyguimaraes avatar Aug 20 '13 13:08 raonyguimaraes

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).

pd3 avatar Aug 20 '13 15:08 pd3

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?

ws6 avatar Aug 20 '13 15:08 ws6

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!

raonyguimaraes avatar Aug 20 '13 15:08 raonyguimaraes

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.

jmarshall avatar Aug 20 '13 15:08 jmarshall

Yes, removing the '-e ' from version.h did the trick!

Thank you very much! :dart:

raonyguimaraes avatar Aug 20 '13 16:08 raonyguimaraes

I get this error:

make: *** No rule to make target ../htslib/htslib/kfunc.h', needed byvcfcall.o'. Stop.

gregmcinnes avatar Aug 21 '13 17:08 gregmcinnes

kfunc.h is missing from htslib directory. Can you git add this? thx

ws6 avatar Aug 21 '13 22:08 ws6

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.

jmarshall avatar Aug 22 '13 08:08 jmarshall

Closing this now...

pd3 avatar Sep 13 '13 09:09 pd3