[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backporting zlib 1.2.11 to Stretch



On 17.07.2018 16:37, Yuriy M. Kaminskiy wrote:
On 17.07.2018 16:00, Andreas Tille wrote:
On Tue, Jul 17, 2018 at 11:59:28AM +0100, Mark Brown wrote:
On Tue, Jul 17, 2018 at 10:43:58AM +0200, Michael Banck wrote:
On Tue, Jul 17, 2018 at 09:57:30AM +0200, Andreas Tille wrote:

I stumbled upon some software (spoa [1]) which obviously does not build with zlib 1.2.8 (just tried building in stretch - works with a
backported zlib from testing).

That seems to be due to bioparser using the new zlib features from
1.2.11.

Maybe it is easier to adapt bioparse to the 1.2.8 zlib interface than
backporting this pretty central library?

It's a pretty stable library so there's not *huge* concerns with
backporting it, though obviously it'd still be a pretty big change to
pull onto people's systems which they might not be enthused about.

I take both responses as some kind of "please rather don't" if you can
avoid this.  So if I try to backport spoa - or rather libbioparser-dev
to stretch I need to deal with:
...



which means line 248 and 357 of this file

https://salsa.debian.org/med-team/libbioparser-dev/blob/master/include/bioparser/bioparser.hpp

need to be converted to the old zlib 1.2.8 interface.  This would be

248           uint64_t read_bytes = gzfread(this->buffer_.data(), sizeof(char),
249               this->buffer_.size(), input_file);

248            uint64_t read_bytes = gzread(this->buffer_.data(),
249                 this->buffer_.size(), input_file);

(or, maybe, it should be

      #include <climits>
      #include <algorithm>
...
249                std::min(this->buffer_.size(), INT_MAX), input_file);

if size() can be larger than (32-bit) int)


Oops, sorry, forgot about different argument order in (gz)fread:

248            uint64_t read_bytes = gzread(input_file,
249               this->buffer_.data(),
                  std::min(this->buffer_.size(), INT_MAX));


Reply to: