Entering edit mode
10.5 years ago
Shellfishgene
▴
60
Hi!
I'm trying to build SomaticSniper from source. I followed the instructions, but I get an error in after running make:
Linking C executable ../../../../bin/bam-somaticsniper
CMakeFiles/bam-somaticsniper.dir/main.c.o: In function `main':
main.c:(.text.startup+0x296): undefined reference to `bgzf_fdopen'
main.c:(.text.startup+0x2f4): undefined reference to `sam_header_parse_rg'
main.c:(.text.startup+0x321): undefined reference to `sam_header_parse_rg'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libbam.a(bgzf.o): In function `bgzf_mt':
(.text+0x17e4): undefined reference to `pthread_create'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libbam.a(bgzf.o): In function `bgzf_close':
(.text+0x1bd3): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [bin/bam-somaticsniper] Error 1
make[1]: *** [build/src/exe/bam-somaticsniper/CMakeFiles/bam-somaticsniper.dir/all] Error 2
make: *** [all] Error 2
I have the right samtools version and cmake finds it, too. This is on Ubuntu 12.04.2 LTS, is that just not supported?
Did you follow the instructions, to the letter, at the Github page? It looks as though the compiler is not linking to bgzf.h. Most likely reason for that is that you did not export SAMTOOLS_ROOT as described in the README.
Indeed that was the error, I had used a wrong path in SAMTOOLS_ROOT.