<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<pre class="message">Package: abyss<br>Version: 2.0.2-1<br>Severity: important<br>Tags: sid + patch<br>Justification: FTBFS<br>User: debian-mips@lists.debian.org<br>Usertags: mips-patch<br>Forwarded: https://github.com/bcgsc/abyss/pull/139<br><br>Hi,<br><br>Package abyss FTBFS on mips and other big-endian architectures with followind error:<br>> Kmer.cpp: In function 'Seq load(const uint8_t*)':<br>> Kmer.cpp:193:14: error: 'SEQ_WORDS' was not declared in this scope<br>>   copy(s, s + SEQ_WORDS, reverse_iterator<uint64_t*>(d));<br>>               ^~~~~~~~~<br>> Kmer.cpp: In function 'void storeReverse(uint8_t*, Seq)':<br>> Kmer.cpp:239:14: error: 'SEQ_WORDS' was not declared in this scope<br>>   copy(s, s + SEQ_WORDS,<br>              ^~~~~~~~~<br><br>build log: https://buildd.debian.org/status/fetch.php?pkg=abyss&arch=mips&ver=2.0.2-1&stamp=1478005755<br><br>After adding the missing SEQ_WORDS define for big-endian the build passed,<br>but the following tests failed:<br>> FAIL: common_kmer<br>> FAIL: BloomFilter<br>> FAIL: Konnector_DBGBloomAlgorithms<br>> FAIL: Konnector_konnector<br>> FAIL: PairedDBG_LoadAlgorithm<br>> FAIL: PairedDBG_KmerPair<br><br>Comparison of values returned by load and storeReverse methods between mipsel<br>and mips showed that the data contained in variable seq (type of std::bitset) is<br>in wrong byte order.<br><br>Conversion of arrays bigger than architecture's word size into bitset is working<br>by going sequentially through memory and converting the values into binary word<br>by word. It does not care about endianness.<br>So, on 32bit big-endian architectures the conversion must be done in 32bit<br>chunks and every chunk must be copied in reverse byte order.<br><br>The existing code in load and storeReverse methods was suitable for 64bit<br>big-endian architectures, it copies 64bit chunks of the array in reverse order.<br><br>The attached patch fixes the conversion of array to bitset (and vice versa) by<br>changing the uint64_t type to size_t in load and storeReverse methods.<br>This enables to use the same code on 32 and 64 bit architectures.<br><br>With this patch I was able to build abyss successfully on mips. This patch was<br>successfully tested on 64bit big-endian mips too.<br><br>Thanks,<br>Daniel<br></pre>
</div>
</body>
</html>