[med-svn] [abyss] 01/02: Fix FTBFS on 32-bit architectures
Andreas Tille
tille at debian.org
Mon May 18 13:01:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository abyss.
commit 51458b11a2e9e5609e4749a3ece7432fb9e58c5a
Author: Andreas Tille <tille at debian.org>
Date: Mon May 18 14:24:05 2015 +0200
Fix FTBFS on 32-bit architectures
---
debian/changelog | 3 ++
debian/patches/abyss-32-bit.patch | 91 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 95 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6ff0380..5f316a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ abyss (1.5.2-2) UNRELEASED; urgency=medium
* abyss-fixmate and DistanceEst are expected to be in /usr/bin by sga
* configure was missing ghc -> mention this fact in README.source for
further inspection
+ * Fix FTBFS on 32-bit architectures (thanks for the patch to Graham
+ Inggs <graham at nerve.org.za>)
+ Closes: #780409
-- Andreas Tille <tille at debian.org> Mon, 09 Mar 2015 08:33:10 +0100
diff --git a/debian/patches/abyss-32-bit.patch b/debian/patches/abyss-32-bit.patch
new file mode 100644
index 0000000..ab18c77
--- /dev/null
+++ b/debian/patches/abyss-32-bit.patch
@@ -0,0 +1,91 @@
+Author: Graham Inggs <graham at nerve.org.za>
+Last-Update: Fri, 13 Mar 2015 16:41:09 +0200
+Bug-Debian: http://bugs.debian.org/780409
+Description: Fix FTBFS on 32-bit architectures
+ Version 1.5.2-1 of abyss FTBFS on 32-bit architectures (armhf, i386 and
+ powerpc). Previous versions built fine on all architectures.
+ .
+ There were a couple of places in the code that was introduced in version
+ 1.5.2 where size_t data type was used instead of a fixed size data type.
+ The patch builds on amd64, i386 and armhf with and all unit tests passed.
+ .
+ Question: is this software useful on a 32-bit system at all?
+
+--- a/Common/StringUtil.h
++++ b/Common/StringUtil.h
+@@ -106,7 +106,7 @@ bool isReadNamePair(const std::string& n
+ return false;
+ }
+
+-static inline size_t SIToBytes(std::istringstream& iss)
++static inline unsigned long long SIToBytes(std::istringstream& iss)
+ {
+ double size;
+ std::string units;
+@@ -122,7 +122,7 @@ static inline size_t SIToBytes(std::istr
+ // no units given; clear fail flag
+ // and assume bytes
+ iss.clear(std::ios::eofbit);
+- return (size_t)ceil(size);
++ return (unsigned long long)ceil(size);
+ }
+
+ if (units.size() > 1) {
+@@ -133,22 +133,22 @@ static inline size_t SIToBytes(std::istr
+
+ switch(tolower(units[0])) {
+ case 'k':
+- size *= (size_t)1<<10; break;
++ size *= (unsigned long long)1<<10; break;
+ case 'm':
+- size *= (size_t)1<<20; break;
++ size *= (unsigned long long)1<<20; break;
+ case 'g':
+- size *= (size_t)1<<30; break;
++ size *= (unsigned long long)1<<30; break;
+ case 't':
+- size *= (size_t)1<<40; break;
++ size *= (unsigned long long)1<<40; break;
+ default:
+ iss.setstate(std::ios::failbit);
+ return 0;
+ }
+
+- return (size_t)ceil(size);
++ return (unsigned long long)ceil(size);
+ }
+
+-static inline size_t SIToBytes(const std::string& str)
++static inline unsigned long long SIToBytes(const std::string& str)
+ {
+ std::istringstream iss(str);
+ return SIToBytes(iss);
+--- a/Bloom/Bloom.h
++++ b/Bloom/Bloom.h
+@@ -165,10 +165,10 @@ namespace Bloom {
+ // bloom filter bits
+
+ size_t bits = endBitPos - startBitPos + 1;
+- size_t bytes = (bits + 7) / 8;
++ unsigned long bytes = (bits + 7) / 8;
+ char buf[IO_BUFFER_SIZE];
+ for (size_t i = 0, j = 0; i < bytes;) {
+- size_t writeSize = std::min(IO_BUFFER_SIZE, bytes - i);
++ unsigned long writeSize = std::min(IO_BUFFER_SIZE, bytes - i);
+ for (size_t k = 0; k < writeSize; k++) {
+ buf[k] = 0;
+ for (unsigned l = 0; l < 8; l++, j++) {
+@@ -270,11 +270,11 @@ namespace Bloom {
+
+ size_t offset = header.startBitPos;
+ size_t bits = header.endBitPos - header.startBitPos + 1;
+- size_t bytes = (bits + 7) / 8;
++ unsigned long bytes = (bits + 7) / 8;
+
+ char buf[IO_BUFFER_SIZE];
+ for (size_t i = 0, j = offset; i < bytes; ) {
+- size_t readSize = std::min(IO_BUFFER_SIZE, bytes - i);
++ unsigned long readSize = std::min(IO_BUFFER_SIZE, bytes - i);
+ in.read(buf, readSize);
+ assert(in);
+ for (size_t k = 0; k < readSize; k++) {
diff --git a/debian/patches/series b/debian/patches/series
index 2f06b22..fe386b7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
abyss-pe
gtest.patch
privacy-breach.patch
+abyss-32-bit.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/abyss.git
More information about the debian-med-commit
mailing list