[Debian-med-packaging] Bug#847574: abyss: FTBFS on mips and other big-endian architectures

Daniel Knezevic Daniel.Knezevic at imgtec.com
Fri Dec 9 15:23:41 UTC 2016


Package: abyss
Version: 2.0.2-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-mips at lists.debian.org
Usertags: mips-patch
Forwarded: https://github.com/bcgsc/abyss/pull/139

Hi,

Package abyss FTBFS on mips and other big-endian architectures with followind error:
> Kmer.cpp: In function 'Seq load(const uint8_t*)':
> Kmer.cpp:193:14: error: 'SEQ_WORDS' was not declared in this scope
>   copy(s, s + SEQ_WORDS, reverse_iterator<uint64_t*>(d));
>               ^~~~~~~~~
> Kmer.cpp: In function 'void storeReverse(uint8_t*, Seq)':
> Kmer.cpp:239:14: error: 'SEQ_WORDS' was not declared in this scope
>   copy(s, s + SEQ_WORDS,
              ^~~~~~~~~

build log: https://buildd.debian.org/status/fetch.php?pkg=abyss&arch=mips&ver=2.0.2-1&stamp=1478005755

After adding the missing SEQ_WORDS define for big-endian the build passed,
but the following tests failed:
> FAIL: common_kmer
> FAIL: BloomFilter
> FAIL: Konnector_DBGBloomAlgorithms
> FAIL: Konnector_konnector
> FAIL: PairedDBG_LoadAlgorithm
> FAIL: PairedDBG_KmerPair

Comparison of values returned by load and storeReverse methods between mipsel
and mips showed that the data contained in variable seq (type of std::bitset) is
in wrong byte order.

Conversion of arrays bigger than architecture's word size into bitset is working
by going sequentially through memory and converting the values into binary word
by word. It does not care about endianness.
So, on 32bit big-endian architectures the conversion must be done in 32bit
chunks and every chunk must be copied in reverse byte order.

The existing code in load and storeReverse methods was suitable for 64bit
big-endian architectures, it copies 64bit chunks of the array in reverse order.

The attached patch fixes the conversion of array to bitset (and vice versa) by
changing the uint64_t type to size_t in load and storeReverse methods.
This enables to use the same code on 32 and 64 bit architectures.

With this patch I was able to build abyss successfully on mips. This patch was
successfully tested on 64bit big-endian mips too.

Thanks,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20161209/eeb5209f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bigendian.patch
Type: text/x-diff
Size: 1228 bytes
Desc: bigendian.patch
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20161209/eeb5209f/attachment.patch>


More information about the Debian-med-packaging mailing list