samtools / htslib

C library for high-throughput sequencing data formats
Other
799 stars 445 forks source link

Are `bam_aux_first` and `bam_aux_next` available from the shared library? #1514

Closed kojix2 closed 1 year ago

kojix2 commented 1 year ago

Hi!

Thanks for all your help, I am kojix2 and I am creating htslib bindings for Ruby and Crystal.

Curiously, I noticed that two functions are not included in the shared library: bam_aux_first and bam_aux_next. Since these are not macro functions and HTSLIB_EXPORT is declared, I expected them to be included in the shared library.

https://github.com/samtools/htslib/blob/eab0ee16d0bf0168459dc82354e3672b74267150/htslib/sam.h#L1638-L1639 https://github.com/samtools/htslib/blob/eab0ee16d0bf0168459dc82354e3672b74267150/htslib/sam.h#L1650-L1651

I downloaded the 1.16 release and followed the instructions to compile on Ubuntu.

autoreconf -i 
./configure
make
make install

When the nm command is executed,

nm libhts.so.3  | grep aux

bam_aux_first and bam_aux_next are not found.

0000000000010ed0 t __do_global_dtors_aux
00000000001025b8 d __do_global_dtors_aux_fini_array_entry
0000000000046770 t aux_parse
0000000000051870 T bam_aux2A
00000000000518a0 T bam_aux2Z
0000000000050510 T bam_aux2f
0000000000050480 T bam_aux2i
00000000000519e0 T bam_auxB2f
0000000000051910 T bam_auxB2i
00000000000518e0 T bam_auxB_len
000000000004b7c0 T bam_aux_append
000000000004f850 T bam_aux_del
000000000004b8b0 T bam_aux_get
0000000000050220 T bam_aux_update_array
0000000000050100 T bam_aux_update_float
000000000004fd20 T bam_aux_update_int
000000000004fa70 T bam_aux_update_str
000000000008e040 t cram_encode_aux.constprop.0
00000000000114d0 t kf_betai_aux.part.0
0000000000042670 t sam_format_aux1
0000000000041e60 t skip_aux

Why are these functions not available from the shared library? How can I add these functions to the shared library?

kojix2 commented 1 year ago

I wrote up to the above and checked 1.16 just to be sure, and found that bam_aux_first and bam_aux_next do not exist. I see that htslib is still under active development. Sorry for the trouble. I will close this issue.

jmarshall commented 1 year ago

Yes, PR #1354 was merged a couple of weeks after the 1.16 release. (There's also a followup that will add another related function that I still need to get back to.)