#934 closed defect (fixed)

configure doesn't find libhts 1.10

Reported by: Peter Owned by: Jari Häkkinen
Priority: critical Milestone: yat 0.17
Component: build Version:
Keywords: Cc:


I have the following output:

checking htslib/hts.h usability... yes
checking htslib/hts.h presence... yes
checking for htslib/hts.h... yes
checking for library containing bam_hdr_destroy... no
checking htslib... no
checking bam.h usability... no
checking bam.h presence... no
checking for bam.h... no
checking bam/bam.h usability... no
checking bam/bam.h presence... no
checking for bam/bam.h... no
checking samtools/bam.h usability... no
checking samtools/bam.h presence... no
checking for samtools/bam.h... no
checking samtools API... no
configure: error: in `/home/peter/src/yat-0.17.x':
configure: error: neither htslib or samtools was found
See `config.log' for more details

Change History (3)

comment:1 Changed 11 months ago by Peter

As suggested by Jari and the problem is that bam_hdr_destroy() is not present in libhts but inlined in hts.h, which is confirmed by the announcement


"The header typedef and several pre-existing functions have been renamed to have a sam_hdr_ prefix: sam_hdr_t, sam_hdr_init(), sam_hdr_destroy(), and sam_hdr_dup(). (The existing bam_hdr_-prefixed names are still provided for compatibility with existing code.) (#887, thanks to John Marshall)"

The easy fix would be to change to sam_hdr_destroy, but that will not work for htslib 1.9 (and older).

comment:2 Changed 11 months ago by Peter


seems to exist already in version 1.0, so I'll try with that.

comment:3 Changed 11 months ago by Peter

Resolution: fixed
Status: newclosed

In 3858:

fixes #934. bam_hdr_destroy is inlined in htslib 1.10 which causing linking errors in configure tests; use hts_version instead.

Note: See TracTickets for help on using tickets.