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

Re: Backporting zlib 1.2.11 to Stretch



Hi Yuriy,

thanks a lot for your patch suggestions.

On Tue, Jul 17, 2018 at 04:55:48PM +0300, Yuriy M. Kaminskiy wrote:
> On 17.07.2018 16:37, Yuriy M. Kaminskiy wrote:
> > > 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));
> 

Unfortunately this suggestion does not work when building libbioparser-dev:

In file included from /build/libbioparser-dev-1.2.0/test/bioparser_test.cpp:9:0:
/build/libbioparser-dev-1.2.0/include/bioparser/bioparser.hpp:252:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
             std::min(this->buffer_.size(), INT_MAX));
             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMakeFiles/bioparser_test.dir/build.make:65: recipe for target 'CMakeFiles/bioparser_test.dir/test/bioparser_test.cpp.o' failed

So I reverted to your first more simple suggestion - but this fails as well:

/build/libbioparser-dev-1.2.0/test/bioparser_test.cpp:744:1:   required from here
/build/libbioparser-dev-1.2.0/include/bioparser/bioparser.hpp:360:38: error: 'gzfread' was not declared in this scope
         uint64_t read_bytes = gzfread(input_file, this->buffer_.data(),
                               ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             this->buffer_.size());
             ~~~~~~~~~~~~~~~~~~~~~     
/build/libbioparser-dev-1.2.0/include/bioparser/bioparser.hpp: In instantiation of 'bool bioparser::FastaParser<T>::parse_objects(std::vector<std::unique_ptr<T> >&, uint64_t) [with T = Read; uint64_t = long unsigned int]':


I've commited my attempts to Git[1].  Any further hints are welcome
and thanks again anyway

     Andreas.


[1] https://salsa.debian.org/med-team/libbioparser-dev

-- 
http://fam-tille.de


Reply to: