iqbal-lab / cortex

reference free variant assembly
32 stars 13 forks source link

Bundled htslib won't compile - vcfcheck.c:358: undefined reference to `gt_type' #13

Closed tseemann closed 7 years ago

tseemann commented 8 years ago

(I do have htslib installed myself - is it conflicting somehow?)

make[1]: Leaving directory '/home/tseemann/git/cortex/libs/htslib/htslib'
gcc -g -Wall -Wc++-compat -O2 -o htscmd main.o samview.o vcfview.o bamidx.o bcfidx.o bamshuf.o bam2fq.o tabix.o abreak.o bam2bed.o vcfcheck.o vcfisec.o vcfmerge.o -Lhtslib -lhts -lpthread -lz -lm
vcfcheck.o: In function `do_sample_stats':
/home/tseemann/git/cortex/libs/htslib/vcfcheck.c:358: undefined reference to `gt_type'
/home/tseemann/git/cortex/libs/htslib/vcfcheck.c:419: undefined reference to `gt_type'
/home/tseemann/git/cortex/libs/htslib/vcfcheck.c:423: undefined reference to `gt_type'
/home/tseemann/git/cortex/libs/htslib/vcfcheck.c:459: undefined reference to `gt_type'
/home/tseemann/git/cortex/libs/htslib/vcfcheck.c:461: undefined reference to `gt_type'
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'htscmd' failed
make: *** [htscmd] Error 1
iqbal-lab commented 8 years ago

Frakking cylons. Ok. If you remove your htslib from your path, does it work ?

tseemann commented 8 years ago

Do you really mean just remove htslib binaries from my PATH or do you mean remove all the libraries and header files?

iqbal-lab commented 8 years ago

I just need that when you compile and link, it sees the local htslib before your preinstalled one

iqbal-lab commented 7 years ago

This (and other) problems caused by not having access to recent gcc, and using old libs. Hopefully fixed by commit 4d6b39f0a05dab906dfd6ddf6e15ba0994e9c400 (==tip at the moment)

There's still things you have brought up @tseemann that I want to fix, not related to this issue

mbhall88 commented 3 years ago

I am also seeing the same problem - but in a clean container.

$ bash install.sh
# [snip]
vcfcheck.o: In function `do_sample_stats':
/cortex/libs/htslib/vcfcheck.c:358: undefined reference to `gt_type'
/cortex/libs/htslib/vcfcheck.c:419: undefined reference to `gt_type'
/cortex/libs/htslib/vcfcheck.c:423: undefined reference to `gt_type'
/cortex/libs/htslib/vcfcheck.c:459: undefined reference to `gt_type'
/cortex/libs/htslib/vcfcheck.c:461: undefined reference to `gt_type'
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'htscmd' failed
make: *** [htscmd] Error 1
make: Leaving directory '/cortex/libs/htslib'
make: Entering directory '/cortex/libs/string_buffer'
iqbal-lab commented 3 years ago

When I "get into work" will check the difference between your container that doesn't compile and Martin's that does