[Debian-med-packaging] Bug#780409: Patch for ABySS on 32-bit architectures and license

Andreas Tille andreas at an3as.eu
Mon May 18 13:11:40 UTC 2015


Hi Shaun,

I just uploaded abyss with the patch proposed by Graham.  It would be
great if you could evaluate the patch and take it over upstream - or
alternatively declare that ABySS should only be used on 64 bit
architectures and thus I would restrict the architectures accordingly.

BTW, autobuilding on Debian for non-free packages is disabled.  I wonder
whether you might like to consider a DFSG-free license for ABySS.
Recently we (=the Debian Med team) were lucky to free some software in
our scope and it would be really great if ABySS could be distributed
under a free license as well.  This would not only enable us to
distribute it with official Debian but also would enable us to detect
problems as described below way earlier.

Kind regards

      Andreas.

On Fri, Mar 13, 2015 at 04:41:09PM +0200, Graham Inggs wrote:
> Source: abyss
> Version: 1.5.2-1
> Severity: normal
> Tags: patch
> 
> Hi maintainer
> 
> Version 1.5.2-1 of abyss FTBFS on 32-bit architectures (armhf, i386
> and powerpc) in Ubuntu [1].
> Previous versions built fine on all architectures.
> 
> I found 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.
> I was able to get abyss 1.5.2-1 to build on amd64, i386 and armhf
> with the attached patch in place and all unit tests passed.
> I have no idea where to begin actually testing abyss itself.
> 
> Is it worth me uploading abyss with this patch into Ubuntu?
> This will at least allow version 1.5.2-1 to migrate from proposed to
> release.
> Alternatively, is this software useful on a 32-bit system?  The
> other solution is for me to disable building for these
> architectures.
> 
> Regards
> Graham
> 
> [1] https://launchpad.net/ubuntu/+source/abyss/1.5.2-1
> 

> --- a/Common/StringUtil.h
> +++ b/Common/StringUtil.h
> @@ -106,7 +106,7 @@
>  	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 @@
>  		// 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 @@
>  
>  	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 @@
>  		// 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 @@
>  
>  		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++) {

> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list