Griffan / VerifyBamID

VerifyBamID2: A robust tool for DNA contamination estimation from sequence reads using ancestry-agnostic method.
http://griffan.github.io/VerifyBamID/
94 stars 15 forks source link

make fail "htslib/bgzf.h: No such file or directory" #37

Closed fp215 closed 6 months ago

fp215 commented 2 years ago

Hi, I'm having installation issues. The cmake step appears to run OK, although requires installation of missing libraries:

(cd VerifyBamID-2.0.1/build)
cmake -DHTS_INCLUDE_DIRS=/hts_absolute_path/include/ -DHTS_LIBRARIES=/hts_absolute_path/lib/libhts.a ..

-- The C compiler identification is GNU 4.8 -- The CXX compiler identification is GNU 4.8.5 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenMP_C: -fopenmp (found version "3.1") -- Found OpenMP_CXX: -fopenmp (found version "3.1") -- Found OpenMP: TRUE (found version "3.1") -- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6") -- Looking for BZ2_bzCompressInit -- Looking for BZ2_bzCompressInit - found -- Configuring done -- Generating done -- Build files have been written to: VerifyBamID-2.0.1/build

But I then have issues when running make:

Scanning dependencies of target statgen make[2]: Warning: File statgen/CMakeFiles/statgen.dir/depend.make' has modification time 1.2 s in the future [ 1%] Building CXX object statgen/CMakeFiles/statgen.dir/BaseAsciiMap.cpp.o [ 3%] Building CXX object statgen/CMakeFiles/statgen.dir/BaseUtilities.cpp.o [ 5%] Building CXX object statgen/CMakeFiles/statgen.dir/BgzfFileType.cpp.o [ 7%] Building CXX object statgen/CMakeFiles/statgen.dir/BgzfFileTypeRecovery.cpp.o [ 8%] Building CXX object statgen/CMakeFiles/statgen.dir/CharBuffer.cpp.o [ 10%] Building CXX object statgen/CMakeFiles/statgen.dir/Cigar.cpp.o [ 12%] Building CXX object statgen/CMakeFiles/statgen.dir/CigarRoller.cpp.o [ 14%] Building CXX object statgen/CMakeFiles/statgen.dir/Error.cpp.o [ 15%] Building CXX object statgen/CMakeFiles/statgen.dir/ErrorHandler.cpp.o [ 17%] Building CXX object statgen/CMakeFiles/statgen.dir/FileType.cpp.o [ 19%] Building CXX object statgen/CMakeFiles/statgen.dir/Generic.cpp.o [ 21%] Building CXX object statgen/CMakeFiles/statgen.dir/GenomeSequence.cpp.o [ 22%] Building CXX object statgen/CMakeFiles/statgen.dir/GzipFileType.cpp.o [ 24%] Building CXX object statgen/CMakeFiles/statgen.dir/GzipHeader.cpp.o [ 26%] Building CXX object statgen/CMakeFiles/statgen.dir/Hash.cpp.o [ 28%] Building CXX object statgen/CMakeFiles/statgen.dir/IndexBase.cpp.o [ 29%] Building CXX object statgen/CMakeFiles/statgen.dir/InputFile.cpp.o [ 31%] Building CXX object statgen/CMakeFiles/statgen.dir/IntArray.cpp.o [ 33%] Building CXX object statgen/CMakeFiles/statgen.dir/MathMatrix.cpp.o [ 35%] Building CXX object statgen/CMakeFiles/statgen.dir/MathVector.cpp.o [ 36%] Building CXX object statgen/CMakeFiles/statgen.dir/MemoryMap.cpp.o [ 38%] Building CXX object statgen/CMakeFiles/statgen.dir/MemoryMapArray.cpp.o [ 40%] Building CXX object statgen/CMakeFiles/statgen.dir/PhoneHome.cpp.o [ 42%] Building CXX object statgen/CMakeFiles/statgen.dir/STLUtilities.cpp.o [ 43%] Building CXX object statgen/CMakeFiles/statgen.dir/Sort.cpp.o [ 45%] Building CXX object statgen/CMakeFiles/statgen.dir/StatGenStatus.cpp.o [ 47%] Building CXX object statgen/CMakeFiles/statgen.dir/StringArray.cpp.o [ 49%] Building CXX object statgen/CMakeFiles/statgen.dir/StringBasics.cpp.o [ 50%] Building CXX object statgen/CMakeFiles/statgen.dir/StringHash.cpp.o [ 52%] Building CXX object statgen/CMakeFiles/statgen.dir/Tabix.cpp.o [ 54%] Building CXX object statgen/CMakeFiles/statgen.dir/UncompressedFileType.cpp.o [ 56%] Building C object statgen/CMakeFiles/statgen.dir/knetfile.c.o [ 57%] Linking CXX static library libstatgen.a make[2]: warning: Clock skew detected. Your build may be incomplete. [ 57%] Built target statgen Scanning dependencies of target Vcf make[2]: Warning: File libVcf/CMakeFiles/Vcf.dir/depend.make' has modification time 1.2 s in the future [ 59%] Building CXX object libVcf/CMakeFiles/Vcf.dir/libVcfFile.cpp.o [ 61%] Linking CXX static library libVcf.a make[2]: warning: Clock skew detected. Your build may be incomplete. [ 61%] Built target Vcf Scanning dependencies of target samtools make[2]: Warning: Filesamtools/CMakeFiles/samtools.dir/depend.make' has modification time 1.2 s in the future [ 63%] Building C object samtools/CMakeFiles/samtools.dir/bam.c.o In file included from VerifyBamID-2.0.1/samtools/bam.c:29:0: VerifyBamID-2.0.1/samtools/bam.h:48:25: fatal error: htslib/bgzf.h: No such file or directory

include "htslib/bgzf.h"`

                     ^`

compilation terminated. make[2]: *** [samtools/CMakeFiles/samtools.dir/bam.c.o] Error 1 make[1]: [samtools/CMakeFiles/samtools.dir/all] Error 2` make: [all] Error 2`

Thanks for your help in advance & apologies if I'm missing something obvious.

Griffan commented 2 years ago

Could you provide more information about your system and the htslib version?