[med-svn] [Git][med-team/htslib][master] 3 commits: Standards-Version: 4.3.0
Michael R. Crusoe
gitlab at salsa.debian.org
Mon Dec 31 15:09:36 GMT 2018
Michael R. Crusoe pushed to branch master at Debian Med / htslib
Commits:
24949f98 by Michael R. Crusoe at 2018-12-27T19:20:16Z
Standards-Version: 4.3.0
- - - - -
bf4b6bbb by Michael R. Crusoe at 2018-12-31T06:45:46Z
add patch for rounding bug
- - - - -
881c30ff by Michael R. Crusoe at 2018-12-31T15:08:19Z
ppc64el: -O0
- - - - -
6 changed files:
- debian/changelog
- debian/control
- − debian/patches/877670.patch
- + debian/patches/fix_float_precision
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+htslib (1.9-8) unstable; urgency=medium
+
+ * Disable optimization on ppc64el to unblock this and many other packages
+ migration to testing.
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com> Mon, 31 Dec 2018 07:08:13 -0800
+
htslib (1.9-7) unstable; urgency=medium
* Bring i386 build enhancements to unstable.
=====================================
debian/control
=====================================
@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 11~),
liblzma-dev,
libssl-dev,
zlib1g-dev
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/htslib
Vcs-Git: https://salsa.debian.org/med-team/htslib.git
Homepage: https://github.com/samtools/htslib
@@ -24,7 +24,8 @@ Section: libs
Depends: ${misc:Depends},
${shlibs:Depends}
Pre-Depends: ${misc:Pre-Depends}
-Breaks: python-pysam (<< 0.15~), python3-pysam (<< 0.15~)
+Breaks: python-pysam (<< 0.15~),
+ python3-pysam (<< 0.15~)
Description: C library for high-throughput sequencing data formats
HTSlib is an implementation of a unified C library for accessing common file
formats, such as SAM (Sequence Alignment/Map), CRAM and VCF (Variant Call
=====================================
debian/patches/877670.patch deleted
=====================================
@@ -1,34 +0,0 @@
-Description: Fix calculation of PLs on ARM and POWER
-Bug: https://github.com/samtools/bcftools/issues/702
-Bug-Debian: https://bugs.debian.org/877670
-Forwarded: https://github.com/samtools/htslib/pull/617
-Applied-Upstream: https://github.com/samtools/htslib/commit/829ddaea433cd55cc5bd9a6d38ec6d9593ad50b4
-Author: Graham Inggs <ginggs at debian.org>
-Last-Update: 2017-11-10
---- a/errmod.c
-+++ b/errmod.c
-@@ -64,7 +64,7 @@ static double* logbinomial_table( const
- static void cal_coef(errmod_t *em, double depcorr, double eta)
- {
- int k, n, q;
-- long double sum, sum1;
-+ double sum, sum1;
- double *lC;
-
- // initialize ->fk
-@@ -84,10 +84,11 @@ static void cal_coef(errmod_t *em, doubl
- double le1 = log(1.0 - e);
- for (n = 1; n <= 255; ++n) {
- double *beta = em->beta + (q<<16|n<<8);
-- sum1 = sum = 0.0;
-- for (k = n; k >= 0; --k, sum1 = sum) {
-- sum = sum1 + expl(lC[n<<8|k] + k*le + (n-k)*le1);
-- beta[k] = -10. / M_LN10 * logl(sum1 / sum);
-+ sum1 = lC[n<<8|n] + n*le;
-+ beta[n] = HUGE_VAL;
-+ for (k = n - 1; k >= 0; --k, sum1 = sum) {
-+ sum = sum1 + log1p(exp(lC[n<<8|k] + k*le + (n-k)*le1 - sum1));
-+ beta[k] = -10. / M_LN10 * (sum1 - sum);
- }
- }
- }
=====================================
debian/patches/fix_float_precision
=====================================
@@ -0,0 +1,33 @@
+From: Gustavo Romero <gromero at linux.vnet.ibm.com>
+Subject: ppc64el float handling fix
+
+I dug a bit further and it looks like that sam_parse1() is actually
+generating a different value for the floats in question, so when they are
+loaded back for the comparison they are already screwed up, e.g.:
+
+-- O3 --
+0xc0490fcf
+-3.14158988
+
+-- O0 --
+0xc0490fd0
+-3.14159012 (expected)
+
+because strtod() is used in float_to_le() and so also in u32_to_le(), which are
+inlined and float_to_le() takes a float and not a double as the first argument
+the use strtof() instead of strtod() in there looks the best, avoiding a
+truncation from double to float, which might cause precision issues, specially
+between different archs (like casts) plus optimization. So the following
+change fixed the issue for me.
+
+--- htslib.orig/sam.c
++++ htslib/sam.c
+@@ -1408,7 +1408,7 @@
+ else if (type == 'S') while (q + 1 < p) { u16_to_le(strtoul(q + 1, &q, 0), (uint8_t *) str.s + str.l); str.l += 2; _skip_to_comma(q, p); }
+ else if (type == 'i') while (q + 1 < p) { i32_to_le(strtol(q + 1, &q, 0), (uint8_t *) str.s + str.l); str.l += 4; _skip_to_comma(q, p); }
+ else if (type == 'I') while (q + 1 < p) { u32_to_le(strtoul(q + 1, &q, 0), (uint8_t *) str.s + str.l); str.l += 4; _skip_to_comma(q, p); }
+- else if (type == 'f') while (q + 1 < p) { float_to_le(strtod(q + 1, &q), (uint8_t *) str.s + str.l); str.l += 4; _skip_to_comma(q, p); }
++ else if (type == 'f') while (q + 1 < p) { float_to_le(strtof(q + 1, &q), (uint8_t *) str.s + str.l); str.l += 4; _skip_to_comma(q, p); }
+ else _parse_err_param(1, "unrecognized type B:%c", type);
+
+ #undef _skip_to_comma
=====================================
debian/patches/series
=====================================
@@ -1,4 +1,4 @@
define_PATH_MAX.patch
fPIC.patch
-#877670.patch # applied by upstream
testShebang.patch
+#fix_float_precision # doesn't fix all errors on ppc64el yet
=====================================
debian/rules
=====================================
@@ -10,8 +10,15 @@ include /usr/share/dpkg/default.mk
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386))
DEB_CFLAGS_MAINT_APPEND=-msse -mfpmath=sse
endif
-export DEB_CFLAGS_MAINT_APPEND+=-flto
-export DEB_LDFLAGS_MAINT_APPEND+=-Wl,-flto
+ifneq (,$(filter $(DEB_HOST_ARCH),ppc64el))
+ DEB_CFLAGS_MAINT_APPEND+=-O0
+else
+ DEB_CFLAGS_MAINT_APPEND+=-flto
+ DEB_LDFLAGS_MAINT_APPEND+=-Wl,-flto
+endif
+
+export DEB_CFLAGS_MAINT_APPEND
+export DEB_LDFLAGS_MAINT_APPEND
%:
dh $@
View it on GitLab: https://salsa.debian.org/med-team/htslib/compare/112a679b765dda2f1904b3d948203c9786239c1f...881c30ff24492f4b7346e6232c20526b42967c6c
--
View it on GitLab: https://salsa.debian.org/med-team/htslib/compare/112a679b765dda2f1904b3d948203c9786239c1f...881c30ff24492f4b7346e6232c20526b42967c6c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20181231/e6c31e99/attachment-0001.html>
More information about the debian-med-commit
mailing list