fqtools icon indicating copy to clipboard operation
fqtools copied to clipboard

Does not build per instructions, missing sam.h file.

Open richapma78 opened this issue 4 years ago • 3 comments

Following the instructions on the main page: git clone https://github.com/alastair-droop/fqtools cd fqtools/ git clone https://github.com/samtools/htslib cd htslib/ autoheader autoconf ./configure make make install cd .. make

Fails at the last step with: In file included from src/fqprocess_view.c:14:0: src/fqheader.h:22:10: fatal error: sam.h: No such file or directory #include <sam.h>

I do not find a sam.h definition in htslib. I do however find a sam.h definition with in the separate samtools project. However if I modify for the Makefile to use that location as well I receive an error about too many parameters:

In file included from ../samtools-1.10/sam.h:29:0, from src/fqheader.h:22, from src/fqfile.c:14: src/fqfile.c: In function ‘fqfile_open_read_file_bam’: ../samtools-1.10/bam.h:209:22: error: too many arguments to function ‘samtools_sam_open’ #define sam_open samtools_sam_open

Could this be because samtools htslib etc. are now separately maintained projects?

richapma78 avatar Jan 20 '20 14:01 richapma78

I had the same issue, but I found sam.h file inside ./htslib/htslib folder.

Inside src/fqheader.h, I changed the include statement from #include <sam.h> to #include "htslib/sam.h"

then I could run make successfully.

bug1303 avatar Feb 13 '20 18:02 bug1303

I followed above advice from bug1303 and managed to build fqtools , however running fqtool brings me an error: fqtools: error while loading shared libraries: libhts.so.3: cannot open shared object file: No such file or directory libhts.so & libhts.so.3 I added to LD_LIBRARY_PATH: >echo $LD_LIBRARY_PATH: /usr/local/lib/libhts.so:/usr/local/lib/libhts.so.3

what could be the problem? thanks.

vokuryshev avatar Feb 27 '20 11:02 vokuryshev

Hi @vokuryshev Try to add the folder rather than the file: export LD_LIBRARY_PATH=/usr/local/lib This fixed it for me.

bug1303 avatar Apr 15 '20 13:04 bug1303