-
Notifications
You must be signed in to change notification settings - Fork 460
Description
If you have an old version of HTSlib installed in a built-in or $CPATH location, or otherwise have external copies of hts.h etc available, building HTSlib itself should always use the headers within itself rather than external ones.
See #117, #205, and samtools/samtools#544 where this has been encountered before but the reporters keep closing the issues when they've been resolved for themselves but before we've sorted it out once and for all! 😄
This probably comes down to combinations of #include <htslib/hts.h> vs #include "htslib/hts.h" vs #include "hts.h", but this is complicated by the various subdirectories (perhaps cram/cram_io.c wants to say #include "../htslib/hts.h"?) and the fixed -I. (but cf configuring in a separate build directory) used.
(There is probably also a samtools/etc followup, along the lines of when building samtools, ensure that it's using the headers from the desired htslib. There the question of <htslib/hts.h> vs "htslib/hts.h" is more fraught, as "…" is not appropriate when building against an installed htslib.)