[Debian-med-packaging] htslib symbols missing in 1.3

Sascha Steinbiss sascha at steinbiss.name
Fri Dec 18 14:42:16 UTC 2015


Hi all,

I'm trying to update htslib to the recently released version 1.3. This
worked nicely with the exception of a few symbols disappearing from the
library, most of which were either made static, replaced by a macro or
renamed. Not too keen on ABI bumps, I was able to add a small patch with
wrappers for most of them (see attached patch) but there are elusive
ones that puzzle me a bit:

 libhts.so.1 libhts1 #MINVER#
- MD5_Final at Base 1.0
- MD5_Init at Base 1.0
- MD5_Update at Base 1.0
+#MISSING: 1.3-1# MD5_Final at Base 1.0
+#MISSING: 1.3-1# MD5_Init at Base 1.0
+#MISSING: 1.3-1# MD5_Update at Base 1.0

It appears like at some earlier point in time libhts exported these
OpenSSL functions in its own symbol table, and now that the
implementation changed in 1.3 they are gone. Since both implementations
are claimed to be binary compatible in the source, I have simply wrapped
these as well (though I doubt anyone linking to the shared htslib
library uses the,).
As this situation with htslib exposing foreign symbols looks a bit
unusual I'd like to get some confirmation that I'm doing the right
thing... after all, with my patches htslib is still carrying those
symbols which doesn't look right.

Thanks,
Sascha



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 
-------------- next part --------------
--- a/htslib/vcf.h
+++ b/htslib/vcf.h
@@ -237,7 +237,6 @@
     #define bcf_write1(fp,h,v)  bcf_write((fp),(h),(v))
     #define vcf_write1(fp,h,v)  vcf_write((fp),(h),(v))
     #define bcf_destroy1(v)     bcf_destroy(v)
-    #define bcf_empty1(v)       bcf_empty(v)
     #define vcf_parse1(s,h,v)   vcf_parse((s),(h),(v))
     #define bcf_clear1(v)       bcf_clear(v)
     #define vcf_format1(h,v,s)  vcf_format((h),(v),(s))
@@ -265,6 +264,7 @@
      *  not the bcf1_t object itself.
      */
     void bcf_empty(bcf1_t *v);
+    void bcf_empty1(bcf1_t *v);
 
     /**
      *  Make the bcf1_t object ready for next read. Intended mostly for
--- a/vcf.c
+++ b/vcf.c
@@ -890,6 +890,13 @@
     free(v->shared.s); free(v->indiv.s);
 }
 
+/* Just for ABI compatibility with previous versions. */
+void bcf_empty1(bcf1_t *v)
+{
+    bcf_empty(v);
+}
+
+/* Just for ABI compatibility with previous versions. */
 void bcf_destroy(bcf1_t *v)
 {
     bcf_empty1(v);
--- a/cram/cram_io.c
+++ b/cram/cram_io.c
@@ -675,6 +675,11 @@
     return 4;
 }
 
+/* Just for ABI compatibility with previous versions. */
+int int32_get(cram_block *b, int32_t *val) {
+    return int32_get_blk(b, val);
+}
+
 /* As int32_decoded/encode, but from/to blocks instead of cram_fd */
 int int32_put_blk(cram_block *b, int32_t val) {
     unsigned char cp[4];
@@ -687,6 +692,11 @@
     return b->data ? 0 : -1;
 }
 
+/* Just for ABI compatibility with previous versions. */
+int int32_put(cram_block *b, int32_t val) {
+    return int32_put_blk(b, val);
+}
+
 /* ----------------------------------------------------------------------
  * zlib compression code - from Gap5's tg_iface_g.c
  * They're static here as they're only used within the cram_compress_block
--- a/hts.c
+++ b/hts.c
@@ -1566,7 +1566,7 @@
     return 0;
 }
 
-static hts_idx_t *hts_idx_load_local(const char *fn)
+hts_idx_t *hts_idx_load_local(const char *fn)
 {
     uint8_t magic[4];
     int i, is_be;
--- a/md5.c
+++ b/md5.c
@@ -266,6 +266,11 @@
 	memcpy(ctx->buffer, data, size);
 }
 
+void MD5_Update(hts_md5_context *ctx, const void *data, unsigned long size)
+{
+  return hts_md5_update(ctx, data, size);
+}
+
 void hts_md5_final(unsigned char *result, hts_md5_context *ctx)
 {
 	unsigned long used, available;
@@ -317,6 +322,10 @@
 	memset(ctx, 0, sizeof(*ctx));
 }
 
+void MD5_Final(unsigned char *result, hts_md5_context *ctx)
+{
+    return hts_md5_final(result, ctx);
+}
 
 hts_md5_context *hts_md5_init(void)
 {
@@ -328,6 +337,11 @@
     return ctx;
 }
 
+hts_md5_context *MD5_Init(void)
+{
+    return hts_md5_init();
+}
+
 #else
 
 #include <openssl/md5.h>


More information about the Debian-med-packaging mailing list